@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

/* ============================================================
   CSS 自定义属性
   ============================================================ */
:root {
  --green: #69ff69;
  --cyan: #00ffff;
  --dark: #172617;
  --dark2: #1e321e;
  --dark3: #0f1a0f;
  --green-dim: #3dcc3d;
  --cyan-dim: #00cccc;
  --white: #f0fff0;
  --white2: #d4ffd4;
  --card-bg: #1f3320;
  --card-bg2: #162816;
  --glass: rgba(105,255,105,0.07);
  --glass-border: rgba(105,255,105,0.18);
  --glow-green: 0 0 14px rgba(105,255,105,0.65), 0 0 40px rgba(105,255,105,0.25);
  --glow-cyan: 0 0 14px rgba(0,255,255,0.65), 0 0 40px rgba(0,255,255,0.25);
  --radius-card: 18px;
  --radius-btn: 50px;
  --nav-h: 64px;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;
  --scroll-mt: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--dark3);
  color: var(--white2);
  font-family: var(--font-body);
}

body.y2k-body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 0%, #1a3a1a 0%, var(--dark3) 55%),
              radial-gradient(ellipse at 80% 100%, #0d2a2a 0%, transparent 60%);
  background-color: var(--dark3);
  overflow-x: hidden;
  line-height: 1.65;
  font-size: 1rem;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }
img { display: block; max-width: 100%; height: auto; }
ul, menu { list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; }

article { scroll-margin-top: var(--scroll-mt); }

/* ============================================================
   页面骨架
   ============================================================ */
.page-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(15,26,15,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
}

/* 品牌图标 */
.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: var(--glow-green);
  transition: box-shadow 0.25s;
}
.brand-icon:hover { box-shadow: var(--glow-cyan); }
.brand-icon .logo-img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.brand-text .logo-glyph { font-size: 1.4rem; color: var(--dark); font-weight: 900; }

/* 行内导航（桌面） */
.nav-inline { margin-left: auto; }
.nav-inline ul {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.nav-inline ul li a {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white2);
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  min-height: 40px;
}
.nav-inline ul li a:hover {
  background: var(--glass);
  color: var(--green);
  text-shadow: var(--glow-green);
}

/* details 折叠导航（移动端） */
.nav-details { display: none; position: relative; }
.nav-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--white2);
  font-size: 0.875rem;
  font-weight: 700;
  min-height: 44px;
  user-select: none;
  transition: background 0.2s;
}
.nav-summary::-webkit-details-marker { display: none; }
.nav-summary:hover { background: rgba(105,255,105,0.12); }

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.2s;
}
details[open] .hamburger-icon span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
details[open] .hamburger-icon span:nth-child(2) { opacity: 0; }
details[open] .hamburger-icon span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--dark2);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-green);
  z-index: 300;
}
.nav-menu li a {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  min-height: 44px;
  border-radius: 8px;
  color: var(--white2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.nav-menu li a:hover {
  background: var(--glass);
  color: var(--green);
}

/* 联系/CTA 按钮 */
.contact-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  min-height: 44px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  color: var(--dark) !important;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  box-shadow: var(--glow-green);
  transition: box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
}
.contact-btn:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Chrome orbs */
.hero-chrome-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}
.orb1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #69ff69 0%, transparent 70%);
  top: -120px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #00ffff 0%, transparent 70%);
  bottom: -80px; right: 5%;
  animation: orbFloat 11s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(20px,-20px); }
}

/* Sparkles */
.sparkle-field {
  position: absolute;
  inset: 0;
}
.sp {
  position: absolute;
  font-size: 1.2rem;
  color: var(--cyan);
  opacity: 0.7;
  animation: sparkTwinkle 3s ease-in-out infinite;
}
.sp1 { top: 18%; left: 55%; color: var(--green); animation-delay: 0s; }
.sp2 { top: 65%; left: 42%; animation-delay: 0.8s; }
.sp3 { top: 30%; left: 80%; animation-delay: 1.6s; color: var(--green); }
.sp4 { top: 75%; left: 70%; animation-delay: 0.4s; }
.sp5 { top: 10%; left: 30%; animation-delay: 2.1s; }

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

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  text-align: left;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 0 30px rgba(105,255,105,0.4), 0 2px 4px rgba(0,0,0,0.6);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--white2);
  max-width: 540px;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.7;
}

/* Glossy CTA */
.glossy-btn, .hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  min-height: 48px;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--dark) !important;
  background: linear-gradient(135deg, #9affa2 0%, #69ff69 40%, #00ffff 100%);
  box-shadow: var(--glow-green), inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}
.glossy-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.4s;
}
.glossy-btn:hover::before { left: 120%; }
.glossy-btn:hover {
  box-shadow: var(--glow-cyan), inset 0 1px 0 rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

/* 斜切底边 */
.hero-arc {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 72px;
  z-index: 3;
  background: var(--dark3);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ============================================================
   主体 wrap（正文 + aside）
   ============================================================ */
.site-main {
  flex: 1;
  padding: 3rem 1.25rem 4rem;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto;
  gap: 2.5rem;
}

/* ============================================================
   正文容器结构 main > section.wrap > article > div
   ============================================================ */
.content-section {
  min-width: 0;
}

/* 正文内容排版 */
.content-article h1,
.content-article h2,
.content-article h3 {
  font-family: var(--font-display);
  color: var(--white);
  margin-top: 2.2rem;
  margin-bottom: 0.75rem;
}
.content-article h1 { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 900; }
.content-article h2 {
  font-size: clamp(1.25rem,2.5vw,1.75rem);
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 0 12px rgba(105,255,105,0.35);
  padding-left: 0.85rem;
  border-left: 3px solid var(--cyan);
}
.content-article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
}
.content-article p {
  margin-bottom: 1.1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--white2);
}
.content-article ul,
.content-article ol {
  margin: 0.75rem 0 1.1rem 1.5rem;
}
.content-article li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
  color: var(--white2);
}
.content-article ul li::marker { color: var(--green); }
.content-article ol li::marker { color: var(--cyan); font-weight: 700; }
.content-article strong { color: var(--green); font-weight: 700; }
.content-article em { color: var(--cyan); font-style: italic; }
.content-article a { color: var(--cyan); border-bottom: 1px solid rgba(0,255,255,0.3); }
.content-article a:hover { color: var(--green); border-color: rgba(105,255,105,0.5); }

/* article 内容区块 */
.content-article article {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(105,255,105,0.08);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}
.content-article article::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan), transparent);
  opacity: 0.6;
}
.content-article article:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 20px rgba(105,255,105,0.1);
  transform: translateY(-2px);
}

/* 确保正文article的h2有subtitle跟随时样式正确 */
.content-article h2 + .subtitle,
.content-article h2 + p.subtitle {
  color: var(--cyan-dim);
  font-size: 0.95rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

/* details / summary 在正文中 */
.content-article details {
  margin: 1rem 0;
  background: var(--card-bg2);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.content-article summary {
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--green);
  list-style: none;
  user-select: none;
}
.content-article summary::-webkit-details-marker { display: none; }
.content-article details[open] > summary { border-bottom: 1px solid var(--glass-border); }
.content-article details > *:not(summary) { padding: 1rem 1.1rem; }

/* 表格 */
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.925rem;
}
.content-article th {
  background: rgba(105,255,105,0.12);
  color: var(--green);
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 2px solid rgba(105,255,105,0.3);
}
.content-article td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--white2);
}
.content-article tr:hover td { background: rgba(105,255,105,0.04); }

/* ============================================================
   Aside 侧边栏
   ============================================================ */
.content-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.aside-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.aside-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.aside-title, .aside-hint-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.aside-card .subtitle {
  font-size: 0.82rem;
  color: var(--cyan-dim);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.aside-nav-list { display: flex; flex-direction: column; gap: 0.35rem; }
.aside-nav-list li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  min-height: 44px;
  border-radius: 8px;
  color: var(--white2);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}
.aside-nav-list li a::before {
  content: '▶';
  font-size: 0.6rem;
  color: var(--cyan);
  flex-shrink: 0;
}
.aside-nav-list li a:hover {
  background: var(--glass);
  color: var(--green);
  border-color: var(--glass-border);
}

.aside-tip { background: linear-gradient(135deg, #172617, #0d2020); }
.aside-tip-text {
  font-size: 0.875rem;
  color: var(--white2);
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--dark3);
  border-top: 1px solid var(--glass-border);
  padding: 1.2rem 1.25rem;
}

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

.footer-logo-wrap a { display: flex; align-items: center; }
.footer-logo { width: 28px; height: 28px; object-fit: contain; }
.footer-brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--green);
  text-shadow: 0 0 8px rgba(105,255,105,0.4);
}

.footer-nav { flex: 1; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.footer-nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  min-height: 40px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  transition: color 0.15s;
  white-space: nowrap;
}
.footer-nav ul li a:hover { color: var(--green); }

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* ============================================================
   h2 + p.subtitle 标题装饰约定
   ============================================================ */
h2 + p.subtitle,
h2 + p.subhead,
h2 + p.desc,
h2 + p.lead {
  color: var(--cyan-dim);
  font-size: 0.9rem;
  margin-top: -0.4rem;
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

/* ============================================================
   Parallax / 动效
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-section { transition: background-position 0.1s linear; }

  .content-article article {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeSlideUp 0.55s ease forwards;
  }
  .content-article article:nth-child(1) { animation-delay: 0.05s; }
  .content-article article:nth-child(2) { animation-delay: 0.12s; }
  .content-article article:nth-child(3) { animation-delay: 0.19s; }
  .content-article article:nth-child(4) { animation-delay: 0.26s; }
  .content-article article:nth-child(5) { animation-delay: 0.33s; }
  .content-article article:nth-child(6) { animation-delay: 0.40s; }
  .content-article article:nth-child(7) { animation-delay: 0.47s; }

  @keyframes fadeSlideUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板 ≤ 900px */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
  }
  .content-aside {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-card { flex: 1 1 260px; }

  .nav-inline { display: none; }
  .nav-details { display: block; margin-left: auto; }
  .contact-btn { display: none; }
}

/* 手机 ≤ 480px */
@media (max-width: 480px) {
  :root { --nav-h: 56px; --scroll-mt: 70px; }

  .hero-section { min-height: 42vh; padding: calc(var(--nav-h) + 2rem) 1rem 4rem; }
  .hero-h1 { font-size: 1.75rem; }
  .hero-lead { font-size: 0.95rem; }

  .site-main { padding: 2rem 0.85rem 3rem; }
  .content-article article { padding: 1.25rem 1rem; }

  .footer-inner { gap: 0.75rem; }
  .footer-nav ul { gap: 0; }
  .footer-nav ul li a { font-size: 0.75rem; padding: 0.25rem 0.4rem; min-height: 40px; }
  .footer-copy { font-size: 0.72rem; }

  .aside-card { flex: 1 1 100%; }
}

/* 极小屏 ≤ 375px */
@media (max-width: 375px) {
  .hero-h1 { font-size: 1.5rem; }
  .nav-label { display: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
