/* ========================================
   RADIO LOCAL — Reproductor Corporativo
   Diseño responsive: 320px → 4K
   ======================================== */

/* --- Reset & Variables --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #16162a;
  --bg-card: #1e1e3a;
  --bg-hover: #2a2a4a;
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #6a6a8a;
  --accent: #6c63ff;
  --accent-hover: #7f78ff;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --ad-bg: #2a1a1a;
  --ad-accent: #ff6b4a;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  --transition: 0.2s ease;
  --max-width: 520px;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  background-image: url('img/Campo_Verde.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- App Container --- */
.app {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 16px;
}

/* ========================================
   HEADER / LOGO
   ======================================== */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

  .logo-img {
    max-height: 60px;
    width: auto;
    border-radius: 8px;
  }

.logo-img {
  max-height: 60px;
  width: auto;
  display: block;
}

/* ========================================
   PLAYER
   ======================================== */
.player {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* --- Cover Art --- */
.cover-art {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--bg-card);
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-icon {
  font-size: 5rem;
  opacity: 0.5;
  transition: var(--transition);
}

.playing .cover-icon {
  opacity: 0.8;
  animation: pulse 2s ease-in-out infinite;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Track Info --- */
.track-info {
  text-align: center;
  width: 100%;
}

.track-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-artist {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.track-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}

.status-dot.playing {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.status-dot.paused {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.status-dot.ads {
  background: var(--ad-accent);
  box-shadow: 0 0 8px rgba(255, 107, 74, 0.5);
}

/* --- Progress --- */
.progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-card);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.progress-bar::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: var(--transition);
}

.progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.progress-bar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-secondary);
  cursor: pointer;
}

.progress-bar::-moz-range-track {
  background: var(--bg-card);
  border-radius: 4px;
  height: 8px;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Controls --- */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.control-btn:hover {
  color: var(--accent);
}

.control-btn:active {
  transform: scale(0.92);
}

.play-btn {
  background: var(--accent);
  width: 64px;
  height: 64px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.play-btn:hover {
  background: var(--accent-hover);
  color: white;
  box-shadow: 0 0 30px var(--accent-glow);
}

.play-btn:active {
  transform: scale(0.9);
}

/* --- Volume --- */
.volume-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 200px;
}

.volume-btn {
  flex-shrink: 0;
  color: var(--text-muted);
}

.volume-btn:hover {
  color: var(--text-primary);
}

.volume-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-card);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  transition: var(--transition);
}

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

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  cursor: pointer;
}

.volume-slider::-moz-range-track {
  background: var(--bg-card);
  border-radius: 2px;
  height: 4px;
}

/* ========================================
   PUBLICIDAD
   ======================================== */
.ad-panel {
  background: var(--ad-bg);
  border: 1px solid rgba(255, 107, 74, 0.2);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  text-align: center;
  display: none;
}

.ad-panel.active {
  display: block;
  animation: fade-in 0.3s ease;
}

.ad-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ad-accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ad-text {
  font-size: 0.9rem;
  color: #e0c0b0;
  line-height: 1.4;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  margin-top: auto;
  padding: 16px 0 8px;
  text-align: center;
}

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

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes equalizer {
  0%, 100% { height: 4px; }
  25% { height: 16px; }
  50% { height: 8px; }
  75% { height: 20px; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
/* Teléfonos chicos */
@media (max-width: 360px) {
  .app { padding: 12px 10px; gap: 12px; }
  .player { padding: 16px 14px; }
  .track-title { font-size: 1.1rem; }
  .play-btn { width: 56px; height: 56px; }
  .controls { gap: 14px; }
  .cover-art { max-width: 220px; }
}

/* Tablets y pantallas medianas */
@media (min-width: 768px) {
  .app {
    padding: 32px 24px;
    gap: 24px;
  }
  .player {
    padding: 32px 28px;
    gap: 20px;
  }
  .track-title { font-size: 1.4rem; }
  .play-btn { width: 72px; height: 72px; }
  .control-btn svg { width: 32px; height: 32px; }
  .play-btn svg { width: 44px; height: 44px; }
  .cover-art { max-width: 340px; }
}

/* TV / Pantallas grandes (Smart TV, proyectores) */
@media (min-width: 1200px) {
  :root {
    --max-width: 600px;
  }
  .app {
    padding: 40px 32px;
    gap: 28px;
    justify-content: center;
  }
  .player {
    padding: 40px 36px;
    gap: 24px;
    border-radius: 28px;
  }
  .track-title { font-size: 1.6rem; }
  .play-btn { width: 80px; height: 80px; }
  .play-btn svg { width: 48px; height: 48px; }
  .cover-art { max-width: 400px; }
  .progress-bar { height: 8px; }
  .progress-bar::-webkit-slider-thumb { width: 20px; height: 20px; }
}

/* Modo paisaje en teléfonos */
@media (max-height: 500px) and (orientation: landscape) {
  .app {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    max-width: 100%;
    justify-content: center;
  }
  .player {
    max-width: 400px;
    padding: 16px;
  }
  .cover-art { max-width: 120px; }
  .header { display: none; }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .playing .cover-icon { animation: none; }
  .status-dot.playing { animation: none; }
  .ad-panel.active { animation: none; }
}


