/* NexGen — core tokens & reset */
:root {
  --nx-bg: #051424;
  --nx-bg-lowest: #010f1f;
  --nx-surface: #122131;
  --nx-surface-low: #0d1c2d;
  --nx-surface-high: #1c2b3c;
  --nx-surface-highest: #273647;
  --nx-text: #d4e4fa;
  --nx-text-muted: #b9cbbc;
  --nx-aurora: #00ff9d;
  --nx-aurora-dim: #00e38b;
  --nx-aurora-bright: #56ffa8;
  --nx-purple: #d0bcff;
  --nx-purple-deep: #571bc1;
  --nx-cta-ink: #002110;
  --nx-border: rgba(255, 255, 255, 0.1);
  --nx-outline: #3b4a3f;
  --nx-radius-sm: 2px;
  --nx-radius: 4px;
  --nx-radius-lg: 8px;
  --nx-radius-xl: 12px;
  --nx-pad: 16px;
  --nx-gutter: 12px;
  --nx-stack-sm: 8px;
  --nx-stack-md: 16px;
  --nx-stack-lg: 32px;
  --nx-glow: 0 0 25px rgba(0, 255, 157, 0.3);
  --nx-font-display: 'Space Grotesk', system-ui, sans-serif;
  --nx-font-body: 'Inter', system-ui, sans-serif;
  --nx-shell: min(100% - 32px, 480px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--nx-font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--nx-text);
  background: var(--nx-bg);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

iframe {
  display: block;
  max-width: 100%;
  border: 0;
  vertical-align: bottom;
}

a { color: var(--nx-aurora-bright); text-decoration: none; }

button, input { font: inherit; color: inherit; }

#main-content,
.nx-home,
.nx-detail-main,
.nx-prose,
.nx-cat-hub,
.nx-cat-grid-view,
.nx-play-page {
  max-width: 100%;
  overflow-x: clip;
}

.nx-shell {
  width: var(--nx-shell);
  max-width: 100%;
  margin-inline: auto;
}

.nx-label-caps {
  font-family: var(--nx-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nx-disclosure {
  font-size: 12px;
  color: var(--nx-text-muted);
  margin: 0 0 12px;
}

.nx-error { color: #ffb4ab; padding: 24px; }

.nx-no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
}

.nx-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--nx-aurora);
  color: var(--nx-cta-ink);
  border-radius: var(--nx-radius);
  font-weight: 700;
}
.nx-skip:focus { left: 8px; }

.nx-loading {
  text-align: center;
  padding: 48px 16px;
  color: var(--nx-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
