:root {
  --dashboard-bg: #1c1d1f;
  --console-border: #111112;
  --plastic-dark: #121314;
  --vfd-bg: #060e0a;
  --vfd-green: #00ff66;
  --vfd-blue: #00b0ff;
  --vfd-dim: #002b11;
  --orange-led: #ff5722;
  --orange-led-dim: #5d200d;
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #080809;
  font-family: sans-serif;
  overflow: hidden;
}

.player-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #26282b 0%, #050607 100%);
}

/* 100% Pantalla Completa Console Dashboard */
.car-dashboard-console {
  width: 100%;
  height: 100vh;
  background: var(--dashboard-bg);
  box-shadow: 
    inset 0 0 60px rgba(0,0,0,0.9),
    0 30px 60px rgba(0,0,0,0.9);
  border-left: 15px solid #141516;
  border-right: 15px solid #141516;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 4%;
  gap: 30px;
  position: relative;
  /* Textura de tablero de auto (plástico inyectado) */
  background-image: 
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 0),
    radial-gradient(rgba(0,0,0,0.5) 1px, transparent 0);
  background-size: 4px 4px;
}

/* REJILLAS DE AIRE ACONDICIONADO */
.air-vents {
  width: 100%;
  max-width: 820px;
  display: flex;
  gap: 40px;
}

.vent-grill {
  flex: 1;
  height: 90px;
  background: #09090a;
  border-radius: 8px;
  border: 4px solid #111;
  box-shadow: 
    inset 0 8px 16px rgba(0,0,0,0.9),
    0 2px 4px rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 8px 12px;
}

.vent-slat {
  width: 100%;
  height: 12px;
  background: linear-gradient(180deg, #242528 0%, #151617 100%);
  border: 1px solid #000;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* DECK AUTO-STEREO */
.car-stereo-deck {
  width: 100%;
  max-width: 820px;
  height: 240px;
  background: var(--plastic-dark);
  border-radius: 8px;
  border: 5px solid #0b0c0d;
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.85),
    inset 0 2px 3px rgba(255,255,255,0.05);
  display: flex;
  padding: 20px;
  gap: 20px;
  position: relative;
  /* Textura de metal cepillado en el estéreo */
  background-image: 
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0.01) 0px,
      rgba(255,255,255,0.01) 1px,
      transparent 1px,
      transparent 2px
    );
}

.deck-section {
  display: flex;
  flex-direction: column;
}

/* PANEL IZQUIERDO (VOLUMEN) */
.left-panel {
  flex: 0 0 110px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-right: 2px solid #0b0c0d;
}

.knob-ring {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: linear-gradient(135deg, #373a40, #09090a);
  padding: 6px;
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.7),
    inset 0 2px 4px rgba(255,255,255,0.1);
  border: 2px solid #000;
}

.volume-knob {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a2c31, #08090a);
  border: 1px solid #000;
  position: relative;
  cursor: pointer;
  transform: rotate(-135deg);
  /* Agarre estriado de goma */
  background-image: repeating-conic-gradient(from 0deg, #09090a 0deg 15deg, #1f2125 15deg 30deg);
  transition: transform 0.05s ease-out;
}

.knob-dot {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--orange-led);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--orange-led);
}

.label-tiny {
  color: #55585d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
}

/* PANEL CENTRAL (DISPLAY VFD RETRO) */
.center-panel {
  flex: 1;
  border: 3px solid #070708;
  border-radius: 4px;
  background-color: #020202;
  padding: 8px 12px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.stereo-brand {
  color: #656971;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-align: center;
}

.vfd-display {
  background: var(--vfd-bg);
  border-radius: 4px;
  height: calc(100% - 25px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 
    inset 0 0 25px #000,
    0 0 10px rgba(0, 255, 102, 0.05);
  border: 1px solid #0f2115;
  position: relative;
  overflow: hidden;
}

/* Reflejo de cristal curvo de pantalla de auto */
.vfd-display::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 45%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
}

.vfd-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vfd-status {
  font-family: 'VT323', monospace;
  color: var(--vfd-blue);
  font-size: 26px;
  text-shadow: 0 0 8px var(--vfd-blue);
  line-height: 1;
}

.vfd-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 25px;
  width: 90px;
}

.eq-bar {
  flex: 1;
  background-color: var(--vfd-green);
  box-shadow: 0 0 6px var(--vfd-green);
  opacity: 0.15;
  transition: height 0.1s ease-out;
}

.player-wrapper.is-playing .eq-bar {
  opacity: 0.95;
}

.vfd-scrolling-text {
  font-family: 'VT323', monospace;
  font-size: 40px;
  color: var(--vfd-green);
  text-shadow: 0 0 10px var(--vfd-green);
  white-space: nowrap;
  letter-spacing: 2px;
  margin: 6px 0;
  overflow: hidden;
  line-height: 1;
}

.vfd-indicators {
  display: flex;
  gap: 15px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1;
}

.vfd-ind {
  color: var(--vfd-dim);
  transition: color 0.3s;
}

.vfd-ind.active {
  color: #ff1744;
  text-shadow: 0 0 6px #ff1744;
}

#indPlay.active {
  color: var(--vfd-green);
  text-shadow: 0 0 6px var(--vfd-green);
}

/* PANEL DERECHO (BOTONES RETROILUMINADOS Y CD) */
.right-panel {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 2px solid #0b0c0d;
  padding-left: 20px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tactical-btn {
  background: linear-gradient(180deg, #2b2c30 0%, #151617 100%);
  border: 2px solid #000;
  border-radius: 4px;
  color: var(--orange-led-dim);
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 
    inset 0 1px 1px rgba(255,255,255,0.05), 
    0 3px 6px rgba(0,0,0,0.6);
  font-size: 13px;
  font-weight: 800;
  transition: all 0.2s;
}

.tactical-btn:hover {
  color: #ff8a65;
}

.tactical-btn:active {
  background: #0f1011;
  box-shadow: inset 0 2px 4px #000;
  transform: translateY(1px);
}

/* Botón de encendido (Play) retroiluminado */
.player-wrapper.is-playing .active-pwr {
  color: var(--vfd-green) !important;
  text-shadow: 0 0 8px var(--vfd-green);
  box-shadow: 
    0 0 10px rgba(0,255,102,0.2),
    inset 0 1px 1px rgba(255,255,255,0.05);
  background: linear-gradient(180deg, #1f3624 0%, #0d1a0f 100%);
  border-color: #0f2d15;
}

.player-wrapper.is-online .tactical-btn:not(.active-pwr) {
  color: var(--orange-led);
  text-shadow: 0 0 6px var(--orange-led);
}

.tactical-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* RANURA DE DISCO COMPACTO */
.disc-slot {
  width: 100%;
  height: 16px;
  background-color: #050506;
  border-radius: 8px;
  margin-top: 10px;
  position: relative;
  border-top: 2px solid #373a40;
  border-bottom: 2px solid #000;
  box-shadow: inset 0 3px 6px #000;
}

.slot-entry {
  position: absolute;
  top: 5px; left: 10px; right: 10px;
  height: 2px;
  background-color: #000;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8);
}

.slot-light {
  position: absolute;
  top: 4px;
  right: 15px;
  width: 25px;
  height: 2px;
  background-color: var(--orange-led-dim);
  opacity: 0.6;
  transition: all 0.3s;
}

.player-wrapper.is-playing .slot-light {
  background-color: var(--vfd-blue);
  box-shadow: 0 0 8px var(--vfd-blue);
  opacity: 1;
}

/* Indicadores de Clima inferiores de consola */
.console-lower-indicator {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}
.temp-indicator {
  width: 20px;
  height: 4px;
  border-radius: 2px;
  opacity: 0.25;
}
.blue-temp { background-color: var(--vfd-blue); }
.red-temp { background-color: #ff1744; }

.player-wrapper.is-online .blue-temp { opacity: 0.85; box-shadow: 0 0 6px var(--vfd-blue); }
.player-wrapper.is-playing .red-temp { opacity: 0.85; box-shadow: 0 0 6px #ff1744; }

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .car-dashboard-console {
    height: auto;
    min-height: 100vh;
    padding: 30px 15px;
    gap: 20px;
    justify-content: center;
  }
  
  .air-vents {
    display: none;
  }
  
  .car-stereo-deck {
    flex-direction: column;
    height: auto;
    max-width: 480px;
  }
  
  .left-panel {
    flex-direction: row;
    justify-content: space-between;
    border-right: none;
    border-bottom: 2px solid #0b0c0d;
    padding-bottom: 15px;
    flex: none;
  }
  .knob-ring { width: 70px; height: 70px; }
  
  .right-panel {
    border-left: none;
    border-top: 2px solid #0b0c0d;
    padding-left: 0;
    padding-top: 15px;
    flex: none;
  }
}

/* === Carátula "ahora suena" tras el display VFD ([data-cover]) === */
/* El velo verde-negro mantiene el fósforo VFD legible sobre el arte. */
.vfd-display[style*="background-image"] {
  box-shadow:
    inset 0 0 0 999px rgba(0, 14, 6, 0.74),
    inset 0 0 25px #000,
    0 0 10px rgba(0, 255, 102, 0.05);
}

/* Área táctil más cómoda para el botón principal en móvil */
.tactical-btn.active-pwr { min-height: 44px; }
