/* ════════════════════════════════════════════════
   PixelWave — Retro-Acoustic Design System
   Cozy Pixel Audio Visualizer
   ════════════════════════════════════════════════ */

/* ── Variables (Dusk default) ── */
:root {
  --global-bg:  #14101c;
  --surface:    #161025;
  --surface-c:  #231c32;
  --surface-ch: #2d263d;
  --surface-cx: #393148;
  --ink:        #15101f;
  --primary:    #ffc794;
  --primary-c:  #f2a65a;
  --secondary:  #ffb0cb;
  --tertiary:   #96e0ca;
  --on-surface: #eaddfc;
  --on-sv:      #d7c3b3;
  --outline:    #9f8d7f;
  --outline-v:  #524438;
  --text-pri:   #f3ead6;
  --text-sec:   #b3a4c9;
  --bg-sec:     #2c2440;
  --surface-1:  #322a47;
  --shadow-px:  4px 4px 0 0 rgba(21,16,31,1);
  --shadow-lg:  6px 6px 0 0 rgba(21,16,31,1);
  --shadow-xl:  8px 8px 0 0 rgba(21,16,31,1);
  --nav-h: 80px;
}

/* ── Theme overrides ── */
body.theme-mint   { --primary:#96e0ca; --primary-c:#5bbfa8; --secondary:#f2a65a; --tertiary:#ffb0cb; }
body.theme-berry  { --primary:#ffb0cb; --primary-c:#e98fb0; --secondary:#96e0ca; --tertiary:#f2a65a; }
body.theme-amber  { --primary:#f0c040; --primary-c:#e07820; --secondary:#ffb0cb; --tertiary:#96e0ca; }
body.theme-dusk   { --primary:#ffc794; --primary-c:#f2a65a; --secondary:#ffb0cb; --tertiary:#96e0ca; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--global-bg);
  color: var(--on-surface);
  font-family: 'Pixelify Sans', monospace;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Stars canvas ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── CRT overlay ── */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 2px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  opacity: 1;
  transition: opacity 0.3s;
}
.crt-overlay.off { opacity: 0; }

/* ── Top Nav ── */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 4px solid var(--ink);
  box-shadow: var(--shadow-px);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.logo-box {
  width: 32px; height: 32px;
  background: var(--primary);
  border: 4px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-dot {
  width: 10px; height: 10px;
  background: var(--ink);
}
.logo-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--on-sv);
  padding-bottom: 4px;
  border-bottom: 4px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.nav-right { display: flex; align-items: center; }
.nav-user-btn {
  background: none; border: none;
  color: var(--primary); font-size: 24px;
  display: flex; align-items: center;
  transition: transform 0.1s;
}
.nav-user-btn:hover { transform: translate(2px,2px); }

/* ── Page wrap ── */
#page-wrap {
  position: relative;
  z-index: 10;
  margin-top: var(--nav-h);
}

/* ── Views ── */
.view {
  display: none;
  padding: 40px 32px 60px;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h) - 48px);
  animation: viewIn 0.2s ease forwards;
}
.view.active { display: block; }
.view.leaving {
  animation: viewOut 0.2s ease forwards;
  pointer-events: none;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes viewOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

/* ── Footer ── */
#site-footer {
  position: relative; z-index: 10;
  padding: 12px 32px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 2px dashed rgba(255,255,255,0.08);
}
#site-footer, #site-footer a {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--outline);
  letter-spacing: 1px;
}
.footer-links { display: flex; gap: 20px; }

/* ── Section labels & titles ── */
.section-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--outline);
  margin-bottom: 12px;
}
.page-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 30px;
  color: var(--on-surface);
  line-height: 1.35;
  margin-bottom: 12px;
}
.page-desc {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-sv);
  max-width: 640px;
  margin-bottom: 32px;
}

/* ════════════════════════
   HOME VIEW
   ════════════════════════ */
#view-home { padding-top: 60px; }

.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.hero-left {}

.section-eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--primary-c);
  margin-bottom: 20px;
}
.hero-headline {
  font-family: 'Press Start 2P', monospace;
  font-size: 34px;
  line-height: 1.35;
  color: var(--on-surface);
  margin-bottom: 20px;
}
.hero-body {
  font-size: 16px;
  color: var(--on-sv);
  max-width: 440px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-right {}
.hero-screen {
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.hero-screen canvas {
  width: 100%; height: 100%;
  display: block;
  image-rendering: pixelated;
}

.home-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}
.stat-chip {
  background: var(--surface-c);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 16px 24px;
  display: flex; align-items: baseline; gap: 10px;
}
.stat-n {
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  color: var(--primary);
}
.stat-l {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--outline);
  letter-spacing: 1px;
}

.home-bottom-bar {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--outline);
  letter-spacing: 1px;
  border-top: 2px dashed rgba(255,255,255,0.07);
  padding-top: 16px;
}

/* ════════════════════════
   PLAYER VIEW
   ════════════════════════ */
#view-player { padding-top: 20px; }

.stage-container {
  margin-bottom: 20px;
}
.stage-crt {
  position: relative;
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 0 rgba(21,16,31,1);
  overflow: hidden;
  height: 420px;
}
.stage-crt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.12) 0px,
    rgba(0,0,0,0.12) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: multiply;
}
.stage-crt .stage-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(20,16,28,0.55) 100%);
  pointer-events: none;
  z-index: 3;
  box-shadow: inset 0 0 80px 10px rgba(0,0,0,0.45);
}
#viz-canvas {
  width: 100%; height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* Track info overlay */
.stage-track-info {
  position: absolute;
  top: 20px; left: 20px;
  display: flex; align-items: center; gap: 16px;
  z-index: 10;
  opacity: 0.9;
}
.stage-art {
  width: 60px; height: 60px;
  background: var(--surface-c);
  border: 3px solid var(--outline-v);
  display: flex; align-items: center; justify-content: center;
}
.art-inner {
  width: 28px; height: 28px;
  background: var(--primary-c);
  opacity: 0.5;
}
.stage-meta {}
.stage-title {
  font-size: 16px; font-weight: 700;
  color: var(--on-surface);
}
.stage-genre {
  font-size: 13px;
  color: var(--on-sv);
  margin-top: 2px;
}

/* Drop prompt */
.stage-drop-prompt {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.stage-drop-prompt.hidden { display: none; }
.drop-prompt-icon {
  font-size: 32px;
  color: var(--on-sv);
  margin-bottom: 4px;
}
.drop-prompt-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--on-surface);
}
.drop-prompt-sub {
  font-size: 13px;
  color: var(--on-sv);
  margin-bottom: 8px;
}

/* Mode chips */
.mode-chips {
  display: flex; gap: 0;
  margin-bottom: 20px;
}
.filter-chips {
  display: flex; gap: 0;
  margin-bottom: 28px;
}

.chip {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--on-sv);
  background: var(--surface-c);
  border: 3px solid var(--ink);
  padding: 10px 18px;
  margin-right: 4px;
  transition: color 0.15s, background 0.15s, transform 0.1s;
  box-shadow: var(--shadow-px);
}
.chip:hover {
  color: var(--primary);
  background: var(--surface-ch);
  transform: translate(-1px,-1px);
}
.chip.active {
  color: var(--ink);
  background: var(--primary);
  border-color: var(--ink);
}
.chip:active { transform: translate(2px,2px); box-shadow: none; }

/* Transport */
.transport-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 14px 20px;
}
.transport-left { display: flex; gap: 8px; }
.t-btn {
  font-size: 18px;
  color: var(--on-sv);
  background: var(--surface-c);
  border: 3px solid var(--ink);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.1s;
  box-shadow: var(--shadow-px);
}
.t-btn:hover { color: var(--primary); background: var(--surface-ch); }
.t-btn-play {
  background: var(--primary);
  color: var(--ink);
  border-color: var(--ink);
  font-size: 22px;
  width: 52px; height: 52px;
}
.t-btn-play:hover { background: var(--primary-c); color: var(--ink); }
.t-btn-stop {
  font-size: 14px;
  color: var(--secondary);
  border-color: var(--secondary);
}
.t-btn-stop:hover { background: rgba(255,176,203,0.15); }
.t-btn:active { transform: translate(2px,2px); box-shadow: none; }

.t-time {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--outline);
  min-width: 36px;
  flex-shrink: 0;
}
.t-progress {
  flex: 1;
  height: 10px;
  background: var(--surface-c);
  border: 3px solid var(--ink);
  cursor: pointer;
  position: relative;
}
.t-progress-fill {
  height: 100%;
  background: var(--secondary);
  width: 0%;
  transition: width 0.2s linear;
}

.transport-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.vol-icon {
  font-size: 14px;
  color: var(--tertiary);
}
.vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 90px; height: 6px;
  background: var(--surface-c);
  border: 2px solid var(--ink);
  cursor: pointer; outline: none;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--tertiary);
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* Drag-over stage */
.stage-crt.drag-over { border-color: var(--primary); }

/* ════════════════════════
   LIBRARY VIEW
   ════════════════════════ */

.tape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tape-card {
  background: var(--surface-c);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.tape-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 0 rgba(21,16,31,1);
}
.tape-card:active { transform: translate(2px,2px); box-shadow: none; }

.tape-cover {
  width: 100%;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
}
/* Gradient art for each genre */
.tape-cover.lofi  { background: linear-gradient(135deg, #e98fb0 0%, #f2a65a 60%, #8fd9c3 100%); }
.tape-cover.chip  { background: linear-gradient(135deg, #8fd9c3 0%, #5bbfa8 50%, #322a47 100%); }
.tape-cover.ambient { background: linear-gradient(135deg, #322a47 0%, #4a3060 50%, #8fd9c3 100%); }

.tape-cover-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.2) 0px,
    rgba(0,0,0,0.2) 1px,
    transparent 1px,
    transparent 3px
  );
}
.tape-cover-emoji {
  font-size: 40px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

.tape-card-body {
  padding: 12px;
}
.tape-card-genre {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--primary-c);
  margin-bottom: 6px;
}
.tape-card-title {
  font-size: 14px; font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 2px;
}
.tape-card-sub {
  font-size: 12px;
  color: var(--on-sv);
}

/* ════════════════════════
   VIBE CONSOLE VIEW
   ════════════════════════ */
#view-vibes {}

.vibe-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: start;
}

.vibe-col-header {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.col-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--on-surface);
}
.col-meta {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--outline-v);
}

.vibe-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.vibe-mode-card {
  background: var(--surface-c);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.vibe-mode-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow-xl);
}
.vibe-mode-card:active { transform: translate(2px,2px); box-shadow: none; }
.vibe-mode-card.active {
  outline: 4px solid var(--primary-c);
  outline-offset: -4px;
  box-shadow: var(--shadow-xl);
}

.vibe-mode-preview {
  height: 120px;
  background: var(--ink);
  border-bottom: 4px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.vibe-mode-preview canvas {
  width: 100%; height: 100%;
  display: block;
  image-rendering: pixelated;
  opacity: 0.85;
}
.vibe-mode-preview-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21,16,31,0.4), transparent);
  pointer-events: none;
}
.vibe-mode-footer {
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-cx);
}
.vibe-mode-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--on-surface);
}
.vibe-mode-icon {
  font-size: 16px;
  color: var(--primary);
}
.vibe-mode-card:not(.active) .vibe-mode-footer { background: var(--surface-c); }
.vibe-mode-card:not(.active) .vibe-mode-icon { color: var(--on-sv); }

.vibe-import-note {
  font-size: 11px;
  color: var(--outline);
  padding: 8px 0;
}

/* Color theme list */
.vibe-theme-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.vibe-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-c);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.vibe-theme-row:hover { transform: translate(-1px,-1px); }
.vibe-theme-row:active { transform: translate(2px,2px); box-shadow: none; }
.vibe-theme-row.active {
  outline: 3px solid var(--on-surface);
  outline-offset: -3px;
  box-shadow: var(--shadow-xl);
}

.vibe-theme-left { display: flex; align-items: center; gap: 12px; }
.vibe-theme-swatches { display: flex; gap: 4px; }
.theme-swatch {
  width: 18px; height: 18px;
  border: 2px solid var(--ink);
}
.vibe-theme-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--on-surface);
}
.vibe-theme-check {
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
  opacity: 0;
}
.vibe-theme-row.active .vibe-theme-check { opacity: 1; }

.btn-surprise {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--secondary);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 14px 20px;
  width: 100%;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-surprise:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-surprise:active { transform: translate(2px,2px); box-shadow: none; }

/* ════════════════════════
   SETTINGS VIEW
   ════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-panel {
  background: var(--surface-c);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  overflow: hidden;
}

.settings-panel-header {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-ch);
  border-bottom: 3px solid var(--ink);
  padding: 12px 16px;
}
.settings-panel-icon { font-size: 14px; color: var(--primary); }
.settings-panel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--on-surface);
}

.settings-dropzone {
  margin: 16px;
  border: 3px dashed rgba(255,255,255,0.15);
  padding: 28px 16px;
  text-align: center;
}
.sdz-icon { font-size: 24px; color: var(--on-sv); margin-bottom: 8px; }
.sdz-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--on-surface);
  margin-bottom: 6px;
}
.sdz-sub { font-size: 12px; color: var(--on-sv); }

.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 16px;
}
.settings-row:last-of-type { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 700; color: var(--on-surface); }
.settings-row-desc  { font-size: 11px; color: var(--on-sv); margin-top: 2px; }

/* Toggle */
.toggle-label { cursor: pointer; flex-shrink: 0; }
.toggle-label input { display: none; }
.toggle-track {
  display: flex; align-items: center;
  width: 48px; height: 24px;
  background: var(--surface-cx);
  border: 2px solid var(--ink);
  padding: 2px;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-label input:checked ~ .toggle-track {
  background: rgba(150,224,202,0.2);
  border-color: var(--tertiary);
}
.toggle-label input:checked ~ .toggle-track.on-always,
.on-always { background: rgba(150,224,202,0.2) !important; border-color: var(--tertiary) !important; }
.toggle-thumb {
  width: 16px; height: 16px;
  background: var(--on-sv);
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}
.toggle-label input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(24px);
  background: var(--tertiary);
}

.pixel-select {
  font-family: 'Pixelify Sans', monospace;
  font-size: 13px;
  color: var(--on-surface);
  background: var(--surface-cx);
  border: 2px solid var(--outline-v);
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}
.pixel-select:focus { border-color: var(--primary); }

.pixel-input {
  font-family: 'Pixelify Sans', monospace;
  font-size: 13px;
  color: var(--primary-c);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--outline-v);
  padding: 4px 0;
  text-align: right;
  outline: none;
  width: 140px;
}
.pixel-input:focus { border-bottom-color: var(--primary); }

.profile-badge {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-1);
  border: 3px solid var(--outline-v);
  padding: 12px 16px;
  margin: 16px;
}
.profile-avatar {
  font-size: 24px; color: var(--secondary);
  width: 44px; height: 44px;
  background: var(--surface-c);
  border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-level {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--primary);
  margin-bottom: 4px;
}
.profile-since {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--outline);
  letter-spacing: 1px;
}

.about-body {
  padding: 16px;
  color: var(--on-sv);
  line-height: 1.6;
  font-size: 14px;
}
.about-version {
  margin-top: 12px;
  font-size: 12px;
  color: var(--outline);
}

.btn-back-to-player {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--tertiary);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 14px 20px;
  width: calc(100% - 32px);
  margin: 16px;
  display: block;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-back-to-player:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-back-to-player:active { transform: translate(2px,2px); box-shadow: none; }

/* ════════════════════════
   SHARED BUTTONS
   ════════════════════════ */
.btn-primary {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: var(--primary);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-px);
  padding: 14px 22px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translate(4px,4px); box-shadow: none; }
.btn-primary.btn-sm { font-size: 8px; padding: 10px 16px; }

.btn-ghost {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--on-surface);
  background: transparent;
  border: 3px solid var(--outline-v);
  box-shadow: var(--shadow-px);
  padding: 14px 22px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.15s;
}
.btn-ghost:hover { border-color: var(--primary); transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-ghost:active { transform: translate(4px,4px); box-shadow: none; }

/* ════════════════════════
   GAME
   ════════════════════════ */

/* GAME chip — distinct style */
.chip-game {
  border-color: var(--tertiary) !important;
  color: var(--tertiary) !important;
  margin-left: 12px;
}
.chip-game.game-active {
  background: var(--tertiary) !important;
  color: var(--ink) !important;
}

/* Game HUD */
.game-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px;
  z-index: 15;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
}
.game-hud.hidden { display: none; }

.hud-lives, .hud-combo, .hud-score { text-align: center; }
.hud-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px; letter-spacing: 2px;
  color: var(--outline); margin-bottom: 4px;
}
.hud-hearts {
  font-size: 18px;
  color: var(--secondary);
  letter-spacing: 2px;
}
.hud-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--primary);
}
.hud-combo .hud-value { color: var(--tertiary); font-size: 18px; }

/* Game Over overlay */
.game-over-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
}
.game-over-screen.hidden { display: none; }

.go-panel {
  background: var(--surface-c);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 0 rgba(21,16,31,1);
  padding: 32px 40px;
  text-align: center;
  min-width: 320px;
}
.go-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: var(--secondary);
  margin-bottom: 16px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}
.go-divider {
  height: 3px;
  background: repeating-linear-gradient(
    90deg, var(--outline-v) 0px, var(--outline-v) 6px, transparent 6px, transparent 10px
  );
  margin-bottom: 20px;
}
.go-stats { display: flex; gap: 32px; justify-content: center; margin-bottom: 24px; }
.go-stat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; letter-spacing: 1px;
  color: var(--outline); margin-bottom: 6px;
}
.go-stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px; color: var(--on-sv);
}
.go-stat-value.primary { color: var(--primary); font-size: 20px; }
.go-actions { display: flex; gap: 12px; justify-content: center; }

/* Game hint */
.game-hint {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; letter-spacing: 2px;
  color: var(--outline);
  z-index: 15; pointer-events: none;
  animation: blink 1.4s step-end infinite;
}
.game-hint.hidden { display: none; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--outline-v); }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

/* ── Utility ── */
.hidden { display: none !important; }
