@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-accent: #e8334a;
  --c-accent2: #ff6b35;
  --c-border: #e0e0e0;
  --c-muted: #6b7280;
  --c-overlay: rgba(31,31,31,0.06);

  --shadow-sm: 0 1px 4px rgba(31,31,31,0.08), 0 0 0 1px var(--c-border);
  --shadow-md: 0 4px 16px rgba(31,31,31,0.10), 0 1px 4px rgba(31,31,31,0.06);
  --shadow-lg: 0 8px 32px rgba(31,31,31,0.14), 0 2px 8px rgba(31,31,31,0.08);
  --shadow-xl: 0 16px 48px rgba(31,31,31,0.18), 0 4px 16px rgba(31,31,31,0.10);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --nav-h: 64px;
  --announce-h: 38px;
  --sticky-h: 44px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-light);
  color: var(--c-dark);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ===== 公告栏 ===== */
.announce-bar {
  position: relative;
  z-index: 40;
  background: var(--c-dark);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 9px 16px;
  min-height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

/* ===== 导航（details/summary/menu 结构） ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--c-white);
  border-bottom: 1.5px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.site-nav[open] { box-shadow: var(--shadow-md); }

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--nav-h);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nav-summary::-webkit-details-marker { display: none; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-home-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand-text {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: -0.01em;
}

.nav-toggle-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-muted);
  padding: 8px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.site-nav[open] .nav-toggle-label {
  background: var(--c-dark);
  color: var(--c-white);
  border-color: var(--c-dark);
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px 16px;
  background: var(--c-white);
  border-top: 1px solid var(--c-overlay);
}
.nav-menu li { display: block; }
.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-light);
  color: var(--c-dark);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  white-space: nowrap;
}
.nav-pill:hover, .nav-pill.active {
  background: var(--c-dark);
  color: var(--c-white);
  border-color: var(--c-dark);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ===== 粘性锚点条 ===== */
.sticky-anchors {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  background: rgba(245,245,245,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  gap: 6px;
  padding: 6px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  min-height: var(--sticky-h);
  align-items: center;
}
.sticky-anchors::-webkit-scrollbar { display: none; }
.anchor-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-dark);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.anchor-pill:hover {
  background: var(--c-dark);
  color: var(--c-white);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  background: var(--c-dark);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px 120px;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  margin-bottom: -40px;
}

.page-hero {
  position: relative;
  min-height: 38vh;
  background: var(--c-dark);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 60px 24px 90px;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  margin-bottom: -30px;
}
.page-hero--ranking { background: linear-gradient(135deg, #1f1f1f 60%, #2d2d2d); }
.page-hero--compare { background: linear-gradient(135deg, #1f1f1f 50%, #1a1a2e); }
.page-hero--review  { background: linear-gradient(135deg, #1f1f1f 50%, #1a2e1a); }
.page-hero--faq     { background: linear-gradient(135deg, #1f1f1f 50%, #2e1a2e); }
.page-hero--about   { background: linear-gradient(135deg, #1f1f1f 50%, #2e2a1a); }
.page-hero--privacy { background: linear-gradient(135deg, #1f1f1f 50%, #1a1a1a); }
.page-hero--default { background: var(--c-dark); }

.hero-bg-text {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: clamp(80px, 18vw, 200px);
  font-weight: 700;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  text-align: left;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.hero-eyebrow a { color: rgba(255,255,255,0.75); text-decoration: underline; }

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 540px;
  margin-bottom: 28px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: transform 0.18s, box-shadow 0.18s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: border-color 0.18s, background 0.18s;
}
.btn-outline:hover { border-color: var(--c-white); background: rgba(255,255,255,0.1); }

.update-time {
  display: inline-block;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  font-style: normal;
}
.review-meta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== 布局 ===== */
.layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  align-items: start;
}

main { min-width: 0; }

/* ===== Section ===== */
.section-main,
.section-rankings,
.section-cards,
.section-content,
.section-analysis,
.section-tips,
.section-verdict,
.section-principles,
.section-data,
.section-tips {
  position: relative;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.section-title + hr {
  border: none;
  border-top: 2px solid var(--c-border);
  margin-bottom: 24px;
}
hr {
  border: none;
  border-top: 1.5px solid var(--c-border);
  margin: 12px 0 20px;
}

/* ===== 主页：榜单列表 ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.rank-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  z-index: 1;
}
.rank-entry:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) translateZ(0);
  z-index: 2;
}
.rank-no {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-border);
  min-width: 48px;
  line-height: 1;
  display: block;
}
.rank-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rank-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  line-height: 1.3;
}
.rank-meta {
  font-size: 12px;
  color: var(--c-muted);
}

/* ===== 主页：卡片网格 ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.child-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.child-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px) translateZ(0);
  z-index: 2;
}
.card-num {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--c-overlay);
  line-height: 1;
  position: absolute;
  top: 8px;
  right: 12px;
  color: rgba(31,31,31,0.07);
  pointer-events: none;
  display: block;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-dark);
  line-height: 1.35;
  display: block;
  position: relative;
  z-index: 1;
  padding-top: 20px;
}
.card-desc {
  font-size: 13px;
  color: var(--c-muted);
  display: block;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ===== 子页兄弟列表 ===== */
.sibling-list { display: flex; flex-direction: column; gap: 8px; }
.sibling-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-light);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-dark);
  transition: background 0.15s, border-color 0.15s;
}
.sibling-card:hover, .sibling-card.current {
  background: var(--c-dark);
  color: var(--c-white);
  border-color: var(--c-dark);
}
.sibling-card strong { display: block; }
.sibling-num {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 28px;
  color: var(--c-muted);
}
.sibling-card:hover .sibling-num,
.sibling-card.current .sibling-num { color: rgba(255,255,255,0.5); }

/* ===== 侧边栏 ===== */
.page-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--sticky-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-block {
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.sidebar-block:hover { box-shadow: var(--shadow-md); z-index: 2; }

.aside-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 6px;
}
.aside-links { display: flex; flex-direction: column; gap: 4px; }
.aside-links li a {
  display: block;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 6px;
  color: var(--c-dark);
  transition: background 0.15s;
  line-height: 1.4;
}
.aside-links li a:hover { background: var(--c-light); }

/* 主页内联 aside（在 div 内） */
.sidebar-aside {
  margin-top: 24px;
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-sm);
}
.section-aside-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--c-muted);
  font-weight: 600;
}

/* 内联 aside（正文中） */
.inline-aside {
  background: var(--c-light);
  border-left: 3px solid var(--c-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--c-dark);
  line-height: 1.65;
}
.highlight-aside { border-left-color: var(--c-accent); }
.verdict-aside { border-left-color: #27ae60; }

/* figure 容器 */
.content-figure,
.compare-figure,
.review-figure,
.faq-figure,
.privacy-figure,
.about-figure,
.section-figure {
  display: block;
  position: relative;
}
.section-figure figcaption,
.section-caption {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 12px;
}

/* ===== 正文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-dark);
  max-width: 72ch;
}
.prose h2 { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; margin: 2em 0 0.6em; }
.prose h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14px; }
.prose th { background: var(--c-dark); color: var(--c-white); padding: 10px 14px; text-align: left; font-weight: 600; }
.prose td { padding: 9px 14px; border-bottom: 1px solid var(--c-border); }
.prose tr:nth-child(even) td { background: var(--c-light); }
.prose a { color: var(--c-accent); text-decoration: underline; }
.prose strong { font-weight: 700; }
.prose hr { border: none; border-top: 1.5px solid var(--c-border); margin: 1.5em 0; }
.prose blockquote {
  border-left: 3px solid var(--c-dark);
  padding: 10px 16px;
  color: var(--c-muted);
  font-style: italic;
  margin: 1.2em 0;
  background: var(--c-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* FAQ 特化 */
.faq-body { max-width: 100%; }

/* ===== 首页特化 ===== */
.page-home .section-rankings,
.page-home .section-cards,
.page-home .section-content {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}
.page-home .section-rankings { padding-top: 72px; }
.page-home .section-cards { padding-bottom: 16px; }
.page-home .section-content { padding-bottom: 64px; }

/* 首页 div 布局 */
.page-home .section-rankings {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.page-home .section-rankings .section-title,
.page-home .section-rankings hr,
.page-home .section-rankings .section-figure,
.page-home .section-rankings .rank-list {
  grid-column: 1;
}
.page-home .section-rankings .sidebar-aside {
  grid-column: 2;
  grid-row: 1 / 5;
  margin-top: 0;
}

.page-home .section-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.page-home .section-content .section-title,
.page-home .section-content hr,
.page-home .section-content .content-figure {
  grid-column: 1;
}
.page-home .section-content .sidebar-aside {
  grid-column: 2;
  grid-row: 1 / 4;
  margin-top: 0;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,0.85);
  padding: 0;
  margin-top: 40px;
}
.footer-top {
  padding: 40px 24px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  max-width: 1100px;
  margin: 0 auto;
}
.footer-brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
}
.footer-cols {
  display: flex;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  gap: 32px;
}
.footer-dl { flex: 1; }
.footer-dl dt {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-dl dd { margin-bottom: 6px; }
.footer-dl dd a {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  transition: color 0.15s;
  display: block;
  padding: 3px 0;
  min-height: 28px;
}
.footer-dl dd a:hover { color: var(--c-white); }
.footer-bar {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== Reveal 动效 ===== */
.reveal-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s, border-color 0.2s;
}
.reveal-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 移动端断点 ===== */
@media (max-width: 768px) {
  .layout-wrapper {
    grid-template-columns: 1fr;
    padding: 40px 16px 48px;
    gap: 24px;
  }
  .page-sidebar { position: static; }

  .page-home .section-rankings,
  .page-home .section-content {
    grid-template-columns: 1fr;
    padding: 40px 16px 0;
  }
  .page-home .section-rankings .sidebar-aside,
  .page-home .section-content .sidebar-aside {
    grid-column: 1;
    grid-row: auto;
  }
  .page-home .section-cards { padding: 0 16px; }

  .cards-grid { grid-template-columns: 1fr 1fr; }
  .nav-menu { flex-direction: column; }
  .nav-pill { width: 100%; justify-content: center; }
  .footer-cols { flex-direction: column; gap: 24px; }
  .hero-section { padding: 60px 16px 100px; min-height: 60vh; }
  .page-hero { padding: 48px 16px 80px; min-height: 32vh; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-h1 { font-size: 1.7rem; }
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .sticky-anchors { padding: 6px 12px; }
  .nav-summary { padding: 0 14px; }
  .section-title { font-size: 1.25rem; }
  .footer-bar { flex-direction: column; gap: 6px; }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal-card { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
