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

/* ===== 重置与基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Baloo 2', 'Comic Neue', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===== 公告条 ===== */
.announce-bar {
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 1rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid #000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #000;
  letter-spacing: -0.02em;
  background: #000;
  color: #fff;
  padding: 0.2rem 0.7rem;
}

/* 药丸胶囊导航 */
.site-header nav {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-header nav::-webkit-scrollbar {
  display: none;
}

.site-header nav > p {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  min-height: 40px;
  background: transparent;
  color: #000;
  border: 1.5px solid #000;
  border-radius: 999px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-pill:hover,
.nav-pill.active {
  background: #000;
  color: #fff;
}

/* ===== 主内容 ===== */
main {
  flex: 1;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Hero区 ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid #000;
  /* 点阵底纹 */
  background-image: radial-gradient(circle, #000 1px, transparent 1px);
  background-size: 22px 22px;
  background-color: #fff;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: rgba(255,255,255,0.88);
  border: 2px solid #000;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 1rem;
  border: 1.5px solid #000;
  display: inline-block;
  padding: 0.25rem 0.75rem;
}

.hero-content h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #000;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #000;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  min-height: 48px;
  background: #000;
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid #000;
  transition: background 0.22s, color 0.22s;
}

.btn-primary:hover {
  background: #fff;
  color: #000;
}

/* ===== 带aside的内容区 ===== */
.content-section {
  padding: 3rem 0;
}

.content-section.with-aside {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ===== Aside侧边栏（内容左侧） ===== */
aside.aside-nav {
  position: sticky;
  top: 90px;
  border: 2px solid #000;
  padding: 1.25rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aside-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1.5px solid #000;
  padding-bottom: 0.4rem;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
}

.aside-title:first-child {
  margin-top: 0;
}

aside.aside-nav a {
  color: #000;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 0.25rem 0;
  border-bottom: 1px solid #eee;
  transition: letter-spacing 0.2s;
  display: block;
}

aside.aside-nav a:hover {
  letter-spacing: 0.03em;
  border-bottom-color: #000;
}

/* ===== 页面正文 ===== */
.page-content {
  min-width: 0;
}

.page-content h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  border-left: 4px solid #000;
  padding-left: 0.75rem;
}

.page-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}

.page-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.page-content ul,
.page-content ol {
  margin: 0.8rem 0 1rem 1.4rem;
  line-height: 1.75;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.page-content a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content a:hover {
  text-decoration-thickness: 2px;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.page-content th,
.page-content td {
  border: 1.5px solid #000;
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.page-content th {
  background: #000;
  color: #fff;
  font-weight: 700;
}

.page-content tr:nth-child(even) td {
  background: #f7f7f7;
}

time {
  font-size: 0.82rem;
  color: #555;
  font-weight: 500;
}

/* ===== 卡片区 ===== */
.cards-section {
  padding: 3rem 0;
  border-top: 2px solid #000;
}

.cards-section > h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.cards-section > .subtitle {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 2rem;
}

.cards-section {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0;
}

.cards-section > h2,
.cards-section > .subtitle,
.cards-section > .aside-nav {
  grid-column: 1 / -1;
}

/* 卡片网格 */
.cards-section > article.card {
  border: 1.5px solid #000;
  border-radius: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.22s, transform 0.22s;
  margin-bottom: -1.5px;
}

.cards-section > article.card:hover {
  background: #000;
  color: #fff;
}

.cards-section > article.card:hover .card-link,
.cards-section > article.card:hover a {
  color: #fff;
}

.card-inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  display: inline-block;
  padding: 0.15rem 0.55rem;
  width: fit-content;
}

.card-inner h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-inner h3 a {
  text-decoration: none;
  color: inherit;
}

.card-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #000;
  letter-spacing: 0.04em;
  margin-top: auto;
}

/* 让卡片按3列排布（大屏） */
@media (min-width: 768px) {
  .cards-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .cards-section > h2,
  .cards-section > .subtitle,
  .cards-section > .aside-nav,
  .cards-section > aside {
    grid-column: 1 / -1;
  }
  .cards-section > article.card {
    margin: 0;
    border-right-width: 0;
  }
  .cards-section > article.card:nth-child(3n) {
    border-right-width: 1.5px;
  }
}

/* ===== 各页头部 ===== */
.review-header-section,
.compare-header-section,
.ranking-header-section,
.about-hero-section,
.page-header-section {
  padding: 3rem 0 2rem;
  border-bottom: 2px solid #000;
}

.review-header-inner,
.compare-header-inner,
.ranking-header-inner,
.about-hero-inner,
.page-header-inner {
  max-width: 720px;
}

.review-header-inner h1,
.compare-header-inner h1,
.ranking-header-inner h1,
.about-hero-inner h1,
.page-header-inner h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.subtitle {
  font-size: 1rem;
  color: #333;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.breadcrumb {
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.breadcrumb a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.review-meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.meta-item {
  font-size: 0.82rem;
  color: #555;
}

.hero-img-wrap {
  margin-top: 1.5rem;
  border: 2px solid #000;
  overflow: hidden;
  max-width: 560px;
}

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

/* ===== 榜单/FAQ特化 ===== */
.ranking-content ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ranking;
}

.ranking-content ol > li {
  counter-increment: ranking;
  padding: 1rem 1rem 1rem 3.5rem;
  position: relative;
  border: 1.5px solid #000;
  margin-bottom: -1.5px;
  background: #fff;
  transition: background 0.2s;
}

.ranking-content ol > li:hover {
  background: #f5f5f5;
}

.ranking-content ol > li::before {
  content: counter(ranking, decimal-leading-zero);
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
  line-height: 1;
}

/* ===== 页脚 ===== */
footer {
  border-top: 2px solid #000;
  background: #000;
  color: #fff;
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  align-items: start;
}

.footer-brand {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.6;
  grid-column: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: flex-end;
  grid-column: 2;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s;
}

.footer-links a:hover {
  border-bottom-color: #fff;
}

footer small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* ===== Scroll Reveal 动效 ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ===== 断点：平板 ===== */
@media (max-width: 900px) {
  .content-section.with-aside {
    grid-template-columns: 1fr;
  }
  aside.aside-nav {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  .aside-title {
    width: 100%;
    margin-top: 0.3rem;
  }
  aside.aside-nav a {
    border: 1.5px solid #000;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 999px;
    border-bottom: 1.5px solid #000;
  }
}

/* ===== 断点：移动端 ===== */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .header-inner {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
  }

  .site-header nav > p {
    gap: 0.3rem;
  }

  .nav-pill {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .wrap {
    padding: 0 1rem;
  }

  .hero-section {
    min-height: 70vh;
  }

  .hero-content {
    padding: 2.5rem 1.25rem;
    margin: 1rem;
  }

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

  .cards-section > article.card {
    border-right-width: 1.5px !important;
  }

  footer {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 1.2rem;
  }

  .footer-links {
    grid-column: 1;
    justify-content: flex-start;
  }

  .footer-links a {
    min-height: 40px;
  }

  footer small {
    grid-column: 1;
  }

  .review-meta {
    gap: 0.6rem;
  }

  .page-content h2 {
    font-size: 1.3rem;
  }
}
