/* ==========================================================================
   运动科学馆 · 体育科普网站 样式表
   纯静态站点，无框架依赖。配色遵循浅色主题，运动感配色。
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #e11d48;
  --accent-soft: #fff1f2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #16202e;
  --text-2: #475569;
  --muted: #7c8aa0;
  --border: #e6eaf2;
  --shadow-sm: 0 1px 3px rgba(22, 32, 46, .06);
  --shadow: 0 6px 20px rgba(22, 32, 46, .08);
  --shadow-lg: 0 18px 44px rgba(22, 32, 46, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1180px;
  --nav-h: 64px;
  --font: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans SC',
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ------------------------------- 顶栏 ------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  height: var(--nav-h); display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-size: 17px;
}
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: var(--text-2);
  font-size: 14.5px; font-weight: 500; transition: .15s;
}
.nav-links a:hover { background: #eef2f9; color: var(--text); }
.nav-links a.active { color: var(--primary); background: #e8f0fe; }
.nav-search { position: relative; width: 200px; margin-left: auto; }
.nav-search input {
  width: 100%; padding: 8px 12px 8px 34px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border); border-radius: 999px; background: #f2f5fa; color: var(--text);
  outline: none; transition: .15s;
}
.nav-search input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.nav-search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--text-2); }

/* ------------------------------- Hero ------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(125deg, #0f172a 0%, #1e3a8a 45%, #b91c1c 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .18), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, .12), transparent 40%);
}
.hero::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 460px; height: 460px;
  border: 2px solid rgba(255, 255, 255, .14); border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .05), 0 0 0 130px rgba(255, 255, 255, .04);
}
.hero-inner { position: relative; padding: 72px 0 80px; max-width: 760px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25); margin-bottom: 22px;
}
.hero h1 { font-size: 46px; margin-bottom: 18px; letter-spacing: -.02em; }
.hero p.lead { font-size: 17.5px; color: rgba(255, 255, 255, .86); margin-bottom: 30px; max-width: 620px; }
.hero-search {
  display: flex; gap: 10px; background: #fff; padding: 7px; border-radius: 999px;
  max-width: 520px; box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1; border: none; outline: none; padding: 10px 16px; font-size: 15px;
  font-family: var(--font); color: var(--text); background: transparent; border-radius: 999px;
}
.hero-search button {
  border: none; cursor: pointer; font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 10px 26px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--primary));
  transition: .15s;
}
.hero-search button:hover { filter: brightness(1.08); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-tags a {
  font-size: 13.5px; padding: 5px 13px; border-radius: 999px; color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .28); transition: .15s;
}
.hero-tags a:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 30px; line-height: 1.2; }
.hero-stats div span { font-size: 13.5px; color: rgba(255, 255, 255, .72); }

/* ------------------------------- 区块 ------------------------------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.more-link { font-size: 14.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* ------------------------------- 分类卡 ------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cat-card {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: .18s; display: block; color: var(--text);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--text); }
.cat-card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.cat-card h3 { font-size: 17px; display: flex; align-items: center; justify-content: space-between; }
.cat-card h3 em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); background: #f1f4f9; padding: 2px 9px; border-radius: 999px; }
.cat-card p { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }

/* ------------------------------- 文章卡 ------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.article-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s; color: var(--text);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--text); }
.article-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f6; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .thumb img { transform: scale(1.05); }
.chip {
  position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 600; color: #fff;
  padding: 4px 10px; border-radius: 999px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
}
.article-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.article-card p.sum { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.7; flex: 1; }
.meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 12px; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }

/* 精选大卡 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.feature-card {
  position: relative; border-radius: var(--radius); overflow: hidden; color: #fff;
  min-height: 230px; display: flex; align-items: flex-end; padding: 22px; transition: .2s;
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: #fff; }
.feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(9, 14, 26, .88) 10%, rgba(9, 14, 26, .15) 70%); }
.feature-card .txt { position: relative; }
.feature-card .txt em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 2px; opacity: .85; }
.feature-card .txt h3 { font-size: 19px; margin: 6px 0 8px; }
.feature-card .txt p { font-size: 13.5px; margin: 0; color: rgba(255, 255, 255, .8); }

/* ------------------------------- 筛选栏 ------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.filter-btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text-2);
  padding: 7px 16px; border-radius: 999px; font-size: 14px; font-family: var(--font);
  cursor: pointer; transition: .15s; font-weight: 500;
}
.filter-btn:hover { border-color: #c9d4e6; color: var(--text); }
.filter-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.filter-count { margin-left: auto; font-size: 13.5px; color: var(--muted); }

/* ------------------------------- 详情页 ------------------------------- */
.progress-bar {
  position: fixed; top: var(--nav-h); left: 0; height: 3px; width: 0%; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .1s linear;
}
.crumb { font-size: 13.5px; color: var(--muted); padding: 18px 0 0; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--primary); }

.article-hero { margin: 14px 0 26px; border-radius: var(--radius); overflow: hidden; position: relative; background: #eef1f6; }
.article-hero img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.article-head { max-width: 800px; }
.article-head h1 { font-size: 34px; margin: 14px 0 14px; }
.article-head .lead { font-size: 16.5px; color: var(--text-2); }
.article-head .meta { border: none; padding: 0; margin-top: 16px; font-size: 13.5px; gap: 18px; }

.layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; padding-bottom: 60px; }
.article-body {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 38px; font-size: 16.5px; color: #26313f;
}
.article-body h2 { font-size: 21px; margin: 34px 0 14px; padding-left: 14px; border-left: 4px solid var(--primary); }
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 15px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }
.article-body blockquote {
  margin: 20px 0; padding: 14px 18px; background: #f7f9fc; border-left: 3px solid var(--muted);
  color: var(--text-2); font-size: 15.5px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tip {
  margin: 22px 0; padding: 16px 18px; background: #eef4ff; border: 1px solid #d7e4ff;
  border-radius: var(--radius-sm); font-size: 15.5px;
}
.tip strong { color: var(--primary-dark); }
.data-box {
  margin: 22px 0; padding: 16px 18px; background: #f8fafc; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow-x: auto;
}
.data-box table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-box th, .data-box td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-box th { background: #eef2f8; font-weight: 700; color: var(--text); white-space: nowrap; }
.data-box tr:last-child td { border-bottom: none; }

.key-points {
  background: linear-gradient(135deg, #fff7f8, #eef4ff); border: 1px solid #ffe0e6;
  border-radius: var(--radius); padding: 22px 24px; margin: 0 0 26px;
}
.key-points h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.key-points ul { margin: 0; padding: 0; list-style: none; }
.key-points li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 15px; }
.key-points li::before {
  content: ''; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.faq { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 26px; }
.faq h3 { font-size: 19px; margin-bottom: 16px; }
.faq-item { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.faq-item:last-child { border: none; }
.faq-item b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.faq-item p { margin: 0; font-size: 15px; color: var(--text-2); }

.share-bar { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.share-bar .btn {
  font-size: 13.5px; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-2); background: #fff; cursor: pointer; font-family: var(--font); transition: .15s;
}
.share-bar .btn:hover { border-color: var(--primary); color: var(--primary); }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tag-list span { font-size: 13px; color: var(--text-2); background: #f1f4f9; padding: 4px 12px; border-radius: 999px; }

/* 侧栏 */
.side { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 18px; }
.side-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.side-box h4 { font-size: 14.5px; margin-bottom: 12px; color: var(--text); }
.toc { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.toc li { margin-bottom: 4px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); border-left: 2px solid transparent; }
.toc a:hover { background: #f4f7fb; color: var(--text); }
.toc a.active { background: #eef4ff; color: var(--primary-dark); border-left-color: var(--primary); font-weight: 600; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.side-list li:last-child { border: none; }
.side-list a { color: var(--text-2); display: flex; gap: 10px; align-items: center; }
.side-list a:hover { color: var(--primary); }
.side-list .thumb-sm { width: 62px; height: 42px; border-radius: 7px; object-fit: cover; flex: none; }
.side-list span.t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 上下篇 */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.pager a {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; color: var(--text); transition: .15s;
}
.pager a:hover { border-color: var(--primary); color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.pager em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.pager b { font-size: 15px; font-weight: 600; }
.pager .next { text-align: right; }

/* ------------------------------- 页脚 ------------------------------- */
.footer { background: #0f172a; color: #94a3b8; margin-top: 20px; padding: 46px 0 26px; font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer p { line-height: 1.8; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: #94a3b8; }
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 30px; padding-top: 18px;
  font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ------------------------------- 其他 ------------------------------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-size: 17px; color: var(--text-2); margin-bottom: 8px; }
.page-title { padding: 34px 0 6px; }
.page-title h1 { font-size: 32px; }
.page-title p { color: var(--muted); margin-top: 8px; }
.prose { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 38px; }
.prose h2 { font-size: 20px; margin: 26px 0 12px; padding-left: 14px; border-left: 4px solid var(--primary); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.back-top {
  position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer;
  display: none; place-items: center; color: var(--text-2); font-size: 18px; z-index: 40;
}
.back-top.show { display: grid; }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-box { flex: 1 1 260px; }
  .hero h1 { font-size: 34px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px 16px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-search { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .hero-inner { padding: 46px 0 52px; }
  .hero h1 { font-size: 27px; }
  .hero-stats { gap: 26px; }
  .hero-stats div b { font-size: 24px; }
  .article-head h1 { font-size: 25px; }
  .article-body, .prose { padding: 22px 18px; font-size: 16px; }
  .pager { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}
