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

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

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

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1A1A2E;
  background: #F5F5F5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #FF4D6D;
  text-decoration: none;
  transition: color 150ms ease, opacity 150ms ease;
}
a:hover {
  color: #1A1A2E;
  opacity: 0.85;
}

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

ol, ul {
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  color: #1A1A2E;
}

hr {
  border: none;
  border-top: 2px solid #FF4D6D;
  margin: 0.5rem 0 1rem 0;
}

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

/* ===== 导航 ===== */
.site-nav {
  background: #1A1A2E;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 1.5rem;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-left {
  justify-content: flex-end;
}

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

.nav-list li a {
  display: block;
  color: #F5F5F5;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 0.7rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 2px;
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li a[aria-current="page"] {
  background: #FF4D6D;
  color: #fff;
}

.nav-brand {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0 1.5rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
  min-height: 40px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: #FF4D6D;
  opacity: 1;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumb a {
  color: #FF4D6D;
}

.bc-sep {
  color: #bbb;
  padding: 0 0.1rem;
}

/* ===== 侧边导航 ===== */
.aside-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-nav li a {
  display: block;
  color: #1A1A2E;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid transparent;
  transition: border-color 150ms, background 150ms;
  border-radius: 0 2px 2px 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav li a:hover {
  border-left-color: #FF4D6D;
  background: rgba(255, 77, 109, 0.07);
  color: #FF4D6D;
}

/* ===== HERO（首页）===== */
.hero-section {
  position: relative;
  height: 45vh;
  min-height: 260px;
  overflow: hidden;
  background: #1A1A2E;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-placeholder {
  background: linear-gradient(135deg, #1A1A2E 60%, #FF4D6D 100%);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(26, 26, 46, 0.55);
  border-radius: 4px;
  max-width: 600px;
  width: 90%;
}

.hero-h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.hero-sub {
  color: rgba(245, 245, 245, 0.85);
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== 首页内容区 ===== */
.home-content {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.home-aside {
  flex: 0 0 200px;
  min-width: 0;
}

.home-aside h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1A1A2E;
  margin-bottom: 0.4rem;
}

.home-main-content {
  flex: 1;
  min-width: 0;
}

/* ===== 话题卡片区 ===== */
.topics-section {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

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

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
  border: 2px solid #1A1A2E;
  border-radius: 18px;
  padding: 1.25rem 1rem;
  color: #1A1A2E;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
  min-height: 40px;
}

.topic-card:hover {
  background: #FF4D6D;
  border-color: #FF4D6D;
  color: #fff;
  transform: translateY(-2px);
}

.topic-card strong {
  font-size: 1rem;
  font-weight: 600;
  display: block;
}

.topic-card:hover strong,
.topic-card:hover .card-desc,
.topic-card:hover .card-count {
  color: #fff;
}

.card-desc {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.5;
}

.card-count {
  font-size: 0.78rem;
  color: #FF4D6D;
  font-weight: 500;
  margin-top: auto;
}

/* ===== 子页（文章）卡片 ===== */
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #fff;
  border: 2px solid #1A1A2E;
  border-radius: 18px;
  padding: 1rem;
  color: #1A1A2E;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.child-card:hover {
  background: #1A1A2E;
  border-color: #1A1A2E;
  color: #F5F5F5;
  transform: translateY(-2px);
}

.child-card:hover strong,
.child-card:hover .card-desc,
.child-card:hover .card-date {
  color: #F5F5F5;
}

.child-card strong {
  font-size: 0.95rem;
  font-weight: 600;
}

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

/* ===== 话题页 ===== */
.topic-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topic-hero-section {
  background: #1A1A2E;
  display: flex;
  align-items: stretch;
}

.topic-hero-fig {
  flex: 1;
  margin: 0;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.topic-hero-bg {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    #FF4D6D 0px, #FF4D6D 2px,
    transparent 2px, transparent 24px
  );
  opacity: 0.15;
}

.topic-aside {
  background: #fff;
  width: 220px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
  border-left: 4px solid #FF4D6D;
}

.topic-aside h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.topic-content-section {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.topic-body .topic-h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
}

.topic-desc {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.topic-children-section {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

/* ===== 文章页 ===== */
.article-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-top-section {
  background: #1A1A2E;
  display: flex;
  align-items: stretch;
  min-height: 140px;
}

.article-hero-figure {
  flex: 1;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.article-hero-placeholder {
  background: repeating-linear-gradient(
    -45deg,
    #1A1A2E 0px, #1A1A2E 8px,
    #FF4D6D 8px, #FF4D6D 10px
  );
  min-height: 140px;
}

.article-aside {
  background: #fff;
  width: 220px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
  border-left: 4px solid #FF4D6D;
}

.article-aside h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.article-body-section {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.article-h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
  color: #1A1A2E;
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.article-date {
  font-size: 0.82rem;
  color: #888;
}

.mod-date {
  opacity: 0.75;
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
}

.article-related-section {
  max-width: 860px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

.related-aside {
  margin-bottom: 1.5rem;
}

.related-aside h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.related-list li a {
  display: block;
  color: #1A1A2E;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 150ms;
}

.related-list li a:hover {
  color: #FF4D6D;
}

.article-nav-figure {
  margin: 0;
}

.article-nav-figure figcaption {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.back-to-topic {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  background: #1A1A2E;
  color: #fff;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 150ms;
}

.back-to-topic:hover {
  background: #FF4D6D;
  color: #fff;
  opacity: 1;
}

/* ===== 关于页 ===== */
.about-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.about-header-section {
  background: #FF4D6D;
  display: flex;
  align-items: stretch;
  min-height: 120px;
}

.about-deco-figure {
  flex: 1;
  margin: 0;
  overflow: hidden;
}

.about-deco-block {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 1px,
    transparent 1px, transparent 40px
  );
}

.about-aside {
  background: #1A1A2E;
  width: 220px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
}

.about-aside h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  color: #F5F5F5;
}

.about-aside hr {
  border-top-color: #FF4D6D;
}

.about-aside .aside-nav li a {
  color: #F5F5F5;
}

.about-aside .aside-nav li a:hover {
  color: #FF4D6D;
  background: rgba(255,255,255,0.05);
}

.about-content-section {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.about-h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 1.25rem;
}

.about-topics-section {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

.about-topics-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

/* ===== 隐私政策页 ===== */
.privacy-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.privacy-header-section {
  background: #1A1A2E;
  display: flex;
  align-items: stretch;
  min-height: 100px;
}

.privacy-deco-figure {
  flex: 1;
  margin: 0;
}

.privacy-deco-block {
  width: 100%;
  height: 100%;
  min-height: 100px;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 77, 109, 0.12) 0px, rgba(255, 77, 109, 0.12) 1px,
    transparent 1px, transparent 20px
  );
}

.privacy-aside {
  background: #fff;
  width: 220px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
  border-left: 4px solid #FF4D6D;
}

.privacy-aside h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.privacy-content-section {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.privacy-h1 {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  margin-bottom: 0.5rem;
}

.privacy-back-section {
  max-width: 860px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

.privacy-back-figure {
  margin: 0;
}

.privacy-back-figure figcaption {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  background: #FF4D6D;
  color: #fff;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 150ms;
}

.back-link:hover {
  background: #1A1A2E;
  color: #fff;
  opacity: 1;
}

/* ===== 正文内容通用 ===== */
.page-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a3e;
}

.page-content h2 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.3rem;
}

.page-content h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.3rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content ol {
  list-style: decimal;
}

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

.page-content a {
  color: #FF4D6D;
  text-decoration: underline;
}

.page-content blockquote {
  border-left: 4px solid #FF4D6D;
  padding-left: 1rem;
  color: #555;
  margin: 1.25rem 0;
  font-style: italic;
}

.page-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.page-content th, .page-content td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.page-content th {
  background: #1A1A2E;
  color: #fff;
}

/* ===== 页脚 ===== */
footer {
  background: #1A1A2E;
  color: #F5F5F5;
  margin-top: auto;
}

.footer-brand-section {
  text-align: center;
  padding: 2rem 1.5rem 0.5rem;
}

.footer-brand {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.footer-links-section {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

.footer-links-section a {
  color: rgba(245, 245, 245, 0.7);
  font-size: 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 150ms;
}

.footer-links-section a:hover {
  color: #FF4D6D;
  opacity: 1;
}

.footer-copy-section {
  text-align: center;
  padding: 0.75rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245, 245, 245, 0.45);
}

/* ===== 默认页 ===== */
.default-section {
  display: flex;
  gap: 0;
  min-height: 120px;
  background: #1A1A2E;
}

.default-aside {
  background: #fff;
  width: 220px;
  flex-shrink: 0;
  padding: 1.25rem 1rem;
  border-right: 4px solid #FF4D6D;
}

.default-aside h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.default-figure {
  flex: 1;
  margin: 0;
}

.default-deco {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: #1A1A2E;
}

.default-content-section {
  max-width: 860px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  width: 100%;
}

.default-content-section h1 {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  margin-bottom: 1.25rem;
}

/* ===== Scroll Reveal 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .topic-card,
  .child-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 200ms ease, transform 200ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  .topic-card.revealed,
  .child-card.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .topic-card:hover,
  .child-card:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic-card,
  .child-card {
    opacity: 1;
    transform: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .site-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
    position: sticky;
    top: 0;
  }

  .nav-brand {
    order: -1;
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0;
    font-size: 1rem;
  }

  .nav-left, .nav-right {
    flex: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1rem;
  }

  .nav-list li a {
    font-size: 0.75rem;
    padding: 0.5rem 0.4rem;
  }

  .home-content {
    flex-direction: column;
    margin: 1.5rem auto;
  }

  .home-aside {
    flex: none;
    width: 100%;
  }

  .topic-grid,
  .children-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topic-hero-section,
  .article-top-section,
  .about-header-section,
  .privacy-header-section {
    flex-direction: column;
  }

  .topic-aside,
  .article-aside,
  .about-aside,
  .privacy-aside {
    width: 100%;
    border-left: none;
    border-top: 4px solid #FF4D6D;
  }

  .about-aside {
    border-top-color: #FF4D6D;
  }

  .topic-hero-fig,
  .article-hero-figure,
  .about-deco-figure,
  .privacy-deco-figure {
    min-height: 80px;
  }

  .default-section {
    flex-direction: column;
  }

  .default-aside {
    width: 100%;
    border-right: none;
    border-bottom: 4px solid #FF4D6D;
  }

  .hero-section {
    height: 45vh;
    min-height: 220px;
  }

  .topic-content-section,
  .article-body-section,
  .about-content-section,
  .privacy-content-section,
  .default-content-section,
  .topic-children-section,
  .article-related-section,
  .about-topics-section,
  .topics-section,
  .privacy-back-section {
    padding: 0 1rem;
  }

  .footer-brand {
    font-size: clamp(1.5rem, 10vw, 3rem);
  }
}

@media (max-width: 480px) {
  .topic-grid,
  .children-grid {
    grid-template-columns: 1fr;
  }

  .nav-list li a {
    font-size: 0.72rem;
    padding: 0.45rem 0.35rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}
