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

/* ===== CSS 变量 ===== */
:root {
  --c-green: #87ff71;
  --c-blue: #01cdfe;
  --c-dark: #192617;
  --c-purple: #b967ff;
  --c-pink: #ff71ce;
  --c-dark2: #0d1a0b;
  --c-dark3: #1a2e18;
  --c-text: #d4f5cc;
  --c-text-muted: #7db87a;
  --c-card-bg: #1e2e1b;
  --c-card-border: #2a4026;
  --nav-h: 68px;
  --radius-card: 18px;
  --font-main: 'Outfit', 'Rubik', system-ui, -apple-system, sans-serif;
  --font-alt: 'Rubik', 'Outfit', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-green: 0 0 12px #87ff71, 0 0 32px #87ff7155;
  --glow-blue: 0 0 12px #01cdfe, 0 0 32px #01cdfe55;
  --glow-purple: 0 0 12px #b967ff, 0 0 32px #b967ff55;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.vaporwave-body {
  font-family: var(--font-main);
  background-color: var(--c-dark);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== 扫描线 ===== */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9998;
  animation: scanline-flicker 8s linear infinite;
}

@keyframes scanline-flicker {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.35; }
  75% { opacity: 0.55; }
}

/* ===== 复古网格地板 ===== */
.retro-grid {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40vh;
  background-image:
    linear-gradient(rgba(135,255,113,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,255,113,0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(60deg);
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 0;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(25, 38, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(135, 255, 113, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  height: var(--nav-h);
  max-width: 1400px;
  margin: 0 auto;
}

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

.site-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(var(--glow-green));
}

.logo-text-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--c-green), var(--c-blue));
  color: var(--c-dark);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 10px;
  text-shadow: none;
  box-shadow: var(--glow-green);
}

/* 导航：nav > ol > li > a */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.primary-nav ol {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.primary-nav ol li {
  display: flex;
}

.primary-nav ol li a.nav-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--c-text);
  text-decoration: none;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition), text-shadow var(--transition);
  white-space: nowrap;
}

.primary-nav ol li a.nav-link:hover,
.primary-nav ol li a.nav-link:focus-visible {
  color: var(--c-green);
  background: rgba(135,255,113,0.08);
  text-shadow: var(--glow-green);
  outline: none;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(135,255,113,0.3);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-green);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动导航 */
.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  border-top: 1px solid rgba(135,255,113,0.1);
  background: rgba(13,26,11,0.97);
}

.mobile-nav.is-open {
  max-height: 520px;
}

.mobile-nav ol {
  list-style: none;
  padding: 0.5rem 1.5rem 1rem;
  margin: 0;
}

.mobile-nav ol li a.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(135,255,113,0.08);
  transition: color var(--transition);
}

.mobile-nav ol li a.nav-link:hover {
  color: var(--c-green);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 3rem;
  overflow: hidden;
  background: linear-gradient(170deg, #0d1a0b 0%, #192617 40%, #0a1520 70%, #050a1a 100%);
}

.hero-bg-text {
  position: absolute;
  bottom: -0.1em;
  right: -0.05em;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(8rem, 22vw, 22rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(135,255,113,0.08);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  animation: bg-text-pulse 6s ease-in-out infinite;
}

@keyframes bg-text-pulse {
  0%, 100% { -webkit-text-stroke-color: rgba(135,255,113,0.08); }
  50% { -webkit-text-stroke-color: rgba(1,205,254,0.12); }
}

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-float 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(135,255,113,0.2), transparent 70%);
  top: 10%;
  right: 15%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(1,205,254,0.18), transparent 70%);
  bottom: 20%;
  right: 30%;
  animation-delay: -3s;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.08); }
}

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

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 1.25rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(135,255,113,0.35);
  border-radius: 20px;
  background: rgba(135,255,113,0.06);
}

.hero-h1 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 40px rgba(135,255,113,0.3);
  margin-bottom: 1.5rem;
  animation: glitch-title 10s ease-in-out infinite;
}

@keyframes glitch-title {
  0%, 90%, 100% { text-shadow: 0 0 40px rgba(135,255,113,0.3); clip-path: none; }
  92% {
    text-shadow: -3px 0 #01cdfe, 3px 0 #ff71ce, 0 0 40px rgba(135,255,113,0.3);
    clip-path: inset(10% 0 80% 0);
  }
  94% {
    text-shadow: 3px 0 #01cdfe, -3px 0 #ff71ce, 0 0 40px rgba(135,255,113,0.3);
    clip-path: inset(60% 0 20% 0);
  }
  96% { text-shadow: 0 0 40px rgba(135,255,113,0.3); clip-path: none; }
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--c-text-muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2.2rem;
  min-height: 52px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-dark);
  background: linear-gradient(135deg, var(--c-green), var(--c-blue));
  border-radius: 30px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(135,255,113,0.35);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(135,255,113,0.5), 0 0 0 3px rgba(135,255,113,0.2);
}

/* ===== 主内容区 ===== */
.main-content {
  position: relative;
  z-index: 1;
}

/* main > article > section 三层直接嵌套 */
.content-article {
  width: 100%;
}

.content-section {
  padding: 0;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 2rem;
  align-items: start;
}

/* ===== 正文（page.content）区域 ===== */
.content-primary {
  min-width: 0;
}

/* page.content 内部注入的样式 */
.content-primary section {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(135,255,113,0.1);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

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

.content-primary h2 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.content-primary h3 {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-primary h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-primary p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}

.content-primary ul,
.content-primary ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.content-primary li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.content-primary a {
  color: var(--c-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition), text-shadow var(--transition);
}

.content-primary a:hover {
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
}

.content-primary strong {
  color: var(--c-green);
  font-weight: 600;
}

.content-primary em {
  color: var(--c-blue);
  font-style: italic;
}

.content-primary blockquote {
  border-left: 3px solid var(--c-purple);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(185,103,255,0.06);
  border-radius: 0 12px 12px 0;
  color: var(--c-text-muted);
}

.content-primary code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--c-pink);
  background: rgba(255,113,206,0.1);
  padding: 0.15em 0.45em;
  border-radius: 5px;
}

.content-primary pre {
  background: var(--c-dark2);
  border: 1px solid rgba(135,255,113,0.15);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.content-primary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.content-primary th {
  background: rgba(135,255,113,0.12);
  color: var(--c-green);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid rgba(135,255,113,0.25);
}

.content-primary td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(135,255,113,0.08);
  color: var(--c-text);
}

.content-primary tr:hover td {
  background: rgba(135,255,113,0.04);
}

/* page.content 中的 section id 对应的 scroll-margin */
#about,
#mogu-jieshao,
#mogu-wenti,
#mogu-haochu,
#mogu-shiyong,
#mogu-jieguo {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

/* ===== 侧边栏 aside ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.aside-inner {
  background: var(--c-card-bg);
  border: 1px solid rgba(135,255,113,0.15);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

.aside-title {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 1.25rem;
}

.aside-title span {
  display: inline-block;
}

.aside-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.aside-nav-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  min-height: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  gap: 0.5rem;
}

.aside-nav-link::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--c-green);
  border-radius: 50%;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity var(--transition), box-shadow var(--transition);
}

.aside-nav-link:hover {
  color: var(--c-green);
  background: rgba(135,255,113,0.07);
}

.aside-nav-link:hover::before {
  opacity: 1;
  box-shadow: var(--glow-green);
}

.aside-deco {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.aside-deco-line {
  display: block;
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(135,255,113,0.3), transparent);
}

.aside-deco-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-blue);
  box-shadow: var(--glow-blue);
  animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--c-dark2);
  border-top: 1px solid rgba(135,255,113,0.15);
  overflow: hidden;
}

.footer-brand-block {
  text-align: center;
  padding: 3rem 2rem 0;
  overflow: hidden;
}

.footer-super-brand {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 12rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(135,255,113,0.12);
  user-select: none;
  pointer-events: none;
}

.footer-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.footer-col-title {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 1.25rem;
}

.footer-col-title span {
  display: inline-block;
}

.footer-address {
  font-style: normal;
}

.footer-address p {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.footer-address a {
  color: var(--c-blue);
  text-decoration: none;
}

.footer-address a:hover {
  text-shadow: var(--glow-blue);
}

.footer-nav-list,
.footer-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav-list li a,
.footer-info-list li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav-list li a:hover,
.footer-info-list li a:hover {
  color: var(--c-green);
}

.footer-topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-topic-list li span,
.footer-info-list li span {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid rgba(135,255,113,0.08);
  padding: 1.25rem 2rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  opacity: 0.7;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Hover 微交互 - 卡片类 ===== */
.content-primary .card,
.content-primary [class*="card"] {
  border-radius: var(--radius-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.content-primary .card:hover,
.content-primary [class*="card"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(135,255,113,0.15);
}

/* ===== 断点：平板 ===== */
@media (max-width: 1100px) {
  .content-with-aside {
    grid-template-columns: 1fr 240px;
    gap: 2rem;
  }

  .footer-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .primary-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

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

  .content-aside {
    position: static;
    order: -1;
  }

  .aside-inner {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 0;
  }
}

/* ===== 断点：手机 ===== */
@media (max-width: 600px) {
  :root { --nav-h: 60px; }

  .header-inner {
    padding: 0 1rem;
  }

  .hero-section {
    padding: calc(var(--nav-h) + 2rem) 1.25rem 2rem;
  }

  .hero-h1 {
    font-size: 2.2rem;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .content-with-aside {
    padding: 2.5rem 1.25rem;
  }

  .footer-body {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
  }

  .footer-brand-block {
    padding: 2rem 1rem 0;
  }

  .footer-super-brand {
    font-size: 4.5rem;
  }

  .content-primary h2 {
    font-size: 1.7rem;
  }

  .aside-inner {
    flex-direction: column;
  }

  .aside-nav-list {
    flex-direction: column;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
