@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
  background: #0d0d1a;
  color: #e0e0ff;
  overflow-x: hidden;
}

body {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1.2rem;
  line-height: 1.7;
  background: #0d0d1a;
  color: #e0e0ff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.5;
  color: #00ff99;
  text-shadow: 0 0 12px rgba(0,255,153,0.5), 0 0 24px rgba(0,255,153,0.2);
}

h1 { font-size: clamp(1rem, 3vw, 1.6rem); }
h2 { font-size: clamp(0.85rem, 2.2vw, 1.2rem); margin-bottom: 0.5rem; }
h3 { font-size: clamp(0.75rem, 1.8vw, 1rem); color: #ff2d78; text-shadow: 0 0 10px rgba(255,45,120,0.5); }
h4 { font-size: 0.75rem; color: #00ff99; }

p { margin-bottom: 1rem; font-size: 1.15rem; line-height: 1.75; }
a { color: #00ff99; text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
a:hover { color: #ff2d78; text-shadow: 0 0 8px rgba(255,45,120,0.6); }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }
strong { color: #00ff99; }
em { color: #ff2d78; font-style: normal; }

hr {
  border: none;
  border-top: 2px solid #ff2d78;
  margin: 1.2rem 0 1.5rem;
  box-shadow: 0 0 8px rgba(255,45,120,0.4);
}

/* ===== SCANLINE & NOISE OVERLAY ===== */
.scanline-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none; z-index: 9999; mix-blend-mode: multiply;
}

.pixel-noise {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' x='0' y='0' fill='rgba(0,255,153,0.03)'/%3E%3Crect width='1' height='1' x='2' y='2' fill='rgba(255,45,120,0.02)'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9998; opacity: 0.5;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(13,13,26,0.95);
  border-bottom: 2px solid #00ff99;
  box-shadow: 0 0 20px rgba(0,255,153,0.2);
}

.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
}

.main-nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1rem;
}

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

.nav-link {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: #e0e0ff;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  display: inline-flex; align-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: #00ff99;
  border-color: #00ff99;
  background: rgba(0,255,153,0.08);
  text-shadow: 0 0 8px rgba(0,255,153,0.6);
}

.brand-center { flex-shrink: 0; text-align: center; }

.brand-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
}
.brand-logo-img { width: 32px; height: 32px; object-fit: contain; }
.brand-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.72rem;
  color: #00ff99;
  text-shadow: 0 0 12px rgba(0,255,153,0.7);
  white-space: nowrap;
}

/* 锚点条 */
.anchor-bar {
  border-top: 1px solid rgba(0,255,153,0.2);
  background: rgba(13,13,26,0.98);
}
.anchor-bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.anchor-bar-inner::-webkit-scrollbar { display: none; }
.anchor-link {
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  color: #888;
  padding: 0.5rem 0.9rem;
  min-height: 40px;
  display: inline-flex; align-items: center;
  white-space: nowrap;
  border-right: 1px solid rgba(0,255,153,0.1);
  transition: all 0.2s;
}
.anchor-link:first-child { padding-left: 0; }
.anchor-link:hover { color: #ff2d78; background: rgba(255,45,120,0.05); }

/* ===== MAIN CONTENT ===== */
.site-main {
  padding-top: 108px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas: "content figure" "aside figure";
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  align-items: center;
  position: relative;
}

.hero-content {
  grid-area: content;
  align-self: center;
}

.hero-h1 {
  font-size: clamp(0.9rem, 2.5vw, 1.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-sub {
  color: #aaa;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #0d0d1a;
  background: #00ff99;
  padding: 0.9rem 1.5rem;
  border-radius: 4px;
  min-height: 44px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(0,255,153,0.4), 4px 4px 0 #007744;
}
.cta-btn:hover {
  background: #ff2d78;
  color: #fff;
  box-shadow: 0 0 20px rgba(255,45,120,0.5), 4px 4px 0 #880022;
  transform: translate(-1px, -1px);
}
.btn-arrow { font-size: 0.8rem; }

.hero-figure {
  grid-area: figure;
  display: flex; flex-direction: column; align-items: center;
}

.hero-visual {
  width: 260px; height: 320px;
  position: relative;
}

.glitch-box {
  width: 100%; height: 100%;
  border: 3px solid #00ff99;
  box-shadow: 0 0 30px rgba(0,255,153,0.3), inset 0 0 30px rgba(0,255,153,0.05);
  border-radius: 8px;
  background: #060612;
  position: relative; overflow: hidden;
  animation: glitch-border 4s infinite;
}

@keyframes glitch-border {
  0%, 90%, 100% { border-color: #00ff99; box-shadow: 0 0 30px rgba(0,255,153,0.3), inset 0 0 30px rgba(0,255,153,0.05); }
  92% { border-color: #ff2d78; box-shadow: 0 0 30px rgba(255,45,120,0.4), inset 0 0 30px rgba(255,45,120,0.05); transform: translate(2px, 0); }
  94% { border-color: #00ff99; transform: translate(-2px, 0); }
  96% { border-color: #ff2d78; transform: translate(1px, 0); }
}

.glitch-line {
  position: absolute; left: 0; width: 100%; height: 2px;
  animation: glitch-scan 3s infinite linear;
}
.l1 { background: rgba(0,255,153,0.4); animation-delay: 0s; animation-duration: 2.5s; }
.l2 { background: rgba(255,45,120,0.3); animation-delay: 1s; animation-duration: 3.2s; }
.l3 { background: rgba(0,255,153,0.2); animation-delay: 1.8s; animation-duration: 2s; }

@keyframes glitch-scan {
  0% { top: 0%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.pixel-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,153,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,153,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.crt-inner {
  position: absolute; bottom: 20px; left: 0; width: 100%;
  text-align: center;
}
.crt-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: #00ff99;
  text-shadow: 0 0 10px #00ff99;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.crt-bar {
  margin: 8px auto 0;
  width: 70%; height: 6px;
  background: #111;
  border: 1px solid #333;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.crt-bar::after {
  content: '';
  position: absolute; left: 0; top: 0; height: 100%;
  width: 60%;
  background: linear-gradient(90deg, #00ff99, #ff2d78);
  animation: loading-bar 2s ease-in-out infinite;
}
@keyframes loading-bar {
  0% { width: 10%; }
  50% { width: 80%; }
  100% { width: 10%; }
}

.hero-caption {
  margin-top: 0.8rem;
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

.hero-aside {
  grid-area: aside;
  display: flex; flex-direction: column; gap: 1rem;
}

.aside-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0,255,153,0.1);
  border: 1px solid #00ff99;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  color: #00ff99;
  width: fit-content;
  min-height: 40px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00ff99;
  box-shadow: 0 0 8px #00ff99;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.aside-stat {
  display: flex; gap: 1.5rem;
}
.stat-item { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: #ff2d78;
  text-shadow: 0 0 10px rgba(255,45,120,0.5);
}
.stat-label { font-size: 0.95rem; color: #666; }

.aside-tag { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pixel-tag {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #0d0d1a;
  background: #ff2d78;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  box-shadow: 2px 2px 0 #880022;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem 4rem;
}

/* ===== INJECTED SECTIONS (page.content) ===== */
.content-wrapper section {
  scroll-margin-top: 112px;
  padding: 3rem 2rem;
  border-bottom: 1px solid rgba(0,255,153,0.1);
  position: relative;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

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

.content-wrapper section > figure {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 280px;
  background: rgba(0,255,153,0.05);
  border: 1px solid rgba(0,255,153,0.2);
  border-radius: 28px;
  padding: 1rem;
  text-align: center;
}

.content-wrapper section > figure img {
  max-width: 100%;
  border-radius: 16px;
}

.content-wrapper section > figure figcaption {
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.5rem;
}

.content-wrapper section > aside {
  float: left;
  margin: 0 2rem 1.5rem 0;
  max-width: 220px;
  background: rgba(255,45,120,0.06);
  border: 1px solid rgba(255,45,120,0.25);
  border-radius: 28px;
  padding: 1.2rem;
}

.content-wrapper section > aside::after,
.content-wrapper section > figure::after {
  content: '';
  display: table;
  clear: both;
}

.content-wrapper section h2 {
  clear: both;
}

/* ===== REVEAL ANIMATION ===== */
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(6,6,18,0.98);
  border-top: 2px solid rgba(0,255,153,0.2);
  padding: 3rem 2rem 1.5rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-col dt {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #00ff99;
  text-shadow: 0 0 8px rgba(0,255,153,0.4);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0,255,153,0.2);
}

.footer-col dd {
  font-size: 1rem;
  color: #888;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-col-heading {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #00ff99;
}

.footer-col-nav dd { margin-bottom: 0.3rem; }

.footer-nav-link {
  color: #666;
  font-size: 1.05rem;
  transition: color 0.2s;
  min-height: 40px;
  display: inline-flex; align-items: center;
  padding: 0.2rem 0;
}
.footer-nav-link:hover { color: #00ff99; }

.footer-link { color: #888; }
.footer-link:hover { color: #ff2d78; }

/* 页脚底部锚点导航 */
.footer-nav-bottom {
  max-width: 1280px; margin: 0 auto 1rem;
}
.footer-bottom-dl {
  display: flex; flex-wrap: wrap; gap: 0.2rem;
  border-top: 1px solid rgba(0,255,153,0.1);
  padding-top: 1rem;
}
.footer-bottom-dl dt { margin: 0; }
.footer-bottom-dl dt a,
.footer-anchor-link {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #555;
  padding: 0.4rem 0.7rem;
  min-height: 40px;
  display: inline-flex; align-items: center;
  border: 1px solid rgba(0,255,153,0.1);
  border-radius: 4px;
  transition: all 0.2s;
}
.footer-anchor-link:hover,
.footer-bottom-dl dt a:hover {
  color: #00ff99;
  border-color: #00ff99;
  background: rgba(0,255,153,0.06);
}

.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.2rem;
  text-align: center;
}
.copyright {
  font-size: 1rem;
  color: #444;
  font-family: 'VT323', monospace;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d0d1a; }
::-webkit-scrollbar-thumb { background: #00ff99; border-radius: 3px; }

/* ===== GLASS CARD ===== */
.card, .glass-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,255,153,0.2);
  border-radius: 28px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover, .glass-card:hover {
  border-color: #00ff99;
  box-shadow: 0 0 20px rgba(0,255,153,0.15);
}

/* ===== DEPTH BG ===== */
.depth-bg {
  position: relative;
}
.depth-bg::before {
  content: '';
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0,255,153,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(255,45,120,0.04) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  html { scroll-padding-top: 130px; }

  .main-nav { height: auto; flex-wrap: wrap; padding: 0.5rem 0; gap: 0.5rem; }
  .nav-left, .nav-right { flex: none; gap: 0; flex-wrap: wrap; }
  .brand-center { order: -1; width: 100%; text-align: center; padding: 0.4rem 0; }
  .brand-name { font-size: 0.62rem; }
  .brand-link { min-height: 44px; padding: 0.4rem 0.5rem; }
  .nav-link { font-size: 0.95rem; padding: 0.55rem 0.5rem; min-height: 44px; }

  .anchor-bar-inner { gap: 0; }
  .anchor-link { font-size: 0.9rem; padding: 0.5rem 0.6rem; min-height: 40px; }

  .hero-section {
    grid-template-columns: 1fr;
    grid-template-areas: "content" "aside" "figure";
    min-height: auto;
    padding: 2rem 1rem 3rem;
    gap: 1.5rem;
  }

  .hero-figure { order: 3; }
  .hero-visual { width: 200px; height: 240px; margin: 0 auto; }
  .hero-h1 { font-size: 0.85rem; }
  .hero-sub { font-size: 1rem; }
  .hero-aside { flex-direction: row; flex-wrap: wrap; gap: 0.8rem; }
  .aside-stat { gap: 1rem; }

  .content-wrapper { padding: 0 1rem 3rem; }
  .content-wrapper article { padding: 2rem 1rem; }
  .content-wrapper article > figure,
  .content-wrapper article > aside {
    float: none; margin: 0 0 1rem 0; max-width: 100%;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom-dl { gap: 0.3rem; }

  .cta-btn { font-size: 0.6rem; padding: 0.8rem 1.1rem; min-height: 44px; }
}

@media (max-width: 480px) {
  body { font-size: 1.1rem; }
  .nav-left, .nav-right { display: none; }
  .anchor-bar { display: block; }
  .brand-link { min-height: 44px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal-section { opacity: 1; transform: none; }
}

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