* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #020408;
  color: #c0d4ed;
  font-family: 'Courier Prime', monospace;
  user-select: none;
}

#canvas-container {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
}

#canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Halftone Overlay */
.halftone-screen {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 10;
  background:
    radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12), rgba(0,0,0,0.12) 1px, transparent 1px, transparent 3px);
  opacity: 0.6;
}

/* HUD Overlay */
.hud-overlay {
  position: fixed; z-index: 20; padding: 16px;
}
.top-left { top: 0; left: 0; }
.top-right { top: 0; right: 0; text-align: right; }
.bottom-center {
  bottom: 0; left: 50%; transform: translateX(-50%);
  text-align: center; padding-bottom: 20px;
}

.nav-back {
  color: #5c8abf; text-decoration: none; font-weight: bold;
  font-size: 0.8rem; letter-spacing: 2px;
  background: rgba(4,10,20,0.85); border: 1px solid #1a385c;
  padding: 8px 14px; display: inline-block; transition: all 0.2s;
}
.nav-back:hover {
  color: #00e5ff; border-color: #00e5ff;
  box-shadow: 0 0 15px rgba(0,229,255,0.4);
}

/* Stats Panel */
.stats-panel {
  background: rgba(4,10,20,0.88); border: 1px solid #1a385c;
  padding: 12px 16px; font-size: 0.72rem; line-height: 1.7;
  color: #7d9bbd; letter-spacing: 1px; min-width: 200px;
}
.stats-panel span { color: #00e5ff; font-weight: bold; }
.stats-panel .divider {
  border-top: 1px solid #1a385c; margin: 8px 0;
}

/* Audio Controls */
.audio-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ctrl-label { width: 100%; color: #4e6a88; font-size: 0.65rem; letter-spacing: 2px; }
.ctrl-btn, .file-label {
  background: rgba(0,229,255,0.06); border: 1px solid #1a385c;
  color: #7d9bbd; padding: 4px 10px; font-family: inherit;
  font-size: 0.68rem; letter-spacing: 1px; cursor: pointer;
  transition: all 0.15s;
}
.ctrl-btn:hover, .file-label:hover {
  border-color: #00e5ff; color: #00e5ff;
}
.ctrl-btn.active {
  border-color: #00e5ff; color: #00e5ff;
  background: rgba(0,229,255,0.15);
  box-shadow: 0 0 8px rgba(0,229,255,0.3);
}
.gain-row {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 0.68rem; color: #5c8abf;
}
.gain-row input[type="range"] {
  flex: 1; accent-color: #00e5ff; height: 4px;
}

/* Scene Progress */
#scene-progress-bar {
  width: 300px; height: 3px; background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden; margin-bottom: 8px;
}
#scene-progress-fill {
  height: 100%; width: 0%; background: #00e5ff;
  transition: width 0.3s linear;
}
#scene-label {
  font-size: 0.7rem; letter-spacing: 3px; color: #4e6a88;
}

/* Intro Overlay */
#intro-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at center, rgba(2,6,12,0.8) 0%, rgba(1,3,6,0.96) 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#intro-overlay.hidden { opacity: 0; pointer-events: none; }

.intro-box {
  background: rgba(4,12,24,0.92); border: 1px solid #204570;
  box-shadow: 0 0 35px rgba(0,150,255,0.25);
  padding: 40px; max-width: 560px; width: 90%; text-align: center;
}
.case-tag {
  color: #00e5ff; font-size: 0.72rem; letter-spacing: 3px;
  margin-bottom: 12px; font-weight: bold;
}
.intro-box h1 {
  font-family: 'Special Elite', monospace; font-size: 3.5rem;
  color: #fff; letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(0,229,255,0.6); margin-bottom: 4px;
}
.byline {
  color: #5c8abf; font-size: 0.85rem; letter-spacing: 4px; margin-bottom: 24px;
}
.desc {
  font-size: 0.82rem; line-height: 1.7; color: #9cb5d4; margin-bottom: 28px;
}
.modal-btns { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; }
.modal-btns button {
  background: transparent; color: #00e5ff; border: 1px solid #00e5ff;
  padding: 12px 24px; font-family: inherit; font-weight: bold;
  font-size: 0.8rem; letter-spacing: 2px; cursor: pointer; transition: all 0.2s;
}
.modal-btns button:hover {
  background: #00e5ff; color: #020408;
  box-shadow: 0 0 25px rgba(0,229,255,0.7);
}
.instruction {
  color: #3d5a7a; font-size: 0.68rem; letter-spacing: 2px;
}
