@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');

/* ===== 基础变量 ===== */
:root {
  --paper: #fdfbf7;
  --paper-alt: #f5f5f5;
  --ink: #1a1a1a;
  --ink-mid: #444444;
  --ink-light: #888888;
  --border: #d8d4cc;
  --border-light: #e8e4dc;
  --accent: #2a2a2a;
  --glass-bg: rgba(253,251,247,0.72);
  --glass-border: rgba(26,26,26,0.10);
  --radius: 18px;
  --radius-sm: 8px;
  --bottom-bar-h: 56px;
  --font-main: 'Baloo 2', 'Comic Neue', system-ui, sans-serif;
  --max-prose: 72ch;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-bar-h) + 8px);
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { list-style: none; }

/* ===== 纸张纹理叠加 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ===== 页面包裹 ===== */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Hero（仅首页）===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 55% 45%;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(30%) contrast(1.1);
}
.hero-img--a { transform: translateY(0); }
.hero-img--b { transform: translateY(6%); }
.hero-slash {
  position: absolute;
  inset: 0;
  background: linear-gradient(108deg, rgba(26,26,26,0.82) 0%, rgba(26,26,26,0.38) 55%, transparent 100%);
  z-index: 1;
}
.hero-text {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem 4rem;
  max-width: 640px;
  color: var(--paper);
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(253,251,247,0.70);
  margin-bottom: 0.75rem;
  font-family: var(--font-main);
}
.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--paper);
}
.hero-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(253,251,247,0.82);
  margin-bottom: 1.5rem;
  max-width: 480px;
}
.hero-cta {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--paper);
  transition: none;
}
.hero-cta:hover {
  background: transparent;
  color: var(--paper);
}

/* ===== 内页 header ===== */
.inner-header {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.breadcrumb a { color: var(--ink-mid); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.inner-h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.page-date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-right: 1rem;
}
.compare-header-tag,
.review-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  border: 1.5px solid var(--ink);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.review-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }

/* ===== main 布局 ===== */
.inner-main,
.home-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

/* ===== div 通用 ===== */
.home-block,
.ranking-index-section,
.compare-index-section,
.review-index-section,
.about-intro-section,
.privacy-toc-section,
.default-content-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 220px;
  grid-template-rows: auto auto 1fr;
  gap: 0 2rem;
}
.home-block--alt { background: transparent; }

.home-block h2,
.ranking-index-section h2,
.compare-index-section h2,
.review-index-section h2,
.about-intro-section h2,
.privacy-toc-section h2,
.default-content-section h2 {
  grid-column: 1 / 2;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.subtitle {
  grid-column: 1 / 2;
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* ===== 玻璃拟态卡片 ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(26,26,26,0.06);
  transition: none;
}
.glass-card:hover {
  box-shadow: 0 4px 20px rgba(26,26,26,0.12);
  border-color: rgba(26,26,26,0.20);
}
.glass-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.glass-card h3 a { text-decoration: none; color: var(--ink); }
.glass-card h3 a:hover { text-decoration: underline; }
.glass-card p { font-size: 0.88rem; color: var(--ink-mid); line-height: 1.55; }
.glass-card time { font-size: 0.78rem; color: var(--ink-light); display: block; margin-top: 0.5rem; }
.card-date { font-size: 0.78rem; color: var(--ink-light); }

/* ===== 卡片网格 ===== */
.card-grid {
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* ===== 排行列表 ===== */
.rank-list,
.review-list {
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.rank-card, .review-card { height: 100%; }

/* ===== 对比列表 ===== */
.compare-list {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.compare-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.compare-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 2.5rem;
  flex-shrink: 0;
  font-family: var(--font-main);
}

/* ===== 装饰 figure ===== */
.block-deco,
.section-deco {
  grid-column: 1 / 2;
  height: 2px;
  margin: 0.5rem 0;
  border: none;
}
.block-deco span,
.section-deco span {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--ink);
}

/* ===== 侧边 aside ===== */
.block-aside,
.section-aside {
  grid-column: 2 / 3;
  grid-row: 1 / 5;
  padding: 1rem;
  background: var(--paper-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  align-self: start;
  position: sticky;
  top: 1rem;
}
.aside-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
  display: block;
}
.aside-link {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-mid);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.4;
}
.aside-link:last-child { border-bottom: none; }
.aside-link:hover { color: var(--ink); text-decoration: underline; }
.aside-link.is-active { color: var(--ink); font-weight: 700; }
.aside-rule { border: none; border-top: 1px solid var(--border); margin: 0.75rem 0; }

/* ===== prose 内容区（内页正文）===== */
.ranking-content-section,
.compare-content-section,
.review-content-section,
.about-content-section,
.privacy-content-section,
.home-content-section {
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0 2rem;
  align-items: start;
}
.prose-wrap {
  grid-column: 1 / 2;
  max-width: var(--max-prose);
  min-width: 0;
}
.prose-aside {
  grid-column: 2 / 3;
  grid-row: 1 / 10;
  padding: 1rem;
  background: var(--paper-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  align-self: start;
  position: sticky;
  top: 1rem;
}

/* ===== 正文排版 ===== */
.prose-wrap h2 { font-size: 1.3rem; font-weight: 700; margin: 1.8rem 0 0.5rem; }
.prose-wrap h3 { font-size: 1.1rem; font-weight: 600; margin: 1.4rem 0 0.4rem; }
.prose-wrap p { margin-bottom: 1rem; line-height: 1.7; }
.prose-wrap ul, .prose-wrap ol { margin: 0.8rem 0 1rem 1.4rem; }
.prose-wrap ul { list-style: disc; }
.prose-wrap ol { list-style: decimal; }
.prose-wrap li { margin-bottom: 0.35rem; line-height: 1.6; }
.prose-wrap table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.prose-wrap th { background: var(--paper-alt); border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; font-weight: 700; }
.prose-wrap td { border: 1px solid var(--border-light); padding: 0.5rem 0.75rem; }
.prose-wrap time { font-size: 0.82rem; color: var(--ink-light); }
.prose-wrap blockquote { border-left: 3px solid var(--ink); padding: 0.5rem 1rem; margin: 1rem 0; background: var(--paper-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose-wrap a { color: var(--ink); }
.prose-wrap img { border-radius: var(--radius-sm); margin: 1rem 0; }

/* ===== About / Privacy 特有 ===== */
.about-steps,
.privacy-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
}
.step-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.step-text { font-size: 0.88rem; }
.pp-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.4rem 0;
}
.pp-icon { font-weight: 700; font-size: 1rem; }
.about-figure,
.privacy-figure {
  grid-column: 1 / 2;
  margin: 0.25rem 0;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  margin-top: 2rem;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + var(--bottom-bar-h));
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand { flex-shrink: 0; }
.footer-brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--paper);
}
.footer-logo { filter: invert(1); }
.footer-nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.footer-nav a {
  color: rgba(253,251,247,0.70);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--paper); text-decoration: underline; }
.footer-copy { width: 100%; text-align: center; font-size: 0.78rem; color: rgba(253,251,247,0.50); padding-top: 0.5rem; border-top: 1px solid rgba(253,251,247,0.12); }

/* ===== 底部固定导航条 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-h);
  background: var(--paper);
  border-top: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(26,26,26,0.08);
}
.bottom-bar-left,
.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.bar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.bar-link:hover { background: var(--paper-alt); color: var(--ink); }
.bar-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 0 0.75rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

/* ===== Details/Summary 导航（结构抽签要求）===== */
.bottom-nav-details {
  position: fixed;
  bottom: var(--bottom-bar-h);
  left: 0;
  right: 0;
  z-index: 999;
}
.bottom-nav-details[open] .bottom-nav-menu {
  display: flex;
  flex-direction: column;
}
.bottom-nav-summary {
  display: none;
}
.bottom-nav-menu {
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  gap: 0.25rem;
  max-height: 60vh;
  overflow-y: auto;
}
.bottom-nav-menu li a {
  display: block;
  padding: 0.55rem 0.5rem;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.bottom-nav-menu li:last-child a { border-bottom: none; }
.bottom-nav-menu li a:hover { background: var(--paper-alt); }
.brand-center { font-weight: 700; }
.nav-toggle-icon { font-size: 1.2rem; }

/* ===== 移动端下开启 summary ===== */
@media (max-width: 640px) {
  .bottom-nav-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 44px;
    background: var(--paper-alt);
    border-top: 1px solid var(--border);
    cursor: pointer;
    list-style: none;
    min-height: 40px;
  }
  .bottom-nav-summary::-webkit-details-marker { display: none; }
}

/* ===== 并排内容布局 - 移动端变单栏 ===== */
@media (max-width: 800px) {
  .home-block,
  .ranking-index-section,
  .compare-index-section,
  .review-index-section,
  .about-intro-section,
  .privacy-toc-section,
  .default-content-section {
    grid-template-columns: 1fr;
  }
  .block-aside,
  .section-aside {
    grid-column: 1 / 2;
    grid-row: auto;
    position: static;
  }
  .block-deco,
  .section-deco { grid-column: 1 / 2; }
  .card-grid { grid-column: 1 / 2; }
  .rank-list, .review-list { grid-column: 1 / 2; }
  .compare-list { grid-column: 1 / 2; }

  .ranking-content-section,
  .compare-content-section,
  .review-content-section,
  .about-content-section,
  .privacy-content-section,
  .home-content-section {
    grid-template-columns: 1fr;
  }
  .prose-aside {
    grid-column: 1 / 2;
    grid-row: auto;
    position: static;
    margin-top: 1.5rem;
  }

  .inner-header { padding: 1.25rem 1rem 1rem; }
  .inner-main, .home-main { padding: 0 1rem; }
  .hero-text { padding: 1.5rem 1rem 3.5rem; }
  .hero-h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .rank-list, .review-list {
    grid-template-columns: 1fr;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .footer-nav { flex-direction: column; gap: 0; }
  .footer-nav a { min-height: 40px; }
  .bar-link { padding: 0 0.3rem; font-size: 0.68rem; }
  .bar-brand { font-size: 0.75rem; padding: 0 0.4rem; }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Parallax + Stagger (仅 JS 配合，CSS 占位）===== */
.js-parallax { will-change: transform; }
.stagger-item { opacity: 0; transform: translateY(16px); }
.stagger-item.is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.35s, transform 0.35s; }
@media (prefers-reduced-motion: reduce) {
  .stagger-item { opacity: 1; transform: none; }
  .stagger-item.is-visible { transition: none; }
}
