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

/* ============================
   CSS 变量 & 重置
   ============================ */
:root {
  --bg: #1a1a2e;
  --bg2: #16213e;
  --bg3: #0f3460;
  --accent: #e94560;
  --amber: #f5a623;
  --white: #f0f0f5;
  --muted: rgba(240,240,245,0.55);
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.12);
  --radius: 4px;
  --radius-lg: 12px;
  --bar-h: 64px;
  --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --max-w: 1100px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: var(--bar-h);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--amber); }
ul, menu { list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; }

/* ============================
   全屏遮罩导航 (details/summary)
   ============================ */
.nav-overlay {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
}

.nav-overlay summary {
  list-style: none;
  position: fixed;
  top: 12px; left: 16px;
  z-index: 300;
  cursor: pointer;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.nav-overlay summary::-webkit-details-marker { display: none; }

.burger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.burger-icon span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-overlay[open] summary .burger-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-overlay[open] summary .burger-icon span:nth-child(2) { opacity: 0; }
.nav-overlay[open] summary .burger-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 210;
}

.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.overlay-menu li { width: 100%; text-align: center; }

.overlay-menu li a {
  display: block;
  padding: 18px 24px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--glass-border);
  transition: color var(--transition), background var(--transition);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-menu li a:hover {
  color: var(--accent);
  background: rgba(233,69,96,0.08);
}

/* 逐字动效 —— 遮罩菜单出现时 */
.nav-overlay[open] .overlay-menu li a {
  animation: slideInUp 0.4s both;
}
.nav-overlay[open] .overlay-menu li:nth-child(1) a { animation-delay: 0.05s; }
.nav-overlay[open] .overlay-menu li:nth-child(2) a { animation-delay: 0.1s; }
.nav-overlay[open] .overlay-menu li:nth-child(3) a { animation-delay: 0.15s; }
.nav-overlay[open] .overlay-menu li:nth-child(4) a { animation-delay: 0.2s; }
.nav-overlay[open] .overlay-menu li:nth-child(5) a { animation-delay: 0.25s; }
.nav-overlay[open] .overlay-menu li:nth-child(6) a { animation-delay: 0.3s; }
.nav-overlay[open] .overlay-menu li:nth-child(7) a { animation-delay: 0.35s; }

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

/* ============================
   底部固定导航条
   ============================ */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bar-h);
  background: rgba(22,33,62,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-head);
  padding: 8px 4px;
  min-height: 44px;
  transition: color var(--transition);
  border: none;
  background: none;
  cursor: pointer;
}

.bar-item svg { flex-shrink: 0; }

.bar-item:hover, .bar-item.active { color: var(--accent); }

.bar-item.bar-cta {
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), #b5223c);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: 0 2px;
  min-width: 64px;
  box-shadow: 0 0 20px rgba(233,69,96,0.5);
}
.bar-item.bar-cta:hover { background: linear-gradient(135deg, var(--amber), #d4861a); color: var(--bg); }

/* ============================
   Hero 区块
   ============================ */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 0%, rgba(233,69,96,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 10% 80%, rgba(245,166,35,0.12) 0%, transparent 55%),
              var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.02) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.02) 40px);
  pointer-events: none;
}

.hero-text { position: relative; z-index: 2; max-width: 760px; }

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--amber);
  backdrop-filter: blur(6px);
}

/* Cat Hero */
.cat-hero {
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  padding: 100px 24px 48px;
  background: radial-gradient(ellipse at 80% 50%, rgba(233,69,96,0.15) 0%, transparent 60%), var(--bg2);
  position: relative;
}
.cat-hero-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; }

/* Art Hero */
.art-hero {
  padding: 96px 24px 40px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--glass-border);
}
.art-hero-inner { max-width: var(--max-w); margin: 0 auto; }

/* About / Privacy Hero */
.about-hero, .privacy-hero {
  padding: 96px 24px 48px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,166,35,0.12) 0%, transparent 60%), var(--bg2);
  text-align: center;
}
.about-hero-inner, .privacy-hero-inner { max-width: 700px; margin: 0 auto; }

/* ============================
   Kinetic Title
   ============================ */
.kinetic-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--white) 30%, var(--accent) 70%, var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite alternate;
  margin: 16px 0;
}

@keyframes gradientShift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(20deg); }
}

.hero-sub, .cat-desc, .about-sub, .privacy-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ============================
   眉毛标签 & Neon
   ============================ */
.eyebrow-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.neon-tag {
  background: rgba(233,69,96,0.15);
  border: 1px solid rgba(233,69,96,0.5);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(233,69,96,0.6);
  box-shadow: 0 0 12px rgba(233,69,96,0.2);
}

/* ============================
   CTA 按钮
   ============================ */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), #b5223c);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 24px rgba(233,69,96,0.45), 0 4px 16px rgba(0,0,0,0.4);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  min-height: 48px;
  margin-top: 8px;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(233,69,96,0.65), 0 8px 24px rgba(0,0,0,0.5);
  color: var(--white);
  background: linear-gradient(135deg, #f06070, var(--accent));
}

.neon-btn { background: transparent; border: 2px solid var(--accent); box-shadow: 0 0 16px rgba(233,69,96,0.4), inset 0 0 16px rgba(233,69,96,0.05); }
.neon-btn:hover { background: var(--accent); box-shadow: 0 0 32px rgba(233,69,96,0.7); }

/* ============================
   主容器 & 正文
   ============================ */
main {
  padding: 40px 24px 24px;
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  position: relative;
}

.wrap { max-width: var(--max-w); margin: 0 auto; }

.content-section { width: 100%; }

.page-article {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(240,240,245,0.9);
  max-width: 72ch;
}

.article-body h2 {
  font-size: 1.45rem;
  color: var(--white);
  margin: 2em 0 0.5em;
  font-family: var(--font-head);
}
.article-body h3 {
  font-size: 1.2rem;
  color: var(--amber);
  margin: 1.5em 0 0.4em;
  font-family: var(--font-head);
}
.article-body p { margin-bottom: 1em; }
.article-body ul, .article-body ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}
.article-body li { margin-bottom: 0.4em; }
.article-body a { color: var(--accent); }
.article-body a:hover { color: var(--amber); }
.article-body strong { color: var(--amber); font-weight: 700; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(233,69,96,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

/* ============================
   面包屑
   ============================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 80px 24px 16px;
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { color: rgba(240,240,245,0.3); }

/* ============================
   文章元数据
   ============================ */
.art-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.art-date {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-body);
}

/* ============================
   玻璃拟态卡片
   ============================ */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.glass-card:hover {
  border-color: rgba(233,69,96,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(233,69,96,0.18);
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  color: var(--white);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  display: block;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  line-height: 1.5;
}
.card-date {
  font-size: 0.75rem;
  color: rgba(245,166,35,0.7);
  font-family: var(--font-body);
  margin-top: auto;
}

/* ============================
   卡片网格
   ============================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* ============================
   栏目入口
   ============================ */
.cat-section, .featured-section {
  padding: 48px 24px;
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
}

.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-title {
  font-size: 1.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.neon-underline::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  border-radius: 2px;
  margin-top: 6px;
  box-shadow: 0 0 12px rgba(233,69,96,0.5);
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 20px;
}

/* 栏目 pill 导航（子页块 — 契约: a > strong） */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.cat-pill {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  min-height: 48px;
  backdrop-filter: blur(6px);
}

.cat-pill strong {
  color: var(--white);
  font-weight: 600;
  display: block;
}

.cat-pill:hover {
  border-color: var(--accent);
  background: rgba(233,69,96,0.1);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(233,69,96,0.2);
}
.cat-pill:hover strong { color: var(--accent); }

/* ============================
   aside 侧边栏
   ============================ */
.page-aside, .home-aside {
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  padding: 24px 24px 40px;
}

.page-aside h2, .home-aside h2 {
  font-size: 1.1rem;
  color: var(--amber);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 4px;
}

.aside-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.aside-nav ul li a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav ul li a:hover {
  color: var(--white);
  border-color: var(--glass-border);
  background: var(--glass-bg);
}

.aside-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rel-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  color: var(--white);
}

/* ============================
   About 统计卡片
   ============================ */
.about-stats {
  padding: 40px 24px;
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
}

.stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
}

.stat-plus {
  font-size: 1.6rem;
  color: var(--amber);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* ============================
   文章末尾导航
   ============================ */
.art-footer-nav {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition);
  min-height: 40px;
  padding: 8px 0;
}
.back-link:hover { color: var(--accent); }

/* ============================
   子页列表区块
   ============================ */
.children-grid {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

/* ============================
   页脚 (footer > article×n)
   ============================ */
footer {
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  padding: 48px 24px calc(var(--bar-h) + 24px);
  border-top: 1px solid var(--glass-border);
  display: block;
}

footer > article {
  display: block;
}

/* 三栏布局用 CSS Grid 实现 */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--amber);
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color var(--transition);
  display: inline-flex;
  min-height: 28px;
  align-items: center;
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  color: rgba(240,240,245,0.35);
  font-size: 0.8rem;
  line-height: 1.8;
}

.footer-bottom a { color: rgba(240,240,245,0.45); }
.footer-bottom a:hover { color: var(--accent); }

/* ============================
   动效：reveal-fade, stagger-list
   ============================ */
.reveal-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   @media
   ============================ */
@media (max-width: 768px) {
  .page-article { padding: 20px 18px; }
  .hero { padding: 88px 20px 64px; min-height: 70vh; }
  .cat-hero { min-height: 34vh; padding: 88px 20px 36px; }
  .art-hero { padding: 80px 20px 32px; }
  .about-hero, .privacy-hero { padding: 80px 20px 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; }
  .cat-section, .featured-section { padding: 36px 20px; }
  .article-body { max-width: 100%; }
  main { padding: 28px 16px 20px; }
  .breadcrumb { padding: 70px 16px 12px; }
  .cat-pills { gap: 8px; }
  .cat-pill { font-size: 0.88rem; padding: 12px 16px; }
}

@media (min-width: 900px) {
  /* 桌面: aside 在内容右侧 */
  .page-article-wrap main,
  .page-article-wrap .page-aside,
  .page-category main,
  .page-category .page-aside,
  .page-about main,
  .page-about .page-aside,
  .page-privacy main,
  .page-privacy .page-aside {
    display: block;
  }

  .page-article-wrap > main,
  .page-category > main,
  .page-about > main,
  .page-privacy > main {
    float: left;
    width: 68%;
    padding-right: 0;
  }

  .page-article-wrap > .page-aside,
  .page-category > .page-aside,
  .page-about > .page-aside,
  .page-privacy > .page-aside {
    float: right;
    width: 28%;
    padding-left: 0;
    padding-top: 40px;
  }

  .page-article-wrap::after,
  .page-category::after,
  .page-about::after,
  .page-privacy::after {
    content: '';
    display: table;
    clear: both;
  }
}

/* ============================
   reduced-motion
   ============================ */
@media (prefers-reduced-motion: reduce) {
  .reveal-fade, .stagger-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .kinetic-title {
    animation: none;
    filter: none;
  }
  .nav-overlay[open] .overlay-menu li a {
    animation: none;
  }
  .cta-btn:hover { transform: none; }
  .glass-card:hover { transform: none; }
}
