/**
 * @file style.css
 * @description Estilos modernos y estética premium inspirada en TuneIn Radio para emisoras de Jazz y Cine.
 * Utiliza Glassmorphism, degradados cinematográficos, contadores interactivos y soporte PWA.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Paleta cromática cinematográfica y jazzística */
  --bg-deep: #080b12;
  --bg-surface: #0f172a;
  --bg-card: rgba(18, 26, 44, 0.7);
  --bg-card-hover: rgba(30, 41, 69, 0.85);
  --bg-player: rgba(11, 17, 33, 0.94);
  
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-cinema-red: #e11d48;
  --accent-jazz-purple: #8b5cf6;
  --accent-live-green: #10b981;
  --accent-live-glow: rgba(16, 185, 129, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(245, 158, 11, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-gold-glow);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y estructura general */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(225, 29, 72, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  padding-bottom: 120px; /* Margen para el reproductor inferior fijo */
}

/* Barra de navegación superior */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cinema-red), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff 40%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-top: -3px;
}

/* Buscador interactivo */
.search-wrapper {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
  outline: none;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* Acciones de cabecera (Instalar PWA + Badge) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.install-pwa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.95rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(225, 29, 72, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.header-identify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 1rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(245, 158, 11, 0.25));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.header-identify-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.55);
}

.install-pwa-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-live-green);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-live-green);
  box-shadow: 0 0 10px var(--accent-live-glow);
  animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Barra de Estadísticas y Contadores en Vivo */
.stats-bar-wrapper {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
}

.stats-bar-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.25rem;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-text-group {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}

.stat-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
}

.live-dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-live-green);
  box-shadow: 0 0 12px var(--accent-live-glow);
  animation: pulse 1.5s infinite ease-in-out;
  flex-shrink: 0;
}

.stat-icon-badge {
  font-size: 1.1rem;
}

.pwa-badge-icon {
  font-size: 1.1rem;
  color: var(--accent-gold);
}

.stat-value-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
}

.stat-number.pulse-update {
  color: var(--accent-gold);
  transform: scale(1.08);
}

/* Contenido Principal */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  width: 100%;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.hero-title span {
  color: var(--accent-gold);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 720px;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Barra de Filtros / Categorías */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2.5rem;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.65rem 1.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000000;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

/* Secciones de Emisoras */
.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Grid y tarjetas de emisoras */
.stations-grid {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  margin-bottom: 3.5rem;
}

.group-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  margin-bottom: 0.25rem;
}

.group-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.group-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.group-subtitle {
  font-size: 0.86rem;
  color: var(--text-dim);
}

.group-counter-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.group-grid,
.filtered-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.75rem;
}

.featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.station-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.7);
}

.station-card.is-playing {
  border-color: var(--accent-gold);
  background: rgba(30, 41, 69, 0.95);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.station-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: #0b0f19;
}

.station-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.station-card:hover .station-logo {
  transform: scale(1.05);
}

.station-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.station-card:hover .station-overlay,
.station-card.is-playing .station-overlay,
.station-card.is-buffering .station-overlay {
  opacity: 1;
}

.play-overlay-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  border: none;
  color: #000000;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: var(--transition-fast);
}

.play-overlay-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent-gold);
}

.fav-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 5;
}

.fav-btn:hover {
  color: #facc15;
  transform: scale(1.15);
}

.fav-btn.active {
  color: #facc15;
  background: rgba(250, 204, 21, 0.2);
  border-color: #facc15;
}

.spain-badge {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.soundtrack-lead-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 4;
}

.klara-schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 700;
  margin-top: 0.4rem;
  letter-spacing: 0.2px;
  width: fit-content;
}

.klara-schedule-badge.is-live-bso {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.klara-schedule-badge.is-scheduled {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.live-bso-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 1.5s infinite ease-in-out;
}

.station-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.station-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.station-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-dial {
  font-size: 0.82rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.station-genre-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.station-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin-top: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animación de Barras de Ecualizador */
.equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}

.equalizer-bars .bar {
  width: 3px;
  background: var(--accent-gold);
  border-radius: 1px;
  animation: equalize 0.8s infinite ease-in-out alternate;
}

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

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

/* Mini spinner para estado Buffering */
.mini-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Reproductor Inferior Sticky (TuneIn Signature Bar) */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 94px;
  background: var(--bg-player);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}

.player-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

/* Panel Izquierdo: Info de la emisora activa */
.player-station-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.player-logo-thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  background: #080c16;
  object-fit: contain;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.player-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.player-station-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-station-dial {
  font-size: 0.8rem;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Panel Central: Controles de Reproducción */
.player-controls-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.player-buttons-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.control-btn:hover {
  color: var(--text-main);
  transform: scale(1.15);
}

.play-main-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000000;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.play-main-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px var(--accent-gold);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.status-badge.is-live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-live-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.is-buffering {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.is-paused {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-badge.is-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Panel Derecho: Volumen y Metadatos */
.player-extra-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 140px;
}

.mute-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.mute-btn:hover {
  color: var(--text-main);
}

.volume-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.active-station-genre-pill {
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #cbd5e1;
  white-space: nowrap;
}

/* Visualizador de audio animado */
.visualizer-container {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding: 0 0.5rem;
}

.v-bar {
  width: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.visualizer-container.animating .v-bar:nth-child(1) { animation: vwave 0.6s infinite alternate ease-in-out; }
.visualizer-container.animating .v-bar:nth-child(2) { animation: vwave 0.8s infinite alternate 0.2s ease-in-out; }
.visualizer-container.animating .v-bar:nth-child(3) { animation: vwave 0.5s infinite alternate 0.4s ease-in-out; }
.visualizer-container.animating .v-bar:nth-child(4) { animation: vwave 0.9s infinite alternate 0.1s ease-in-out; }
.visualizer-container.animating .v-bar:nth-child(5) { animation: vwave 0.7s infinite alternate 0.3s ease-in-out; }

@keyframes vwave {
  0% { height: 4px; }
  100% { height: 22px; }
}

/* Estado Vacío */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-dim);
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-title {
    font-size: 1.9rem;
  }
  .player-inner {
    grid-template-columns: 1fr auto;
  }
  .player-extra-controls {
    display: none;
  }
  .stats-bar-container {
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-wrap: wrap;
  }
  .search-wrapper {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .stats-bar-wrapper {
    padding: 0.6rem 1rem;
  }
  .stat-divider:nth-child(4),
  .stat-card.stat-pwa-status {
    display: none;
  }
  .hero-banner {
    padding: 1.5rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .stations-grid {
    grid-template-columns: 1fr;
  }
  .bottom-player {
    padding: 0 1rem;
    height: 84px;
  }
  .player-station-dial {
    display: none;
  }
}

/* ==========================================================================
   BANNER DINÁMICO NOW PLAYING (CANCIÓN, COMPOSITOR Y CARÁTULA EN VIVO)
   ========================================================================== */

.now-playing-banner {
  margin-bottom: 2rem;
  animation: bannerSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.np-banner-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 2.2rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.18);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.np-banner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent-cyan), transparent);
}

/* Contenedor de la Carátula del Disco (Grande, Nítido y 100% Despejado) */
.np-artwork-wrap {
  position: relative;
  flex-shrink: 0;
  width: 165px;
  height: 165px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: #090d16;
}

.np-album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.np-banner-card:hover .np-album-art {
  transform: scale(1.05);
}

/* Ocultar por completo cualquier cartel sobrepuesto en la carátula para ver el disco limpio */
.np-live-tag {
  display: none !important;
}

.np-info-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.np-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.np-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.85rem;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.np-station-source {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.14);
  padding: 0.3rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Título de la Canción en Emisión: Mucho Más Grande y Destacado */
.np-song-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  line-height: 1.22;
  white-space: normal;
  word-break: break-word;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Metadatos de Compositor y Álbum / Banda Sonora en Tamaño Ampliado */
.np-meta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.np-composer-tag,
.np-album-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.05rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  color: #e2e8f0;
}

.np-composer-tag .np-icon,
.np-album-tag .np-icon {
  font-size: 1.3rem;
}

.np-composer-tag .np-label,
.np-album-tag .np-label {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.np-composer-tag strong {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.np-album-tag strong {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .np-banner-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem;
    gap: 1.25rem;
  }
  .np-artwork-wrap {
    width: 130px;
    height: 130px;
  }
  .np-header-row {
    justify-content: center;
  }
  .np-song-title {
    font-size: 1.55rem;
  }
  .np-meta-row {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
  }
  .np-composer-tag,
  .np-album-tag {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ESTILOS PARA PARRILLA EPG ANALÓGICA Y BUSCADOR INTERACTIVO EN TIEMPO REAL
   ========================================================================== */

.np-epg-details {
  margin-top: 0.75rem;
  padding: 1.1rem 1.4rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.np-epg-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.np-epg-presenter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.np-epg-timeslot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.np-epg-genre {
  font-size: 0.92rem;
  color: #cbd5e1;
  font-weight: 600;
}

.np-epg-desc {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.np-epg-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.np-epg-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2), rgba(245, 158, 11, 0.2));
  border: 1px solid rgba(225, 29, 72, 0.45);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.np-epg-link:hover {
  background: linear-gradient(135deg, var(--accent-red), #d97706);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

/* Buscador Interactivo en Tiempo Real */
.np-search-container {
  margin-top: 0.95rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.12);
}

.np-search-bar-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.np-search-icon {
  font-size: 1.1rem;
}

.np-search-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
}

.np-search-sublabel {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.np-search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.np-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.72rem 1.15rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-fast);
}

.np-search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  background: #0b0f19;
}

.np-search-input.flash-highlight {
  animation: flashInput 1s ease;
}

@keyframes flashInput {
  0%, 100% { border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
  50% { border-color: var(--accent-gold); box-shadow: 0 0 24px rgba(245, 158, 11, 0.8); }
}

.np-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
}

.np-search-btn {
  padding: 0.72rem 1.35rem;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  border: none;
  border-radius: var(--radius-full);
  color: #000000;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.45);
}

.np-search-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.65);
}

/* Sugerencias Rápidas de Búsqueda */
.np-quick-tags {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.np-quick-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.np-quick-tag {
  padding: 0.22rem 0.65rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.np-quick-tag:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

/* Botón identificador en la tarjeta de emisora */
.card-identify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.card-identify-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Resultados desplegables del identificador de canciones */
.np-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.4rem;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.np-result-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
}

.np-result-card:hover {
  border-color: var(--accent-gold);
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.np-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.np-result-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.np-result-song {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-result-artist {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-result-album {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-result-select-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  padding: 0.2rem 0.5rem;
  background: rgba(6, 182, 212, 0.12);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.np-search-empty {
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .np-search-form {
    flex-direction: column;
  }
  .np-search-btn {
    width: 100%;
  }
  .np-search-results {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   IDENTIFICADOR ACÚSTICO TIPO AHA MUSIC & SHAZAM (RECONOCIMIENTO EN VIVO)
   ========================================================================== */

.aha-shazam-box {
  margin-top: 1rem;
  margin-bottom: 0.85rem;
  padding: 0.95rem 1.15rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(6, 182, 212, 0.08);
  position: relative;
  overflow: hidden;
}

.aha-shazam-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #f59e0b, #ec4899);
}

.aha-shazam-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.aha-shazam-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 250px;
}

.aha-icon-badge {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
  flex-shrink: 0;
}

.aha-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.01em;
}

.aha-desc {
  margin: 0.2rem 0 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.35;
}

/* Botón estilo Shazam con efecto radar / sonar pulsante */
.aha-listen-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.45);
  transition: all 0.25s ease-in-out;
  overflow: visible;
  white-space: nowrap;
}

.aha-listen-btn:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.7);
}

.aha-listen-btn:active {
  transform: translateY(0);
}

/* Estado escuchando con animación vibrante estilo Shazam */
.aha-listen-btn.is-listening {
  background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.8) !important;
  animation: ahaShazamGlow 1.5s infinite alternate ease-in-out;
}

@keyframes ahaShazamGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.2); }
}

/* Ondas concéntricas de radar (Sonar Waves) */
.aha-sonar-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.aha-listen-btn.is-listening .aha-sonar-wave {
  animation: ahaRadarPulse 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  border: 2px solid rgba(236, 72, 153, 0.8);
}

@keyframes ahaRadarPulse {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.9;
  }
  100% {
    width: 180%;
    height: 220%;
    opacity: 0;
  }
}

/* Indicador de estado y progreso del reconocedor */
.aha-status-indicator {
  margin-top: 0.85rem;
  padding: 0.55rem 0.95rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: #38bdf8;
  animation: fadeIn 0.3s ease;
}

.aha-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

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

/* Acciones y Etiquetas de la Programación Web / EPG */
.np-epg-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.np-epg-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-live-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.np-epg-source-tag.source-epg {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}

.np-refresh-web-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.np-refresh-web-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: var(--accent-gold);
  color: #ffffff;
  transform: translateY(-1px);
}

.np-refresh-web-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* =========================================================================
   SLEEP TIMER (TEMPORIZADOR DE APAGADO)
   ========================================================================= */
.sleep-timer-wrapper {
  position: relative;
  display: inline-block;
}

.header-timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: rgba(30, 41, 69, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.header-timer-btn:hover {
  background: rgba(45, 60, 100, 0.8);
  border-color: var(--accent-gold);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-timer-btn.is-active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

.sleep-timer-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: fadeInDown 0.2s ease-out;
}

.sleep-dropdown-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.4rem 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.2rem;
}

.sleep-opt-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.45rem 0.6rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sleep-opt-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}

.sleep-opt-btn.cancel-btn {
  color: var(--accent-cinema-red);
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.2rem;
  padding-top: 0.5rem;
}

.sleep-opt-btn.cancel-btn:hover {
  background: rgba(225, 29, 72, 0.15);
  color: #fda4af;
}

/* =========================================================================
   HISTORIAL DE CANCIONES IDENTIFICADAS
   ========================================================================= */
.np-history-container {
  margin-top: 1.25rem;
  background: rgba(11, 17, 33, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.np-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.np-history-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.np-history-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.np-history-clear-btn:hover {
  color: var(--accent-cinema-red);
  text-decoration: underline;
}

.np-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
}

.np-history-empty {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
}

.np-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  background: rgba(18, 26, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.np-history-item:hover {
  background: rgba(30, 41, 69, 0.8);
  border-color: rgba(245, 158, 11, 0.3);
}

.np-history-item-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.np-history-art {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f172a;
}

.np-history-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.np-history-song {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-history-artist {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-history-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.np-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.np-history-spotify {
  background: rgba(30, 215, 96, 0.15);
  border: 1px solid rgba(30, 215, 96, 0.4);
  color: #1ed760;
}

.np-history-spotify:hover {
  background: rgba(30, 215, 96, 0.3);
  color: #ffffff;
}

.np-history-yt {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.np-history-yt:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}




