@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

/* ===========================
   CSS 变量 & 重置
=========================== */
:root {
  --c-dark: #1A1A2E;
  --c-accent: #E94560;
  --c-light: #F5F5F5;
  --c-mid: #2D2D4A;
  --c-border: #3A3A5C;
  --c-text: #F5F5F5;
  --c-text-muted: #A0A0C0;
  --c-card-bg: #22223A;
  --c-hover: #FF6B7A;

  --nav-h: 60px;
  --max-content: 860px;
  --max-wide: 1200px;
  --radius-card: 28px;
  --radius-sm: 4px;
  --font-main: 'DM Sans', system-ui, -apple-system, sans-serif;
  --transition: 150ms ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--c-dark);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--transition), background var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--c-hover);
}

/* ===========================
   导航
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  border-bottom: 2px solid var(--c-accent);
  height: var(--nav-h);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
  padding: 4px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.5px;
}

.main-nav {
  flex: 1;
  overflow: hidden;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--c-text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--c-text);
  background: var(--c-mid);
}

.nav-cta {
  flex-shrink: 0;
  background: var(--c-accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--c-hover);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  min-height: 40px;
  min-width: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===========================
   main + article + section 结构
=========================== */
main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 20px 60px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
}

main > article {
  min-width: 0;
}

main > article > section {
  margin-bottom: 48px;
}

/* ===========================
   Hero（首页）
=========================== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 20px 60px;
  text-align: center;
  background: var(--c-dark);
  position: relative;
  overflow: hidden;
  margin: 0 -20px 48px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--c-accent);
  opacity: 0.04;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  text-transform: none;
}

.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 18px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.btn-primary:hover {
  background: var(--c-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--c-mid);
  color: var(--c-text);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--c-border);
}

.btn-secondary:hover {
  background: var(--c-border);
  color: var(--c-text);
}

.hero-media {
  margin-top: 40px;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  border-radius: var(--radius-card);
}

/* ===========================
   页面内英雄区（非首页）
=========================== */
.page-hero {
  padding: 60px 0 40px;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 40px;
}

.page-hero--ranking { border-left: 4px solid var(--c-accent); padding-left: 20px; }
.page-hero--compare { border-left: 4px solid #7B61FF; padding-left: 20px; }
.page-hero--review  { border-left: 4px solid #00C6A2; padding-left: 20px; }
.page-hero--faq     { border-left: 4px solid #F5A623; padding-left: 20px; }
.page-hero--about   { border-left: 4px solid var(--c-accent); padding-left: 20px; }
.page-hero--privacy { border-left: 4px solid var(--c-text-muted); padding-left: 20px; }

.page-hero-inner h1 {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.page-eyebrow {
  display: inline-block;
  background: var(--c-mid);
  color: var(--c-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--c-accent);
}

.page-lead {
  font-size: 17px;
  color: var(--c-text-muted);
  line-height: 1.7;
  max-width: 640px;
}

.page-date {
  display: block;
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}

/* ===========================
   h2/h3 标题（内嵌 span）
=========================== */
h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 > span {
  position: relative;
}

h2 > span::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: var(--c-accent);
  border-radius: 1px;
  margin-top: 2px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 14px;
}

h3 > span {
  border-left: 3px solid var(--c-accent);
  padding-left: 8px;
}

/* ===========================
   卡片网格（子页列表）
=========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  color: var(--c-text);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}

.child-card:hover {
  border-color: var(--c-accent);
  background: var(--c-mid);
  color: var(--c-text);
}

.child-card > strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-text);
  display: block;
}

.card-desc {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.card-num {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  font-weight: 700;
  color: var(--c-accent);
  opacity: 0.25;
  line-height: 1;
}

.card-tag {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

/* ===========================
   榜单列表
=========================== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--c-text);
  transition: border-color var(--transition), background var(--transition);
}

.rank-item:hover {
  border-color: var(--c-accent);
  background: var(--c-mid);
  color: var(--c-text);
}

.rank-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-accent);
  grid-row: 1 / 3;
  line-height: 1;
}

.rank-item > strong {
  font-size: 15px;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1;
}

.rank-desc {
  font-size: 13px;
  color: var(--c-text-muted);
  grid-column: 2;
  grid-row: 2;
}

.rank-date {
  font-size: 12px;
  color: var(--c-text-muted);
  grid-column: 3;
  grid-row: 1;
  white-space: nowrap;
}

/* ===========================
   对比页
=========================== */
.compare-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--c-card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.compare-tag {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
}

.compare-tag--a {
  background: var(--c-accent);
  color: #fff;
}

.compare-tag--b {
  background: var(--c-mid);
  color: var(--c-text);
  border: 2px solid var(--c-border);
}

.compare-vs {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===========================
   正文内容
=========================== */
.prose-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
  max-width: var(--max-content);
}

.prose-content h2,
.prose-content h3 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose-content p {
  margin-bottom: 1.2em;
}

.prose-content ul,
.prose-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.prose-content li {
  margin-bottom: 0.5em;
}

.prose-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-content a:hover {
  color: var(--c-hover);
}

.prose-content strong {
  font-weight: 700;
  color: var(--c-text);
}

.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 15px;
}

.prose-content th,
.prose-content td {
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  text-align: left;
}

.prose-content th {
  background: var(--c-mid);
  font-weight: 700;
}

.prose-content tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

/* ===========================
   FAQ 样式
=========================== */
.faq-prose .faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-prose .faq-q {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  background: var(--c-card-bg);
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-prose .faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--c-accent);
  flex-shrink: 0;
}

.faq-prose .faq-item.is-open .faq-q::after {
  content: '－';
}

.faq-prose .faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease, padding 200ms ease;
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.7;
}

.faq-prose .faq-item.is-open .faq-a {
  max-height: 600px;
  padding: 16px 20px;
}

/* ===========================
   快速链接 & 子页块链接（child-card a > strong 结构）
=========================== */
.quick-links-row,
.review-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  background: var(--c-mid);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  min-height: 48px;
  color: var(--c-text);
  transition: border-color var(--transition), background var(--transition);
}

.quick-link:hover {
  border-color: var(--c-accent);
  background: var(--c-card-bg);
  color: var(--c-text);
}

.quick-link > strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}

/* ===========================
   About 统计块
=========================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--c-card-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  color: var(--c-text);
  transition: border-color var(--transition);
}

.stat-block:hover {
  border-color: var(--c-accent);
  color: var(--c-text);
}

.stat-block > strong {
  font-size: 15px;
  font-weight: 700;
}

.stat-block > span {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ===========================
   侧边栏
=========================== */
.site-aside {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-link {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  min-height: 40px;
  line-height: 20px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  color: var(--c-text);
  border-left-color: var(--c-accent);
  background: var(--c-mid);
}

/* ===========================
   页脚（仅 p + small）
=========================== */
.site-footer {
  background: var(--c-mid);
  border-top: 2px solid var(--c-border);
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-size: 14px;
  color: var(--c-text-muted);
  font-weight: 500;
}

.footer-links {
  font-size: 13px;
  color: var(--c-text-muted);
}

.footer-links a {
  color: var(--c-text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--c-accent);
}

/* ===========================
   测评 hero media
=========================== */
.review-hero-media {
  margin-top: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.review-hero-img {
  width: 100%;
  object-fit: cover;
  max-height: 320px;
}

/* ===========================
   Stagger animation
=========================== */
@media (prefers-reduced-motion: no-preference) {
  .cards-grid .child-card,
  .rank-list .rank-item {
    animation: fadeUp 250ms ease both;
  }

  .cards-grid .child-card:nth-child(1) { animation-delay: 0ms; }
  .cards-grid .child-card:nth-child(2) { animation-delay: 50ms; }
  .cards-grid .child-card:nth-child(3) { animation-delay: 100ms; }
  .cards-grid .child-card:nth-child(4) { animation-delay: 150ms; }
  .cards-grid .child-card:nth-child(5) { animation-delay: 200ms; }
  .cards-grid .child-card:nth-child(6) { animation-delay: 250ms; }

  .rank-list .rank-item:nth-child(1) { animation-delay: 0ms; }
  .rank-list .rank-item:nth-child(2) { animation-delay: 40ms; }
  .rank-list .rank-item:nth-child(3) { animation-delay: 80ms; }
  .rank-list .rank-item:nth-child(4) { animation-delay: 120ms; }
  .rank-list .rank-item:nth-child(5) { animation-delay: 160ms; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   响应式断点
=========================== */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }

  .site-aside {
    position: static;
  }
}

@media (max-width: 680px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--c-dark);
    border-bottom: 2px solid var(--c-border);
    padding: 12px 20px;
    z-index: 99;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-links {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .nav-links a {
    font-size: 15px;
    padding: 12px 14px;
    min-height: 44px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .hero-section {
    min-height: 100vh;
    padding: 80px 16px 48px;
    margin: 0 -20px 40px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  main {
    padding: 0 16px 40px;
  }

  .page-hero {
    padding: 40px 0 28px;
  }

  .rank-item {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto auto;
  }

  .rank-date {
    grid-column: 2;
    grid-row: 3;
  }

  .compare-tags {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 375px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .prose-content {
    font-size: 16px;
  }

  .quick-links-row,
  .review-nav-links {
    flex-direction: column;
  }

  .quick-link {
    width: 100%;
  }
}
