/* ============================================
   RETRO DJ STUDIO — STYLE SYSTEM
   Lo-fi analog aesthetic with CRT, vinyl, knobs
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* CRT Colors */
  --crt-green: #33ff66;
  --crt-green-dim: #1a8033;
  --crt-green-glow: rgba(51, 255, 102, 0.35);
  --crt-green-dark: #0a1f0e;
  --crt-amber: #ffb833;
  --crt-amber-dim: #8a6320;
  --crt-amber-glow: rgba(255, 184, 51, 0.35);

  /* Console Colors */
  --console-bg: #2a2520;
  --console-surface: #3a3530;
  --console-dark: #1a1815;
  --console-edge: #4a4540;
  --metal-light: #6e6a65;
  --metal-mid: #55514c;
  --metal-dark: #3d3935;
  --screw-color: #8a8580;

  /* Wood Trim */
  --wood-base: #5c3a1e;
  --wood-light: #7a5232;
  --wood-dark: #3e2510;

  /* LEDs */
  --led-green: #33ff66;
  --led-amber: #ffaa00;
  --led-red: #ff3333;
  --led-off: #333;

  /* Knob Colors */
  --knob-body: #4a4540;
  --knob-cap: #5a5550;
  --knob-indicator: #ff6633;

  /* Typography */
  --font-crt: 'VT323', monospace;
  --font-label: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  /* Spacing */
  --gap: 12px;
  --radius: 6px;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e0c0a;
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(60,50,40,0.4) 0%, transparent 70%);
  font-family: var(--font-mono);
  color: #aaa;
  overflow-x: hidden;
  padding: 20px;
}

/* --- Noise Overlay (film grain) --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: noiseShift 0.3s steps(3) infinite;
}

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2px, 1px); }
  66% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* --- Console Shell --- */
.console-shell {
  width: 100%;
  max-width: 1200px;
  background: var(--console-bg);
  border-radius: 12px;
  box-shadow:
    0 2px 0 var(--console-edge),
    0 4px 0 var(--console-dark),
    0 20px 60px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  /* Brushed metal texture */
  background-image:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.03) 0%,
      transparent 2%,
      transparent 98%,
      rgba(0,0,0,0.1) 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(255,255,255,0.008) 1px,
      rgba(255,255,255,0.008) 2px
    );
  background-color: var(--console-bg);
}

/* --- Header --- */
.console-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: linear-gradient(180deg, #3a3530 0%, #2a2520 100%);
  border-bottom: 2px solid #1a1815;
  position: relative;
}

.header-screw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #aaa 0%, #666 40%, #444 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.1);
  position: absolute;
}
.header-screw.left { left: 18px; }
.header-screw.right { right: 18px; }
.header-screw::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
}

.header-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brand-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led-green);
  box-shadow: 0 0 8px var(--led-green), 0 0 20px rgba(51,255,102,0.3);
  margin-bottom: 4px;
  animation: ledPulse 2s ease-in-out infinite;
}

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

.brand-title {
  font-family: var(--font-label);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: #ddd;
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.brand-accent {
  color: var(--crt-green);
  text-shadow: 0 0 12px var(--crt-green-glow);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: #777;
  text-transform: uppercase;
}

/* --- Main Body --- */
.console-body {
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  gap: var(--gap);
  padding: var(--gap);
  min-height: 520px;
}

/* --- Panels --- */
.panel {
  background: var(--console-surface);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 4px rgba(0,0,0,0.3);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.panel-label {
  font-family: var(--font-label);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: #666;
  text-align: center;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ===========================
   TURNTABLE (Left Panel)
   =========================== */
.turntable-housing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turntable-base {
  width: 220px;
  height: 220px;
  background: #222;
  border-radius: 10px;
  position: relative;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.6),
    0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  /* aged plastic texture */
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.03) 0%, transparent 50%),
    linear-gradient(135deg, #252525 0%, #1e1e1e 50%, #222 100%);
}

.platter {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #333;
  box-shadow:
    inset 0 0 10px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vinyl {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #1a1a1a 0%,
    #111 20%,
    #1a1a1a 21%,
    #0f0f0f 40%,
    #1a1a1a 41%,
    #111 60%,
    #1a1a1a 61%,
    #0d0d0d 80%,
    #1a1a1a 81%,
    #111 100%
  );
  position: relative;
  animation: spin 2s linear infinite;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.vinyl.slow {
  animation-duration: 5s;
}

.vinyl.stopped {
  animation-play-state: paused;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, #e84830 0%, #c03020 60%, #8a2018 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
  z-index: 2;
}

.vinyl-label-text {
  font-family: var(--font-label);
  font-size: 0.4rem;
  color: #fff;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.vinyl-groove {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.vinyl-groove.g1 { width: 70px; height: 70px; }
.vinyl-groove.g2 { width: 90px; height: 90px; }
.vinyl-groove.g3 { width: 110px; height: 110px; }
.vinyl-groove.g4 { width: 130px; height: 130px; }
.vinyl-groove.g5 { width: 148px; height: 148px; }
.vinyl-groove.g6 { width: 162px; height: 162px; }

.vinyl-spindle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #999 0%, #666 100%);
  box-shadow: 0 0 3px rgba(0,0,0,0.6);
  z-index: 3;
}

/* Tonearm */
.tonearm-pivot {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 12px;
  height: 12px;
  z-index: 5;
}

.tonearm {
  width: 90px;
  height: 4px;
  background: linear-gradient(90deg, #999 0%, #777 100%);
  border-radius: 2px;
  position: absolute;
  top: 50%;
  right: 0;
  transform-origin: right center;
  transform: translateY(-50%) rotate(-30deg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transition: transform 0.8s ease;
}

.tonearm.playing {
  transform: translateY(-50%) rotate(-55deg);
}

.tonearm-head {
  position: absolute;
  left: -6px;
  top: -3px;
  width: 10px;
  height: 10px;
  background: #888;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.tonearm-counterweight {
  position: absolute;
  right: 10px;
  top: -4px;
  width: 14px;
  height: 12px;
  background: radial-gradient(circle, #888 0%, #555 100%);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.speed-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.speed-dot {
  font-family: var(--font-label);
  font-size: 0.5rem;
  color: #555;
  cursor: pointer;
  transition: color 0.3s;
}
.speed-dot.active {
  color: var(--crt-green);
  text-shadow: 0 0 6px var(--crt-green-glow);
}

/* VU Meters */
.vu-meters {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.vu-meter {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vu-label {
  font-family: var(--font-label);
  font-size: 0.5rem;
  color: #666;
  width: 12px;
}

.vu-bar-track {
  flex: 1;
  height: 8px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.vu-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--crt-green) 0%, var(--crt-green) 60%, #ffaa00 80%, #ff3333 100%);
  border-radius: 2px;
  transition: width 0.15s ease;
  box-shadow: 0 0 4px var(--crt-green-glow);
}

/* ===========================
   CRT SCREEN (Center Panel)
   =========================== */
.panel-center {
  gap: 8px;
}

.crt-housing {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crt-bezel {
  flex: 1;
  background: #1a1a18;
  border-radius: 8px;
  padding: 8px;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.6),
    0 1px 0 rgba(255,255,255,0.05);
  display: flex;
}

.crt-screen {
  flex: 1;
  background: var(--crt-green-dark);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.5),
    0 0 8px var(--crt-green-glow);
}

/* CRT Scanlines */
.crt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
}

/* CRT Flicker */
.crt-flicker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  animation: flicker 0.08s infinite;
  background: transparent;
}

@keyframes flicker {
  0% { opacity: 0; }
  5% { opacity: 0.015; background: rgba(51,255,102,0.02); }
  10% { opacity: 0; }
  70% { opacity: 0; }
  72% { opacity: 0.02; background: rgba(51,255,102,0.03); }
  74% { opacity: 0; }
  100% { opacity: 0; }
}

/* CRT Curvature */
.crt-curve {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-radius: 6px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.4),
    inset 2px 2px 4px rgba(0,0,0,0.2),
    inset -2px -2px 4px rgba(0,0,0,0.2);
}

/* Chat Display */
.chat-display {
  position: relative;
  z-index: 2;
  padding: 12px;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Make scrollbar retro */
  scrollbar-width: thin;
  scrollbar-color: var(--crt-green-dim) var(--crt-green-dark);
}

.chat-display::-webkit-scrollbar {
  width: 6px;
}
.chat-display::-webkit-scrollbar-track {
  background: var(--crt-green-dark);
}
.chat-display::-webkit-scrollbar-thumb {
  background: var(--crt-green-dim);
  border-radius: 3px;
}

.chat-message {
  font-family: var(--font-crt);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--crt-green);
  text-shadow: 0 0 6px var(--crt-green-glow);
  word-break: break-word;
  animation: typeIn 0.3s ease;
}

@keyframes typeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
  color: var(--crt-amber);
  text-shadow: 0 0 6px var(--crt-amber-glow);
}

.msg-prefix {
  opacity: 0.6;
  font-size: 0.9rem;
}

.highlight {
  color: #5eff8a;
  font-weight: bold;
}

/* CRT Bottom Controls */
.crt-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px;
}

.crt-knob-small {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #777 0%, #444 60%, #333 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  position: relative;
  cursor: pointer;
}

.crt-knob-small .knob-line {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 5px;
  background: #222;
  border-radius: 1px;
}

.crt-power-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--led-green);
  box-shadow: 0 0 6px var(--led-green);
  animation: ledPulse 2s ease-in-out infinite;
}

/* --- Input Area --- */
.input-housing {
  background: #1a1a18;
  border-radius: 6px;
  padding: 4px;
  box-shadow:
    inset 0 1px 4px rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.03);
}

.input-crt {
  background: var(--crt-green-dark);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.3), 0 0 4px var(--crt-green-glow);
}

.input-scanlines {
  z-index: 1;
}

.input-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.input-prompt {
  font-family: var(--font-crt);
  font-size: 1.2rem;
  color: var(--crt-green);
  text-shadow: 0 0 6px var(--crt-green-glow);
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}

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

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-crt);
  font-size: 1.1rem;
  color: var(--crt-green);
  text-shadow: 0 0 6px var(--crt-green-glow);
  caret-color: var(--crt-green);
}

.chat-input::placeholder {
  color: var(--crt-green-dim);
  text-shadow: none;
}

.send-btn {
  width: 36px;
  height: 28px;
  border: 1px solid var(--crt-green-dim);
  background: rgba(51,255,102,0.08);
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-btn:hover {
  background: rgba(51,255,102,0.15);
  box-shadow: 0 0 8px var(--crt-green-glow);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn-text {
  font-family: var(--font-crt);
  font-size: 0.9rem;
  color: var(--crt-green);
  text-shadow: 0 0 4px var(--crt-green-glow);
  font-weight: bold;
}

/* ===========================
   CONTROLS (Right Panel)
   =========================== */
.panel-right {
  gap: 8px;
  overflow-y: auto;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}

.control-label-top {
  font-family: var(--font-label);
  font-size: 0.5rem;
  letter-spacing: 2px;
  color: #888;
  text-transform: uppercase;
  text-align: center;
}

.control-readout {
  font-family: var(--font-crt);
  font-size: 0.85rem;
  color: var(--crt-green);
  text-shadow: 0 0 6px var(--crt-green-glow);
  text-align: center;
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 2px;
  min-width: 80px;
}

/* --- Knob --- */
.knob-container {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.small-knob-container {
  width: 70px;
  height: 70px;
}

.knob-markings {
  position: absolute;
  inset: 0;
}

.knob-markings .mark {
  position: absolute;
  font-family: var(--font-label);
  font-size: 0.35rem;
  color: #666;
  letter-spacing: 0.5px;
  white-space: nowrap;
  /* Position will be calculated by JS */
}

.knob {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #666 0%, var(--knob-body) 50%, #333 100%);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 0 3px #2a2a2a;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.15s ease;
}

.knob.large {
  width: 62px;
  height: 62px;
}

.knob.medium {
  width: 46px;
  height: 46px;
}

.knob:active {
  cursor: grabbing;
}

.knob-cap {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #6a6a6a 0%, var(--knob-cap) 60%, #3a3a3a 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
  position: relative;
}

.knob-indicator {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  background: var(--knob-indicator);
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(255,102,51,0.5);
}

/* --- Slider --- */
.slider-container {
  width: 100%;
  padding: 0 4px;
}

.slider-track {
  position: relative;
}

.analog-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #222;
  border-radius: 4px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
  outline: none;
  cursor: pointer;
}

.analog-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 26px;
  background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
  border-radius: 3px;
  cursor: grab;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid #333;
}

.analog-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  background: linear-gradient(180deg, #888 0%, #666 40%, #555 100%);
}

.analog-slider::-moz-range-thumb {
  width: 18px;
  height: 26px;
  background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
  border-radius: 3px;
  cursor: grab;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid #333;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 2px;
}

.slider-labels span {
  font-family: var(--font-label);
  font-size: 0.35rem;
  color: #555;
  letter-spacing: 0.5px;
}

/* --- Status LEDs --- */
.status-leds {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  margin-top: auto;
}

.status-led-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.status-led-group span {
  font-family: var(--font-label);
  font-size: 0.4rem;
  color: #555;
  letter-spacing: 1px;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led-off);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
  transition: all 0.3s;
}

.led.green.on {
  background: var(--led-green);
  box-shadow: 0 0 6px var(--led-green), 0 0 12px rgba(51,255,102,0.3);
}

.led.amber.on {
  background: var(--led-amber);
  box-shadow: 0 0 6px var(--led-amber), 0 0 12px rgba(255,170,0,0.3);
  animation: ledPulse 0.5s ease-in-out infinite;
}

.led.red.on {
  background: var(--led-red);
  box-shadow: 0 0 6px var(--led-red), 0 0 12px rgba(255,51,51,0.3);
}

/* ===========================
   FOOTER
   =========================== */
.console-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #2a2520 0%, #222018 100%);
  border-top: 1px solid rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-wrap: wrap;
}

.footer-section {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.footer-label {
  color: #555;
  font-family: var(--font-label);
  font-size: 0.5rem;
  letter-spacing: 1px;
}

.footer-value {
  color: var(--crt-green);
  text-shadow: 0 0 4px var(--crt-green-glow);
  font-family: var(--font-crt);
  font-size: 0.9rem;
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.signal-bar {
  width: 3px;
  background: #333;
  border-radius: 1px;
}
.signal-bar:nth-child(1) { height: 4px; }
.signal-bar:nth-child(2) { height: 6px; }
.signal-bar:nth-child(3) { height: 8px; }
.signal-bar:nth-child(4) { height: 10px; }
.signal-bar:nth-child(5) { height: 13px; }

.signal-bar.on {
  background: var(--crt-green);
  box-shadow: 0 0 3px var(--crt-green-glow);
}

/* Ticker */
.footer-ticker {
  flex: 1;
  min-width: 120px;
  overflow: hidden;
  position: relative;
  height: 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 2px;
}

.ticker-text {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-crt);
  font-size: 0.85rem;
  color: var(--crt-green-dim);
  text-shadow: 0 0 4px rgba(51,255,102,0.15);
  animation: tickerScroll 30s linear infinite;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes tickerScroll {
  from { left: 100%; }
  to { left: -100%; }
}

/* --- Wood Trim --- */
.wood-trim {
  height: 14px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--wood-base) 0px,
      var(--wood-light) 3px,
      var(--wood-base) 5px,
      var(--wood-dark) 8px,
      var(--wood-base) 11px,
      var(--wood-light) 14px,
      var(--wood-dark) 16px,
      var(--wood-base) 20px
    );
  border-radius: 0 0 12px 12px;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.3),
    inset 0 -1px 0 rgba(255,255,255,0.05);
  position: relative;
}

.wood-trim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 40%, rgba(255,255,255,0.03) 100%);
  border-radius: 0 0 12px 12px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .console-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .panel-left {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .turntable-housing {
    flex: 0 0 auto;
  }

  .turntable-base {
    width: 180px;
    height: 180px;
  }

  .platter {
    width: 150px;
    height: 150px;
  }

  .vinyl {
    width: 140px;
    height: 140px;
  }

  .panel-right {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .control-group {
    flex: 1 1 120px;
    min-width: 120px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 8px;
  }

  .brand-title {
    font-size: 1.1rem;
    letter-spacing: 3px;
  }

  .brand-subtitle {
    font-size: 0.5rem;
    letter-spacing: 1px;
  }

  .console-body {
    padding: 8px;
    gap: 8px;
  }
}

/* ===========================
   TYPING INDICATOR
   =========================== */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crt-green);
  box-shadow: 0 0 4px var(--crt-green-glow);
  animation: typingBounce 1s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Character-by-character typing effect */
.chat-message.typing-active .typed-char {
  animation: charAppear 0.05s ease forwards;
  opacity: 0;
}

@keyframes charAppear {
  to { opacity: 1; }
}
