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

/* ===== CSS 变量 ===== */
:root {
  --c-primary: #69ff69;
  --c-cyan: #00ffff;
  --c-dark: #172617;
  --c-dark2: #0e1a0e;
  --c-dark3: #1e3a1e;
  --c-glass: rgba(105,255,105,0.07);
  --c-glass-border: rgba(105,255,105,0.22);
  --c-chrome: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 30%, #a0a0a0 60%, #d0d0d0 100%);
  --c-neon-shadow: 0 0 12px #69ff69, 0 0 30px rgba(105,255,105,0.4);
  --c-cyan-shadow: 0 0 12px #00ffff, 0 0 30px rgba(0,255,255,0.35);
  --font-main: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 64px;
  --radius-card: 4px;
  --radius-pill: 999px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-dark2);
  color: #d4f5d4;
}
body, .y2k-body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--c-dark2);
  color: #d4f5d4;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-cyan); }
ul, menu { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input { font-family: var(--font-main); }

/* ===== SITE WRAPPER ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14,26,14,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--c-glass-border);
  box-shadow: 0 -4px 32px rgba(105,255,105,0.12);
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 12px;
  gap: 8px;
}

.nav-pills-left,
.nav-pills-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-pills-right { justify-content: flex-end; }

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-glass-border);
  background: var(--c-glass);
  color: #b8f0b8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nav-pill:hover {
  background: rgba(105,255,105,0.18);
  color: var(--c-primary);
  box-shadow: var(--c-neon-shadow);
}

.brand-center {
  flex-shrink: 0;
}
.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo { height: 36px; width: auto; }
.brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
  text-shadow: var(--c-neon-shadow);
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 100px;
  display: block;
  text-align: center;
}

/* details/summary 展开菜单（移动端折叠态） */
.nav-details { display: none; }
.nav-details[open] { display: block; }
.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}
.nav-summary::-webkit-details-marker { display: none; }
.nav-brand-center { flex: 1; display: flex; justify-content: center; }
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}
.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--c-primary);
}

.nav-menu-expanded {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 16px;
  background: rgba(14,26,14,0.98);
  border-top: 1px solid var(--c-glass-border);
}
.nav-pill-expanded {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-glass-border);
  background: var(--c-glass);
  color: #b8f0b8;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.nav-pill-expanded:hover {
  background: rgba(105,255,105,0.18);
  color: var(--c-primary);
}

/* 搜索框 */
.nav-search-wrap {
  padding: 0 16px 10px;
  display: none;
}
.nav-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(105,255,105,0.06);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-pill);
  padding: 4px 8px 4px 12px;
}
.nav-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4f5d4;
  font-size: 0.9rem;
  height: 40px;
  min-width: 0;
}
.nav-search-input::placeholder { color: #5a8a5a; }
.nav-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: background 0.18s;
}
.nav-search-btn:hover {
  background: rgba(105,255,105,0.12);
}

/* Scroll offset for fixed bottom nav */
section[id] {
  scroll-margin-top: 20px;
  scroll-margin-bottom: calc(var(--nav-h) + 16px);
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, #1a3a1a 0%, var(--c-dark2) 60%),
              linear-gradient(135deg, var(--c-dark2) 0%, #0a1a1a 100%);
  padding: 60px 24px 80px;
}

.hero-slant {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-cyan), var(--c-primary));
  background-size: 200% 100%;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-chromebar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(135deg,
    rgba(105,255,105,0.08) 0%,
    rgba(0,255,255,0.05) 50%,
    rgba(105,255,105,0.08) 100%);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.hero-copy {
  text-align: right;
  max-width: 520px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
  text-shadow: var(--c-cyan-shadow);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-primary);
  text-shadow: var(--c-neon-shadow);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.05rem;
  color: #a0d0a0;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-cyan) 100%);
  color: var(--c-dark2);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: var(--c-neon-shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}
.hero-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 24px #69ff69, 0 0 60px rgba(105,255,105,0.5);
  color: var(--c-dark2);
}

.hero-illustration-wrap {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(105,255,105,0.5));
  border-radius: 50%;
}

.hero-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  color: var(--c-primary);
  font-size: 1rem;
  animation: sparkleAnim 2.5s ease-in-out infinite;
  text-shadow: var(--c-neon-shadow);
}
.s1 { top: 5%; left: 10%; animation-delay: 0s; }
.s2 { top: 15%; right: 8%; animation-delay: 0.6s; font-size: 0.7rem; color: var(--c-cyan); }
.s3 { bottom: 20%; left: 5%; animation-delay: 1.2s; font-size: 1.2rem; }
.s4 { bottom: 10%; right: 12%; animation-delay: 0.4s; font-size: 0.8rem; }

@keyframes sparkleAnim {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(20deg); }
}

/* ===== CONTENT WITH ASIDE ===== */
.content-with-aside {
  display: flex;
  flex-direction: row;
  gap: 28px;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 20px;
  width: 100%;
  align-items: flex-start;
}

/* ===== ASIDE ===== */
.page-aside {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: 20px;
}

.aside-card {
  background: var(--c-glass);
  border: 1.5px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(105,255,105,0.08);
}

.aside-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-cyan);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.aside-card hr {
  border: none;
  border-top: 1px solid var(--c-glass-border);
  margin-bottom: 14px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 3px;
  color: #a0d0a0;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
  line-height: 1.4;
}
.aside-link:hover {
  color: var(--c-primary);
  background: rgba(105,255,105,0.1);
}

.aside-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--c-primary);
  font-weight: 600;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  box-shadow: 0 0 8px var(--c-primary);
  animation: pulseDot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--c-primary); }
  50% { opacity: 0.5; box-shadow: 0 0 16px var(--c-primary); }
}

/* ===== MAIN / ARTICLE / SECTION ===== */
.page-main {
  flex: 1;
  min-width: 0;
}

.page-article {
  width: 100%;
}

.content-section {
  width: 100%;
}

/* 正文 HTML 内容样式 */
.content-section h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--c-primary);
  text-shadow: 0 0 8px rgba(105,255,105,0.3);
  margin: 48px 0 10px;
  letter-spacing: -0.01em;
}

.content-section h2 + hr {
  border: none;
  border-top: 1.5px solid var(--c-glass-border);
  margin-bottom: 20px;
  box-shadow: 0 1px 0 rgba(105,255,105,0.1);
}

.content-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-cyan);
  margin: 32px 0 8px;
}

.content-section h3 + hr {
  border: none;
  border-top: 1px solid rgba(0,255,255,0.2);
  margin-bottom: 16px;
}

.content-section p {
  margin-bottom: 16px;
  color: #c8e8c8;
  font-size: 1rem;
  line-height: 1.75;
}

.content-section ul,
.content-section ol {
  margin: 12px 0 20px 20px;
  color: #c8e8c8;
}

.content-section li {
  margin-bottom: 8px;
  line-height: 1.65;
  list-style: disc;
}

.content-section ol li {
  list-style: decimal;
}

.content-section a {
  color: var(--c-primary);
  text-decoration: underline;
  text-decoration-color: rgba(105,255,105,0.4);
  text-underline-offset: 3px;
  transition: color 0.18s;
}
.content-section a:hover {
  color: var(--c-cyan);
  text-decoration-color: var(--c-cyan);
}

.content-section strong {
  color: #e8ffe8;
  font-weight: 700;
}

.content-section em {
  color: var(--c-cyan);
  font-style: normal;
  font-weight: 600;
}

.content-section section {
  padding: 32px 0;
  border-bottom: 1px solid rgba(105,255,105,0.08);
}

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

/* 玻璃拟态块 */
.content-section blockquote {
  background: var(--c-glass);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 24px 0;
  color: #b8e8b8;
  font-style: italic;
  box-shadow: inset 0 0 20px rgba(105,255,105,0.05);
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.content-section th {
  background: rgba(105,255,105,0.12);
  color: var(--c-primary);
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--c-glass-border);
  font-weight: 700;
}

.content-section td {
  padding: 9px 14px;
  border: 1px solid rgba(105,255,105,0.1);
  color: #c8e8c8;
}

.content-section tr:nth-child(even) td {
  background: rgba(105,255,105,0.03);
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--c-glass-border);
  background: rgba(14,26,14,0.7);
  padding: 18px 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  color: var(--c-primary);
  font-size: 0.88rem;
  text-shadow: 0 0 6px rgba(105,255,105,0.4);
}

.footer-sep {
  color: #3a5a3a;
}

.site-footer section span {
  font-size: 0.82rem;
  color: #5a7a5a;
}

.footer-link {
  font-size: 0.78rem;
  color: #5a7a5a;
  transition: color 0.18s;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.footer-link:hover {
  color: var(--c-primary);
}

/* ===== STAGGER LIST ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
  .content-section section {
    animation: fadeInUp 0.5s ease both;
  }
  .content-section section:nth-child(1) { animation-delay: 0.05s; }
  .content-section section:nth-child(2) { animation-delay: 0.12s; }
  .content-section section:nth-child(3) { animation-delay: 0.19s; }
  .content-section section:nth-child(4) { animation-delay: 0.26s; }
  .content-section section:nth-child(5) { animation-delay: 0.33s; }
  .content-section section:nth-child(6) { animation-delay: 0.40s; }
  .content-section section:nth-child(7) { animation-delay: 0.47s; }

  .sparkle {
    animation: sparkleAnim 2.5s ease-in-out infinite;
  }

  .hero-slant {
    animation: gradientShift 4s linear infinite;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 响应式 ===== */

/* 桌面：底部导航条保持，details 隐藏 */
@media (min-width: 768px) {
  .nav-details { display: none !important; }
  .nav-bar-inner { display: flex; }
  .nav-search-wrap { display: block; padding: 0 16px 8px; }

  .content-with-aside {
    flex-direction: row;
  }

  .page-aside {
    display: block;
  }
}

/* 移动端 */
@media (max-width: 767px) {
  .nav-bar-inner { display: none !important; }
  .nav-details { display: block !important; }

  .nav-search-wrap {
    display: block;
  }

  .content-with-aside {
    flex-direction: column;
    padding: 0 16px;
    gap: 20px;
  }

  .page-aside {
    width: 100%;
    position: static;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .aside-link {
    background: var(--c-glass);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-end;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-illustration-wrap {
    width: 140px;
  }

  .hero-illustration {
    width: 120px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
  }

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

/* 极小屏 */
@media (max-width: 400px) {
  .hero-h1 { font-size: 1.6rem; }
  .hero-section { padding: 40px 16px 60px; }
}

/* ===== 装饰性背景纹理 ===== */
.y2k-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(105,255,105,0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0,255,255,0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.site-wrapper { position: relative; z-index: 1; }

/* ===== HR 全局样式 ===== */
hr {
  border: none;
  border-top: 1px solid var(--c-glass-border);
  margin: 16px 0;
}

/* ===== 选中色 ===== */
::selection {
  background: rgba(105,255,105,0.3);
  color: #fff;
}
