/* ==========================================================================
   MG TV — Cinematic Dark UI Stylesheet
   Palette:
     Bg Primary:   #0d0e12
     Surface:      #16181f
     Input Bg:     #1e222b
     Border Hair:  #242731
     Text Main:    #ffffff
     Text Muted:   #9ca3af
     Accent Gold:  #f59e0b
   ========================================================================== */

:root {
  --bg-main: #0d0e12;
  --bg-surface: #16181f;
  --bg-input: #1e222b;
  --border-subtle: #242731;
  --text-primary: #ffffff;
  --text-muted: #9ca3af;
  --accent-gold: #f59e0b;
  --accent-gold-soft: rgba(245, 158, 11, 0.12);
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --live-red: #dc2626;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Invisible horizontal scrollbars for category chips */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Ultra-minimalist custom vertical scrollbar for channel list */
.channel-scroll::-webkit-scrollbar {
  width: 5px;
}
.channel-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.channel-scroll::-webkit-scrollbar-thumb {
  background: #242731;
  border-radius: 9999px;
}
.channel-scroll::-webkit-scrollbar-thumb:hover {
  background: #363b4a;
}

/* Channel Card Transitions & Active State */
.channel-card {
  position: relative;
  background-color: #1a1d26;
  border: 1px solid var(--border-subtle);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-card:hover {
  background-color: #202430;
  border-color: #323746;
  transform: translateY(-1px);
}

.channel-card.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(26, 29, 38, 0.92) 45%, #1a1d26 100%);
  border-color: rgba(245, 158, 11, 0.65);
  border-left: 3.5px solid var(--accent-gold);
  box-shadow: 0 4px 24px -4px rgba(245, 158, 11, 0.14), inset 0 0 18px rgba(245, 158, 11, 0.05);
}

/* Filter Chip Styling */
.filter-chip {
  background-color: #1b1e27;
  border: 1px solid #262a36;
  color: var(--text-muted);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  color: #e5e7eb;
  border-color: #383e4e;
  background-color: #212530;
}

.filter-chip.active {
  background-color: rgba(245, 158, 11, 0.11);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.12);
}

/* Video Player Container & Controls Hover Logic */
.player-wrapper {
  position: relative;
  background-color: #07080a;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border-subtle);
}

.player-controls-overlay {
  background: linear-gradient(
    to top,
    rgba(9, 10, 14, 0.94) 0%,
    rgba(9, 10, 14, 0.65) 45%,
    rgba(9, 10, 14, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.28s ease;
}

.player-wrapper:hover .player-controls-overlay,
.player-wrapper.controls-visible .player-controls-overlay {
  opacity: 1;
}

/* Subtle top vignette for overlays readability */
.player-top-gradient {
  background: linear-gradient(
    to bottom,
    rgba(9, 10, 14, 0.72) 0%,
    rgba(9, 10, 14, 0.25) 55%,
    rgba(9, 10, 14, 0) 100%
  );
}

/* Simulated Live Camera Motion for Broadcast Mode */
@keyframes stadiumPan {
  0% {
    transform: scale(1.02) translate(0%, 0%);
  }
  50% {
    transform: scale(1.055) translate(-0.8%, -0.4%);
  }
  100% {
    transform: scale(1.02) translate(0%, 0%);
  }
}

.broadcast-motion {
  animation: stadiumPan 22s ease-in-out infinite;
}

.broadcast-paused {
  animation-play-state: paused !important;
}

/* Live Red Dot Pulse */
@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.88);
  }
}

.live-dot {
  animation: livePulse 1.6s ease-in-out infinite;
}

/* Custom Golden Range Slider (Volume & Progress) */
input[type="range"].gold-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"].gold-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

input[type="range"].gold-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--accent-gold);
  margin-top: -4px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  transition: transform 0.15s ease;
}

input[type="range"].gold-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}

/* Star button bounce micro-interaction */
@keyframes starPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.star-animate {
  animation: starPop 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* ==========================================================================
   RADIO PERÚ — Visualizador de audio en vivo
   ========================================================================== */
.radio-bg {
  background:
    radial-gradient(circle at 50% 40%, var(--radio-color, #f59e0b) 0%, transparent 55%),
    linear-gradient(180deg, #111318 0%, #0a0b0e 100%);
  opacity: 0.55;
  filter: saturate(1.1);
}

.radio-ring {
  border: 2px solid var(--radio-color, #f59e0b);
  opacity: 0.5;
  animation: radioPulse 2.4s ease-out infinite;
}

@keyframes radioPulse {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 0; }
}

.radio-eq span {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(to top, #f59e0b, #fde68a);
  transform-origin: bottom;
  animation: eqBounce 1s ease-in-out infinite;
}

.radio-eq span:nth-child(2n) { animation-duration: 0.8s; }
.radio-eq span:nth-child(3n) { animation-duration: 1.3s; }
.radio-eq span:nth-child(4n) { animation-duration: 0.65s; }
.radio-eq span:nth-child(5n) { animation-duration: 1.1s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.2); }
  50% { transform: scaleY(1); }
}

.radio-paused .radio-eq span,
.radio-paused .radio-ring {
  animation-play-state: paused;
}

/* Encabezado de grupo en la lista de radios */
.radio-group-header {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  padding: 10px 2px 2px;
}
