:root {
  --primary-color: #00f2fe;
  --secondary-color: #4facfe;
  --accent-color: #ff007f;
  --bg-glass: rgba(10, 15, 30, 0.75);
  --border-glass: rgba(255, 255, 255, 0.15);
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Montserrat', sans-serif;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: transparent;
  font-family: var(--font-body);
  color: var(--text-main);
}

/* ==========================================================================
   VIDEO CONTAINER & PLAYERS
   ========================================================================== */
.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

.player-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.8s ease-in-out;
}

.player-wrapper.hidden {
  opacity: 0;
  pointer-events: none;
}

#yt-player-div, #yt-player-div iframe {
  width: 100vw;
  height: 56.25vw; /* 16:9 Aspect Ratio */
  min-height: 100vh;
  min-width: 177.77vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.35);
  border: none;
  pointer-events: none;
}


video#local-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#youtube-player-wrapper {
  z-index: 2;
}

#local-player-wrapper {
  z-index: 3;
}

/* Fallback Background */
.fallback-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  z-index: 1;
  transition: opacity 0.6s ease-in-out;
}

video.station-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 1;
}

video.station-bg-video.hidden {
  display: none;
}

/* Ocultar logo del centro y orbes incandescentes cuando el video de fondo de la emisora está activo */
video.station-bg-video:not(.hidden) ~ .center-radio-visual,
video.station-bg-video:not(.hidden) ~ .glow-orb {
  display: none !important;
}


.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: pulseOrb 8s infinite alternate ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-color);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: var(--primary-color);
  bottom: -150px;
  right: -150px;
}

/* Center Radio Visual Graphic (Fallback BG & Jingle Station Identification) */
.center-radio-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}

.radio-logo-card {
  width: 420px;
  max-width: 80vw;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseLogoCard 3.5s infinite alternate ease-in-out;
}

.radio-center-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.6)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.4));
}

@keyframes pulseLogoCard {
  0% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5)); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 45px rgba(239, 68, 68, 0.7)); }
}


/* ==========================================================================
   TOP CONTROLS & STATION BADGE (TOP RIGHT)
   ========================================================================== */
.top-controls {
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 15px;
}

.audio-toggle-btn {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  pointer-events: auto;
}

.audio-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.station-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  padding: 10px 22px;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 242, 254, 0.2);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 14px;
}

.live-dot {
  width: 12px;
  height: 12px;
  background-color: #ff0055;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff0055;
  animation: blink 1.2s infinite ease-in-out;
}


@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.badge-separator {
  color: rgba(255, 255, 255, 0.3);
}

.station-name {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  text-transform: uppercase;
}

/* ==========================================================================
   SONG BANNER OVERLAY (BOTTOM LEFT HD GLASSMORPHISM GRAND)
   ========================================================================== */
.song-banner {
  position: absolute;
  bottom: 60px;
  left: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px solid rgba(6, 182, 212, 0.5);
  padding: 22px 36px 22px 24px;
  border-radius: 28px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(6, 182, 212, 0.35);
  max-width: 920px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.song-banner.updated {
  animation: bannerSlideIn 0.7s ease-out;
}

@keyframes bannerSlideIn {
  0% { transform: translateY(40px) scale(0.92); opacity: 0; filter: blur(10px); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}

/* Vinyl Disc Spinner con Logo Oficial */
.cover-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #222 25%, #111 26%, #111 40%, #222 41%, #050505 100%);
  border: 2px solid rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-disc.spinning {
  animation: rotateDisc 5s linear infinite;
}

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

.vinyl-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid rgba(6, 182, 212, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.vinyl-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.8));
}

/* Text & Info */
.song-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.now-playing-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.song-artist {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.song-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Equalizer Bars */
.equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
}

.equalizer-bars .bar {
  width: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  animation: eqBounce 1s infinite ease-in-out alternate;
}

.equalizer-bars .bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.equalizer-bars .bar:nth-child(2) { height: 80%; animation-delay: 0.3s; }
.equalizer-bars .bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.equalizer-bars .bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }

@keyframes eqBounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* ==========================================================================
   TICKER BAR INFORMATIVA (PARTE INFERIOR)
   ========================================================================== */
.ticker-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 38px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(6, 182, 212, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 25;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-badge {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #0f172a;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 900;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
  z-index: 2;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: tickerMove 25s linear infinite;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 1px;
}

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

