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

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #0d0d0d;
  --color-primary: #ff00aa;
  --color-accent: #00ff41;
  --color-surface: #111318;
  --color-surface2: #181c24;
  --color-border: rgba(255, 0, 170, 0.25);
  --color-border-green: rgba(0, 255, 65, 0.2);
  --color-text: #d0d8e8;
  --color-text-muted: #6b7a94;
  --color-text-bright: #f0f4ff;
  --font-display: 'Orbitron', 'Arial Black', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --nav-h: 64px;
  --anchor-h: 40px;
  --header-total: calc(var(--nav-h) + var(--anchor-h));
  --radius: 4px;
  --glow-pink: 0 0 8px rgba(255,0,170,0.6), 0 0 24px rgba(255,0,170,0.2);
  --glow-green: 0 0 8px rgba(0,255,65,0.6), 0 0 24px rgba(0,255,65,0.2);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 1px 0 rgba(255,0,170,0.08);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  line-height: 1.7;
}

body.cyberpunk-dark {
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* scroll-margin for anchored sections */
div[id] {
  scroll-margin-top: calc(var(--header-total) + 16px);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 3px; }

/* ===== Selection ===== */
::selection { background: var(--color-primary); color: #000; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text-bright);
  line-height: 1.2;
}

h2 > span, h3 > span {
  display: inline;
  color: inherit;
}

p { font-size: 1rem; line-height: 1.75; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: var(--color-accent);
  text-shadow: var(--glow-green);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

/* ===== HUD Label ===== */
.hud-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ===== Site Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

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

/* Brand / Logo */
.header-brand { flex-shrink: 0; }

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-primary);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.05em;
}

.logo-mark, .logo-img {
  height: 36px;
  width: auto;
}

/* ===== details > summary + menu nav ===== */
.nav-details {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-details[open] .nav-toggle-icon::after { content: '✕'; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 40px;
  user-select: none;
}
.nav-toggle::-webkit-details-marker { display: none; }

.nav-toggle-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}
.nav-toggle-icon::after { content: '≡'; }

/* Desktop: details always "open" visually via CSS */
@media (min-width: 769px) {
  .nav-details {
    /* Force open appearance on desktop */
    overflow: visible;
  }
  /* Hide the summary on desktop, show menu inline */
  .nav-details > summary.nav-toggle {
    display: none;
  }
  .nav-details > menu.nav-menu {
    display: flex !important;
    flex-direction: row;
    gap: 0.25rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .nav-details {
    flex: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(13,13,13,0.98);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    flex-direction: column;
    gap: 0;
  }
  .nav-details[open] > menu.nav-menu {
    display: flex;
  }
}

menu.nav-menu {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--color-primary);
  background: rgba(255,0,170,0.08);
  text-shadow: var(--glow-pink);
}

/* Header Search */
.header-search {
  flex-shrink: 0;
  margin-left: auto;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  width: 140px;
  min-height: 40px;
}
.search-input::placeholder { color: var(--color-text-muted); }

.search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  transition: background 0.2s;
}
.search-btn:hover { background: rgba(255,0,170,0.1); }

/* ===== Sticky Anchors Bar ===== */
.sticky-anchors {
  border-top: 1px solid rgba(0,255,65,0.1);
  background: rgba(13,13,13,0.94);
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-anchors::-webkit-scrollbar { display: none; }

.anchor-list {
  display: flex;
  flex-direction: row;
  padding: 0 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
}

.anchor-link {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  padding: 0 0.75rem;
  height: var(--anchor-h);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.anchor-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-shadow: none;
}

/* ===== Hero Section ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(255,0,170,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 30% 80%, rgba(0,255,65,0.04) 0%, transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: block;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--color-text-bright);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 460px;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid;
  text-transform: uppercase;
}

.badge-hot {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(255,0,170,0.08);
}
.badge-hd {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(0,255,65,0.06);
}
.badge-free {
  color: #aad4ff;
  border-color: rgba(170,212,255,0.4);
  background: rgba(170,212,255,0.05);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #000;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.75rem;
  min-height: 48px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  align-self: flex-start;
  box-shadow: var(--glow-pink);
}
.cta-btn:hover {
  background: #ff33bb;
  box-shadow: 0 0 16px rgba(255,0,170,0.8), 0 0 40px rgba(255,0,170,0.3);
  transform: translateY(-2px);
  color: #000;
  text-shadow: none;
}

/* Hero Image column */
.hero-img-col {
  flex: 0 0 420px;
  position: relative;
}

.hero-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-img-wrap .hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.hero-img-border {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: inset 0 0 16px rgba(255,0,170,0.15);
}

.hero-img-placeholder {
  width: 100%;
  height: 360px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}
.placeholder-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-primary);
  opacity: 0.4;
}

.hero-float-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-pink);
  animation: pulse-badge 2s ease-in-out infinite;
}

.float-badge-inner {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 900;
  color: #000;
  letter-spacing: 0.08em;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: var(--glow-pink); transform: scale(1); }
  50% { box-shadow: 0 0 20px rgba(255,0,170,0.9), 0 0 40px rgba(255,0,170,0.4); transform: scale(1.06); }
}

.hero-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ===== Content Layout: aside left + main right ===== */
.content-layout {
  display: flex;
  flex-direction: row;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  align-items: flex-start;
}

/* ===== Aside (left) ===== */
.content-aside {
  flex: 0 0 220px;
  position: sticky;
  top: calc(var(--header-total) + 1rem);
  max-height: calc(100vh - var(--header-total) - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  margin-right: 2rem;
}

.aside-inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.aside-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.aside-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.aside-link:hover {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  background: rgba(0,255,65,0.05);
  text-shadow: none;
}

.aside-tip {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-green);
}

.aside-tip-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.aside-tip-text {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Main Content ===== */
.content-main {
  flex: 1;
  min-width: 0;
}

.main-article {
  background: transparent;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Page content styles — the injected HTML */
.content-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--color-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.04em;
}

.content-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-accent);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}

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

.content-section ul, .content-section ol {
  margin: 0.75rem 0 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.content-section ul { list-style: none; }
.content-section ul li::before {
  content: '▸';
  color: var(--color-primary);
  margin-right: 0.5rem;
}
.content-section ol { list-style: decimal; }
.content-section li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
}

.content-section a {
  color: var(--color-primary);
  border-bottom: 1px solid rgba(255,0,170,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.content-section a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-shadow: none;
}

.content-section div {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,0,170,0.08);
  position: relative;
}
.content-section div:first-child { padding-top: 0; }
.content-section div:last-child { border-bottom: none; }

/* Parallax layer effect for sections */
.content-section div::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.content-section div.in-view::before { opacity: 1; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-top-block {
  padding: 3rem 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-subscribe {
  flex: 1;
}

.footer-subscribe-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-subscribe-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.subscribe-form {
  display: flex;
  gap: 0;
  max-width: 420px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.subscribe-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text);
  min-height: 44px;
}
.subscribe-input::placeholder { color: var(--color-text-muted); }

.subscribe-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #000;
  background: var(--color-primary);
  border: none;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}
.subscribe-btn:hover { background: #ff33bb; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contact-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Footer main 4-col row */
.footer-main-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  transition: color 0.2s;
  border-bottom: none;
}
.footer-link:hover {
  color: var(--color-primary);
  text-shadow: none;
}

.footer-about-text {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

/* Footer bottom bar: footer 单行 logo+nav+copyright */
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Parallax decoration lines ===== */
.page-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(90deg, rgba(255,0,170,0.015) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(0deg, rgba(255,0,170,0.015) 1px, transparent 1px) 0 0 / 80px 80px;
  pointer-events: none;
  z-index: 0;
}

.page-wrapper > * { position: relative; z-index: 1; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-img-col { flex: 0 0 320px; }
  .footer-main-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; --anchor-h: 36px; }

  .hero-inner {
    flex-direction: column-reverse;
    gap: 1.5rem;
    padding: 2rem 1rem;
    min-height: 70vh;
  }
  .hero-img-col { flex: none; width: 100%; max-width: 400px; margin: 0 auto; }
  .hero-text-col { width: 100%; }
  .hero-h1 { font-size: 1.6rem; }

  .content-layout {
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
  }

  .content-aside {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
    margin-right: 0;
  }

  .footer-top-block { flex-direction: column; gap: 1.5rem; padding: 2rem 1rem; }
  .footer-main-row { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.5rem 1rem; }
  .header-search { display: none; }
  .anchor-list { padding: 0 0.75rem; }
}

@media (max-width: 480px) {
  .footer-main-row { grid-template-columns: 1fr; }
  .hero-inner { padding: 1.5rem 1rem; }
  .cta-btn { width: 100%; justify-content: center; }
  .hero-badges { gap: 0.4rem; }
  .content-layout { padding: 0.75rem; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .cta-btn { transition: none; }
  .hero-float-badge { animation: none; }
  .content-section div::before { transition: none; }
}
