/* ==========================================================================
   RECEPTOR DE RADIO ANTIGUA - FORMATO HORIZONTAL PANORÁMICO (1000px x 200px)
   ========================================================================== */

:root {
  --wood-dark: #1f1007;
  --wood-mid: #3a1e0d;
  --wood-light: #5a3016;
  --wood-highlight: #7a4220;
  
  --brass-dark: #634d19;
  --brass-mid: #a68432;
  --brass-light: #d6b358;
  --brass-bright: #ffe28a;
  
  --dial-bg-off: #16120c;
  --dial-bg-on: #2e2010;
  --dial-glow: rgba(255, 175, 55, 0.4);
  --pointer-color: #e63920;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Cinzel', serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-typewriter: 'Special Elite', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sans);
}

.radio-wrapper {
  width: 100%;
  max-width: 1000px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* GABINETE DE MADERA HORIZONTAL */
.radio-cabinet {
  width: 100%;
  max-width: 1000px;
  height: 196px;
  background: radial-gradient(ellipse at 50% 30%, #4a2712 0%, #2e160a 60%, #150903 100%);
  border: 3px solid var(--brass-mid);
  border-radius: 12px;
  box-shadow: 
    inset 0 1px 3px rgba(255, 255, 255, 0.25),
    inset 0 0 15px rgba(0, 0, 0, 0.9),
    0 8px 25px rgba(0, 0, 0, 0.6);
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 265px;
  gap: 10px;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.4s ease;
}

.radio-cabinet.power-on {
  box-shadow: 
    inset 0 1px 4px rgba(255, 226, 138, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(255, 175, 55, 0.15);
}

/* ==========================================================================
   PANEL IZQUIERDO: POWER, PLACA, VÚMETRO, OJO MÁGICO Y VOLUMEN
   ========================================================================== */
.panel-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border-right: 1.5px solid rgba(166, 132, 50, 0.3);
  padding-right: 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}

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

/* Power switch */
.power-section {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #110904;
  padding: 2px 4px;
  border-radius: 5px;
  border: 1px solid #3d2410;
}

.plate-label {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: bold;
  color: var(--brass-mid);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 13px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-lever {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #080402;
  border-radius: 14px;
  border: 1px solid var(--brass-dark);
  transition: 0.25s;
}

.toggle-lever:before {
  position: absolute;
  content: "";
  height: 7px;
  width: 7px;
  left: 2px;
  bottom: 2px;
  background: linear-gradient(180deg, #d8d8d8, #666);
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

input:checked + .toggle-lever {
  background: #2b1807;
  border-color: var(--brass-bright);
}

input:checked + .toggle-lever:before {
  transform: translateX(11px);
  background: linear-gradient(180deg, #ffd768, #b28217);
}

/* Joya / Jewel Lamp */
.jewel-lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #400505;
  border: 1px solid var(--brass-dark);
  position: relative;
}

.jewel-glow {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff5555 0%, #aa0000 60%, #440000 100%);
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.radio-cabinet.power-on .jewel-glow {
  opacity: 1;
  box-shadow: 0 0 8px #ff2222, 0 0 14px #ff0000;
}

/* Placa Vintage */
.vintage-badge {
  background: linear-gradient(180deg, #2b1b0e 0%, #150b05 100%);
  border: 1.5px solid var(--brass-mid);
  border-radius: 4px;
  padding: 2px 4px;
  text-align: right;
}

.badge-subtitle {
  display: block;
  font-size: 5px;
  letter-spacing: 0.5px;
  color: var(--brass-light);
}

.badge-title {
  font-size: 9px;
  font-weight: 900;
  color: var(--brass-bright);
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Fila inferior izquierda */
.left-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 5, 2, 0.7);
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid #331c0b;
}

/* Ojo Mágico 6E5 */
.magic-eye-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tube-glass {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #081108 0%, #020502 100%);
  border: 1.5px solid var(--brass-dark);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 6px #000;
}

.tube-target {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #0d2e14;
  transition: all 0.3s;
}

.radio-cabinet.power-on .tube-target {
  background: radial-gradient(circle, #44ff77 0%, #00cc44 50%, #004411 90%);
  box-shadow: 0 0 10px #00ff55;
}

.tube-shadow-left, .tube-shadow-right {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #020803;
  transform-origin: 0 0;
  opacity: 0.85;
}

.tube-shadow-left {
  transform: rotate(45deg);
}

.tube-shadow-right {
  transform: rotate(135deg);
}

.tube-center-cap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #2a2a2a, #0a0a0a);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #000;
  z-index: 3;
}

.tube-reflection {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
}

/* Vúmetro Analógico */
.vu-meter-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vu-meter {
  width: 52px;
  height: 34px;
  background: #f4ecd8;
  border: 1.5px solid var(--brass-dark);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.6);
}

.radio-cabinet.power-on .vu-meter {
  background: #fff6d9;
}

.vu-scale {
  position: absolute;
  top: 2px;
  left: 3px;
  right: 3px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 5.5px;
  font-weight: bold;
  color: #333;
}

.vu-red {
  color: #cc0000 !important;
}

.vu-needle-pivot {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #111;
  border-radius: 50%;
}

.vu-needle {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 1px;
  height: 24px;
  background: #e63920;
  transform-origin: bottom center;
  transform: rotate(-35deg);
  transition: transform 0.08s ease-out;
}

.mini-label {
  font-family: var(--font-mono);
  font-size: 5.5px;
  color: #a89070;
  letter-spacing: 0.5px;
}

/* Perillas compactas */
.knob-compact-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.control-title-mini {
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: bold;
  color: var(--brass-light);
  letter-spacing: 0.5px;
}

.knob-container {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b1d11 0%, #0d0703 80%);
  border: 1px solid #4a341b;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.knob {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #523419 0%, #1c0f05 75%, #0d0703 100%);
  border: 1px solid var(--brass-mid);
  position: relative;
  cursor: grab;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 2px 4px rgba(0,0,0,0.7);
}

.knob-face {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px dashed rgba(214, 179, 88, 0.4);
}

.knob-indicator {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 5px;
  background: #ffcc44;
  border-radius: 1px;
  box-shadow: 0 0 3px #ffaa00;
}

/* ==========================================================================
   PANEL CENTRAL: DIAL PANORÁMICO E INFO CARD
   ========================================================================== */
.panel-center {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-width: 0; /* IMPEDIR QUE EL TEXTO DESBORDE LA COLUMNA GRID */
  overflow: hidden;
  box-sizing: border-box;
}

.dial-bezel {
  background: linear-gradient(180deg, #3d2a15 0%, #1c1005 50%, #4a341b 100%);
  padding: 3px;
  border-radius: 6px;
  border: 1.5px solid var(--brass-mid);
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.2), 0 2px 6px rgba(0,0,0,0.8);
}

.dial-glass {
  position: relative;
  height: 64px;
  background: var(--dial-bg-off);
  border-radius: 4px;
  border: 1px solid #0a0603;
  overflow: hidden;
  box-shadow: inset 0 0 10px #000;
  cursor: ew-resize;
  transition: background 0.4s ease;
}

.radio-cabinet.power-on .dial-glass {
  background: var(--dial-bg-on);
}

.dial-light-warm {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 185, 75, 0.3) 0%, transparent 80%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.radio-cabinet.power-on .dial-light-warm {
  opacity: 1;
}

.dial-scale-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 10px;
}

.dial-band {
  position: relative;
  height: 18px;
}

.band-name {
  position: absolute;
  top: 1px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 6px;
  color: var(--brass-light);
  letter-spacing: 0.5px;
}

.band-ticks {
  position: relative;
  width: 100%;
  height: 100%;
}

.tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 5px;
  background: #6a4f28;
}

.tick.major {
  height: 8px;
  background: var(--brass-light);
}

.tick i {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 6.5px;
  color: #cca450;
}

.stations-dial-markers {
  position: relative;
  width: 100%;
  height: 14px;
}

.station-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 5;
}

.marker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5a3c18;
  border: 1px solid var(--brass-dark);
}

.station-marker.active .marker-dot {
  background: #ffcc00;
  border-color: #fff;
  box-shadow: 0 0 5px #ffcc00;
}

.marker-text {
  font-family: var(--font-mono);
  font-size: 5.5px;
  color: #997a4d;
  font-weight: bold;
}

.station-marker.active .marker-text {
  color: #ffe28a;
}

.dial-pointer-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dial-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  z-index: 6;
  transition: left 0.15s ease-out;
}

.pointer-line {
  position: absolute;
  inset: 0;
  background: var(--pointer-color);
  box-shadow: 0 0 4px rgba(230, 57, 32, 0.8);
}

.pointer-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 5px;
  background: #ffaa00;
  border: 1px solid #fff;
  box-shadow: 0 0 4px #ffaa00;
}

.dial-glass-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.12) 0%, transparent 40%, rgba(255,255,255,0.04) 60%, transparent 100%);
  pointer-events: none;
  z-index: 7;
}

/* Card Informativo Horizontal */
.info-card-horizontal {
  background: linear-gradient(180deg, #181008 0%, #0e0804 100%);
  border: 1px solid #362211;
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 98px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.8);
}

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

.title-and-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.station-frequency-badge {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: bold;
  background: #2b1a0e;
  color: var(--brass-bright);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--brass-dark);
}

.station-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #fff2d0;
  line-height: 1;
}

.station-status-text {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: #8c7355;
}

.radio-cabinet.power-on .station-status-text.playing {
  color: #4ade80;
}

/* Carrusel de Descripción */
.desc-carousel-container {
  position: relative;
  width: 100%;
  height: 32px;
  overflow: hidden;
  background: rgba(6, 3, 1, 0.8);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #331d0d;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
  cursor: pointer;
}

.desc-carousel-container:hover .desc-carousel-track {
  animation-play-state: paused;
}

.desc-carousel-track {
  display: inline-flex;
  white-space: nowrap;
  animation: descMarquee 35s linear infinite;
  will-change: transform;
}

.station-desc {
  font-family: var(--font-typewriter);
  font-size: 13.5px;
  color: #ffe6ba;
  letter-spacing: 0.3px;
  padding-right: 50px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

@keyframes descMarquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* Barra de Progreso */
.audio-progress-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--brass-light);
  min-width: 26px;
}

.progress-bar-wrapper {
  flex: 1;
  height: 5px;
  background: #080503;
  border-radius: 3px;
  border: 1px solid #4a341b;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9c7b28, #d4af37, #ffe082);
  border-radius: 2px;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffdd77;
  border: 1px solid #5a3c10;
  pointer-events: none;
  opacity: 0;
}

/* ==========================================================================
   PANEL DERECHO: SELECTOR CLASE, PRESETS, TUNING Y TRANSPORTE
   ========================================================================== */
.panel-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border-left: 1.5px solid rgba(166, 132, 50, 0.3);
  padding-left: 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}

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

.class-selector-tabs {
  display: flex;
  gap: 3px;
  background: #0f0804;
  padding: 2px 3px;
  border-radius: 4px;
  border: 1px solid #3d2410;
}

.class-tab-btn {
  background: #24150a;
  border: 1px solid #5a3a18;
  border-radius: 3px;
  color: #b09575;
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.class-tab-btn:hover {
  color: #fff;
  border-color: var(--brass-light);
}

.class-tab-btn.active {
  background: linear-gradient(180deg, #704e20 0%, #3d260c 100%);
  color: #ffe082;
  border-color: #ffd54f;
  box-shadow: 0 0 5px rgba(255, 213, 79, 0.4);
}

.mode-section {
  display: flex;
  align-items: center;
  gap: 3px;
}

.icon-button {
  background: #150b05;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--brass-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-button:hover {
  border-color: var(--brass-bright);
}

.btn-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #332211;
}

.btn-indicator.active {
  background: #ffaa00;
  box-shadow: 0 0 3px #ffaa00;
}

.icon-label {
  font-family: var(--font-mono);
  font-size: 5.5px;
}

.icon-symbol {
  font-size: 7.5px;
}

/* Presets */
.presets-keyboard-section {
  background: linear-gradient(180deg, #24150b 0%, #150b05 100%);
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid #3d2410;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.preset-btn {
  background: linear-gradient(180deg, #3d2817 0%, #1e1208 60%, #0d0703 100%);
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  padding: 3px 1px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.7);
  position: relative;
}

.preset-btn:hover {
  border-color: var(--brass-light);
}

.preset-btn:active {
  transform: translateY(1px);
}

.preset-btn.active {
  background: linear-gradient(180deg, #593c18 0%, #301f0c 60%, #190f05 100%);
  border-color: var(--brass-bright);
}

.preset-num {
  font-family: var(--font-serif);
  font-size: 8.5px;
  font-weight: 900;
  color: var(--brass-bright);
  line-height: 1;
}

.preset-freq {
  font-family: var(--font-mono);
  font-size: 5px;
  color: #a89070;
}

.preset-indicator {
  position: absolute;
  bottom: 1px;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #332211;
}

.preset-btn.active .preset-indicator {
  background: #ffcc00;
  box-shadow: 0 0 3px #ffcc00;
}

/* Fila inferior derecha */
.right-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 5, 2, 0.7);
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid #331c0b;
}

/* Transporte de audio */
.playback-buttons-bar {
  display: flex;
  gap: 4px;
}

.transport-btn {
  background: linear-gradient(180deg, #3d2817 0%, #1e1208 70%, #0d0703 100%);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  color: var(--brass-light);
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.transport-btn:hover {
  border-color: var(--brass-bright);
  color: #fff;
}

.transport-btn.play-btn {
  width: 28px;
  height: 28px;
  background: linear-gradient(180deg, #593c18 0%, #2b1807 70%, #150902 100%);
  border-color: var(--brass-mid);
  color: var(--brass-bright);
  font-size: 11px;
}
