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

/* =====================
   CSS 变量 & 重置
   ===================== */
:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --black: #000;
  --white: #fff;
  --yellow: #ffe156;
  --bg: #f5f5f0;
  --border: 3px solid var(--black);
  --shadow: 5px 5px 0 var(--black);
  --shadow-sm: 3px 3px 0 var(--black);
  --radius: 0px;
  --font: 'Space Mono', 'Courier New', monospace;
  --nav-h: 60px;
  --content-max: 820px;
  --pad: 1.25rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* =====================
   布局骨架
   ===================== */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-main {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + 2rem);
}

/* =====================
   顶部导航
   ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue);
  border-bottom: var(--border);
  width: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: var(--nav-h);
  overflow-x: auto;
  padding: 0 0.5rem;
  scrollbar-width: none;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--black);
  white-space: nowrap;
  padding: 0 0.75rem;
  min-height: var(--nav-h);
  border-right: var(--border);
  flex-shrink: 0;
}

.nav-brand:hover {
  background: var(--yellow);
  color: var(--black);
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
}

.nav-a {
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--black);
  white-space: nowrap;
  border-right: 2px solid rgba(0,0,0,0.15);
  transition: background 0.15s;
  flex-shrink: 0;
}

.nav-a:hover,
.nav-a[aria-current="page"] {
  background: var(--black);
  color: var(--blue);
}

/* =====================
   Hero（home）
   ===================== */
.hero {
  display: flex;
  flex-direction: column-reverse;
  min-height: 45vh;
  border-bottom: var(--border);
  background: var(--black);
  overflow: hidden;
  position: relative;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 2.5rem var(--pad) 2rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  margin-top: auto;
}

.hero-h1 {
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  max-width: 18ch;
  text-align: right;
}

.hero-desc {
  color: #ddd;
  font-size: 1rem;
  max-width: 34ch;
  text-align: right;
}

/* =====================
   按钮
   ===================== */
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--black);
  border: var(--border);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--black);
  color: var(--black);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--black);
}

/* =====================
   分类标签
   ===================== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cat-tab {
  display: inline-block;
  background: var(--blue);
  color: var(--black);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  transition: background 0.12s, transform 0.12s;
}

.cat-tab:hover {
  background: var(--red);
  color: var(--white);
  transform: translate(-2px, -2px);
}

/* =====================
   正文容器（main > article > div > div）
   ===================== */
.page-article {
  width: 100%;
}

.content-outer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--pad);
}

.content-inner {
  width: 100%;
}

/* =====================
   prose 正文样式
   ===================== */
.prose h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 0;
  border-left: 6px solid var(--blue);
  padding-left: 0.75rem;
}

.prose h2 + hr {
  border: none;
  border-top: 2px solid var(--black);
  margin: 0.5rem 0 1.25rem;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.prose h3 + hr {
  border: none;
  border-top: 1px solid #aaa;
  margin: 0.25rem 0 1rem;
}

.prose p {
  margin: 0.9rem 0;
  font-size: 1rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.prose li {
  margin: 0.4rem 0;
  line-height: 1.7;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.prose table th,
.prose table td {
  border: 2px solid var(--black);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.prose table th {
  background: var(--black);
  color: var(--blue);
  font-weight: 700;
}

.prose table tr:nth-child(even) td {
  background: #eee;
}

.prose a {
  color: var(--black);
  font-weight: 700;
  border-bottom: 2px solid var(--blue);
  text-decoration: none;
}

.prose a:hover {
  background: var(--blue);
}

.prose blockquote {
  border-left: 5px solid var(--red);
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: #ffe;
  font-style: italic;
}

.prose code {
  font-family: var(--font);
  background: #e8e8e8;
  border: 1px solid #bbb;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.prose pre {
  background: var(--black);
  color: var(--blue);
  padding: 1rem;
  overflow-x: auto;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  margin: 1rem 0;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* =====================
   日期行
   ===================== */
.date-line {
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

/* =====================
   区域标题
   ===================== */
.zone-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* hr 装饰（紧跟 h2/h3） */
.cards-zone hr,
.rank-zone hr,
.table-zone hr,
.sibling-zone hr {
  border: none;
  border-top: 3px solid var(--black);
  margin: 0.4rem 0 1.25rem;
}

/* =====================
   卡片区（home）
   ===================== */
.cards-zone {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad) 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--black);
}

.card-img-wrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border: 2px solid var(--black);
  display: inline-block;
  padding: 0.1rem 0.5rem;
  align-self: flex-start;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.card-title a {
  text-decoration: none;
  color: var(--black);
}

.card-title a:hover {
  color: var(--red);
}

.card-desc {
  font-size: 0.88rem;
  color: #333;
  line-height: 1.55;
}

.card-date {
  font-size: 0.78rem;
  color: #666;
  margin-top: auto;
}

/* =====================
   排行列表
   ===================== */
.rank-zone {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad) 2rem;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem;
  transition: transform 0.12s, box-shadow 0.12s;
}

.rank-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black);
}

.rank-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue);
  border: 2px solid var(--black);
  background: var(--black);
  color: var(--blue);
  min-width: 2.8rem;
  text-align: center;
  padding: 0.15rem 0.3rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.rank-body {
  flex: 1;
  min-width: 0;
}

.rank-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.rank-title a {
  text-decoration: none;
  color: var(--black);
}

.rank-title a:hover {
  color: var(--blue);
}

.rank-desc {
  font-size: 0.85rem;
  color: #444;
  margin-top: 0.2rem;
}

.rank-date {
  font-size: 0.78rem;
  color: #888;
  display: block;
  margin-top: 0.2rem;
}

.rank-arrow {
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--black);
  border: 2px solid var(--black);
  padding: 0.3rem 0.6rem;
  background: var(--blue);
  transition: background 0.12s;
  flex-shrink: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.rank-arrow:hover {
  background: var(--red);
  color: var(--white);
}

/* =====================
   对比表格
   ===================== */
.table-zone {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad) 2rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.9rem;
}

.cmp-table th {
  background: var(--black);
  color: var(--blue);
  font-weight: 700;
  border: 2px solid var(--black);
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.cmp-table td {
  border: 2px solid var(--black);
  padding: 0.6rem 0.85rem;
  vertical-align: top;
  background: var(--white);
}

.cmp-table tr:hover td {
  background: #eef7ff;
}

.table-link {
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
}

.table-link:hover {
  background: var(--blue);
}

/* =====================
   Banner 通用
   ===================== */
.about-banner,
.privacy-banner,
.compare-banner,
.ranking-banner,
.review-banner,
.data-banner,
.default-banner {
  background: var(--black);
  color: var(--white);
  padding: 2.5rem var(--pad) 2rem;
  border-bottom: var(--border);
}

.about-h1,
.privacy-h1,
.compare-h1,
.ranking-h1,
.review-h1,
.data-h1,
.default-h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
}

.about-sub,
.compare-desc,
.ranking-desc,
.data-desc {
  margin-top: 0.75rem;
  color: #ccc;
  font-size: 0.95rem;
  max-width: 60ch;
}

.privacy-updated {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #bbb;
}

/* Review hero */
.review-banner {
  display: flex;
  flex-direction: column-reverse;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.review-banner.has-img .review-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.review-banner.has-img .review-hero-media .review-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.review-hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.5rem;
  margin-top: auto;
  padding: 2rem var(--pad);
}

.review-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
}

.review-eyebrow a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
}

.review-sub {
  color: #ccc;
  font-size: 0.9rem;
  max-width: 40ch;
  text-align: right;
}

/* =====================
   同栏目推荐
   ===================== */
.sibling-zone {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad) 2rem;
}

.sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.sibling-link {
  display: inline-block;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  text-decoration: none;
  color: var(--black);
  transition: background 0.12s, transform 0.1s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sibling-link:hover {
  background: var(--blue);
  transform: translate(-2px, -2px);
}

/* =====================
   页脚
   ===================== */
.site-footer {
  display: flex;
  gap: 0;
  background: var(--black);
  border-top: var(--border);
  padding: 2rem var(--pad);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-dl {
  flex: 1;
  min-width: 140px;
}

.footer-dl dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0.3rem;
}

.footer-dl dd {
  margin: 0;
  padding: 0.2rem 0;
}

.footer-dl dd a {
  color: #ccc;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-dl dd a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--red);
  border-top: var(--border);
  padding: 0.6rem var(--pad);
  font-size: 0.82rem;
  font-weight: 700;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  color: var(--black);
}

.footer-policy {
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--black);
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
}

.footer-policy:hover {
  background: var(--black);
  color: var(--red);
}

/* =====================
   Scroll Reveal 动效
   ===================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.45s ease calc(var(--i, 0) * 0.08s),
      transform 0.45s ease calc(var(--i, 0) * 0.08s);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* =====================
   移动端适配
   ===================== */
@media (max-width: 640px) {
  :root {
    --nav-h: 56px;
    --pad: 1rem;
  }

  .hero {
    min-height: 45vh;
  }

  .hero-h1 {
    font-size: 1.5rem;
  }

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

  .rank-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .rank-arrow {
    margin-left: auto;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .site-footer {
    flex-direction: column;
    gap: 1.25rem;
  }

  .footer-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }

  .review-hero-text {
    align-items: flex-start;
    text-align: left;
  }

  .review-sub {
    text-align: left;
  }

  .hero-text {
    align-items: flex-start;
    text-align: left;
  }

  .hero-h1 {
    text-align: left;
  }

  .hero-desc {
    text-align: left;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================
   print
   ===================== */
@media print {
  .site-header,
  .footer-bar,
  .site-footer {
    display: none;
  }
}
