@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #1f2617;
  color: #e8f5d0;
}

body {
  font-family: 'Didact Gothic', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.7;
  background: #1f2617;
  color: #e8f5d0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== CSS 变量 ===== */
:root {
  --primary: #80ff00;
  --secondary: #00ff00;
  --dark: #1f2617;
  --dark2: #232b18;
  --dark3: #2a321e;
  --text: #e8f5d0;
  --text-dim: #a0b870;
  --border: #80ff00;
  --radius: 4px;
  --header-h: 64px;
  --anchor-h: 44px;
}

/* ===== 页面容器 ===== */
.page-wrap {
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(31, 38, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
}

.brand-corner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-text-icon {
  font-family: 'Poiret One', cursive;
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1;
}

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

.nav-pills-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.nav-pills-wrap::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1rem;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  text-decoration: none;
  font-family: 'Poiret One', cursive;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, transform 0.15s;
  min-height: 40px;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: var(--primary);
  color: var(--dark);
  transform: rotate(-1.5deg) scale(1.05);
  outline: none;
}

/* 汉堡按钮（移动端） */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* 移动端导航抽屉 */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--dark2);
  border-bottom: 2px solid var(--primary);
  z-index: 999;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  padding: 1rem 1.5rem;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  display: block;
  padding: 0.7rem 0;
  color: var(--primary);
  text-decoration: none;
  font-family: 'Poiret One', cursive;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(128,255,0,0.15);
  min-height: 44px;
  line-height: 1.4;
}

.mobile-nav-link:hover {
  color: var(--secondary);
}

/* ===== 粘性锚点条 ===== */
.sticky-anchor-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  background: var(--dark);
  border-bottom: 1px solid rgba(128,255,0,0.3);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar {
  display: none;
}

.anchor-track {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 1.5rem;
  min-width: max-content;
}

.anchor-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(128,255,0,0.4);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.78rem;
  white-space: nowrap;
  min-height: 32px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.anchor-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(128,255,0,0.07);
}

/* scroll-margin-top for all sections */
div[id] {
  scroll-margin-top: calc(var(--header-h) + var(--anchor-h) + 8px);
}

/* ===== Hero 满屏 ===== */
.hero-fullscreen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
}

/* 点阵底纹 */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(128,255,0,0.25) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
  animation: gridPulse 6s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* 贴纸装饰 */
.hero-sticker {
  position: absolute;
  font-family: 'Poiret One', cursive;
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  border: 2px solid var(--primary);
  border-radius: 3px;
  color: var(--primary);
  background: var(--dark);
  letter-spacing: 0.1em;
  z-index: 1;
  animation: jitter 4s ease-in-out infinite;
}

.sticker-a {
  top: 18%;
  left: 8%;
  transform: rotate(-7deg);
  animation-delay: 0s;
}

.sticker-b {
  top: 25%;
  right: 10%;
  transform: rotate(5deg);
  animation-delay: 1.3s;
  border-color: var(--secondary);
  color: var(--secondary);
}

.sticker-c {
  bottom: 22%;
  left: 12%;
  transform: rotate(3deg);
  animation-delay: 2.1s;
}

@keyframes jitter {
  0%, 100% { transform: rotate(-7deg) translate(0, 0); }
  25% { transform: rotate(-5deg) translate(2px, -2px); }
  50% { transform: rotate(-8deg) translate(-1px, 1px); }
  75% { transform: rotate(-6deg) translate(1px, -1px); }
}

.sticker-b {
  animation: jitterB 4s ease-in-out infinite 1.3s;
}

@keyframes jitterB {
  0%, 100% { transform: rotate(5deg) translate(0, 0); }
  33% { transform: rotate(6deg) translate(-2px, 1px); }
  66% { transform: rotate(4deg) translate(1px, -2px); }
}

.sticker-c {
  animation: jitterC 4s ease-in-out infinite 2.1s;
}

@keyframes jitterC {
  0%, 100% { transform: rotate(3deg) translate(0, 0); }
  40% { transform: rotate(4deg) translate(-1px, 2px); }
  80% { transform: rotate(2deg) translate(2px, -1px); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  border: 1px solid rgba(128,255,0,0.3);
  border-radius: 999px;
  padding: 0.25rem 1rem;
  margin-bottom: 1.5rem;
  font-family: 'Didact Gothic', sans-serif;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Poiret One', cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 1.05;
  color: var(--primary);
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 24px rgba(128,255,0,0.35));
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(128,255,0,0.3)); }
  50% { filter: drop-shadow(0 0 40px rgba(128,255,0,0.6)); }
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: var(--dark);
  font-family: 'Poiret One', cursive;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid var(--primary);
  min-height: 44px;
  transition: transform 0.15s, box-shadow 0.15s;
  font-weight: 700;
}

.btn-primary:hover {
  transform: scale(1.06) rotate(-1deg);
  box-shadow: 0 0 20px rgba(128,255,0,0.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--primary);
  font-family: 'Poiret One', cursive;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid var(--primary);
  min-height: 44px;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.btn-ghost:hover {
  background: var(--primary);
  color: var(--dark);
  transform: scale(1.04) rotate(1deg);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: fadeInUp 1s ease 1s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50% { transform: rotate(45deg) translate(3px, 3px); opacity: 0.5; }
}

/* ===== 跑马灯 ===== */
.marquee-bar {
  background: var(--primary);
  color: var(--dark);
  overflow: hidden;
  padding: 0.55rem 0;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}

.marquee-track {
  display: inline-flex;
  gap: 2.5rem;
  animation: marqueeScroll 20s linear infinite;
  font-family: 'Poiret One', cursive;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.marquee-track span {
  display: inline-block;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== 主内容区 ===== */
.main-content {
  padding: 3rem 1.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

/* ===== article > div 结构 ===== */
.content-article {
  min-width: 0;
}

.content-section {
  /* div 直接子元素是 article 的直接子元素 */
}

/* ===== 正文内容样式 ===== */
.page-content-section h2 {
  font-family: 'Poiret One', cursive;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--primary);
  margin: 2.5rem 0 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary);
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.page-content-section h2:first-child {
  margin-top: 0;
}

.page-content-section .subtitle,
.page-content-section .subhead,
.page-content-section .desc,
.page-content-section .lead {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 1.2rem;
  margin-top: 0.2rem;
  line-height: 1.7;
}

.page-content-section h3 {
  font-family: 'Poiret One', cursive;
  font-size: 1.3rem;
  color: var(--secondary);
  margin: 1.8rem 0 0.6rem;
}

.page-content-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--text);
}

.page-content-section ul,
.page-content-section ol {
  margin: 0.8rem 0 1rem 1.5rem;
}

.page-content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.page-content-section strong {
  color: var(--primary);
  font-weight: 700;
}

.page-content-section a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content-section a:hover {
  color: var(--primary);
}

/* div 块分隔 */
.page-content-section div {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(128,255,0,0.12);
  position: relative;
  /* Scroll reveal */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-content-section div.revealed {
  opacity: 1;
  transform: translateY(0);
}

.page-content-section div:last-child {
  border-bottom: none;
}

/* 贴纸感描边卡片 */
.page-content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-content-section th {
  background: var(--primary);
  color: var(--dark);
  padding: 0.6rem 1rem;
  font-family: 'Poiret One', cursive;
  text-align: left;
}

.page-content-section td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(128,255,0,0.15);
}

.page-content-section tr:last-child td {
  border-bottom: none;
}

/* ===== 侧边栏 ===== */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + var(--anchor-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.aside-card {
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--dark2);
  position: relative;
}

.aside-title {
  font-family: 'Poiret One', cursive;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(128,255,0,0.25);
  padding-bottom: 0.4rem;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aside-links li {
  margin-bottom: 0.4rem;
}

.aside-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s, padding-left 0.15s;
  display: block;
  padding: 0.25rem 0;
  min-height: 36px;
  line-height: 1.4;
}

.aside-link:hover {
  color: var(--primary);
  padding-left: 6px;
}

.aside-tip {
  border-style: dashed;
  border-color: var(--secondary);
  transform: rotate(0.5deg);
}

.aside-tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--dark);
  font-family: 'Poiret One', cursive;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

.aside-tip p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.aside-badge {
  text-align: center;
  transform: rotate(-0.8deg);
  border-color: #ff3366;
}

.badge-num {
  font-family: 'Poiret One', cursive;
  font-size: 2.5rem;
  color: #ff3366;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.badge-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--dark2);
  border-top: 2px solid var(--primary);
  padding: 3rem 1.5rem 1.5rem;
}

/* footer > nav > dl > dt/dd > a 结构 */
.footer-nav-dl {
  display: none; /* 仅满足结构要求，视觉上用 footer-cols 呈现 */
}

.footer-nav-dl dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-nav-dl dt,
.footer-nav-dl dd {
  display: inline;
}

.footer-nav-dl a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.3rem;
}

/* footer 三列 dl 并排 */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-col {
  /* dl */
}

.footer-col-title {
  font-family: 'Poiret One', cursive;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(128,255,0,0.2);
  padding-bottom: 0.4rem;
  display: block;
}

.footer-col dd {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.footer-col dd a {
  color: var(--text-dim);
  text-decoration: none;
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
  transition: color 0.15s;
}

.footer-col dd a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(128,255,0,0.15);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.footer-disclaimer {
  color: rgba(128,255,0,0.4);
  font-size: 0.78rem;
}

/* ===== Scroll Reveal ===== */
.reveal-target {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-target.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Parallax ===== */
.hero-dot-grid {
  will-change: transform;
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr 240px;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 58px;
  }

  .nav-pills-wrap {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .aside-badge {
    grid-column: span 2;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }

  .sticker-a,
  .sticker-b,
  .sticker-c {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .sticker-a { left: 3%; top: 14%; }
  .sticker-b { right: 3%; top: 20%; }
  .sticker-c { left: 4%; bottom: 18%; }

  .main-content {
    padding: 2rem 1rem 3rem;
  }
}

@media (max-width: 480px) {
  .content-aside {
    grid-template-columns: 1fr;
  }

  .aside-badge {
    grid-column: span 1;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .anchor-track {
    padding: 0.4rem 1rem;
  }
}

/* ===== 无横向滚动保护 ===== */
body, .page-wrap {
  overflow-x: hidden;
}

/* ===== Mix blend mode 装饰 ===== */
.hero-sticker {
  mix-blend-mode: screen;
}

.hero-dot-grid {
  mix-blend-mode: overlay;
}
