/* ==========================================================
   ACTIVA FM 105.3 - PWA STYLESHEET (Color base: #000000)
   ========================================================== */

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

body {
  background-color: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  position: relative;
}

/* Fondo con efecto desenfocado */
.bg-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(25px);
  transform: scale(1.15);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.5) 0%, #000000 90%);
  z-index: 0;
  pointer-events: none;
}

/* Header */
.app-header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 9999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-install {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  transition: transform 0.2s, opacity 0.2s;
}

.btn-install:active {
  transform: scale(0.96);
}

.hidden {
  display: none !important;
}

/* Reproductor Principal */
.player-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  justify-content: center;
}

.player-card {
  width: 100%;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.logo-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-contain: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
}

.eq-wrapper {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  background: rgba(0,0,0,0.8);
  padding: 4px 6px;
  border-radius: 6px;
}

.eq-bar {
  width: 3px;
  height: 12px;
  background: #ef4444;
  border-radius: 2px;
  animation: eq-anim 0.8s ease-in-out infinite alternate;
}
.eq-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; background: #f97316; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; height: 10px; background: #f59e0b; }
.eq-bar:nth-child(4) { animation-delay: 0.1s; height: 14px; background: #ef4444; }

@keyframes eq-anim {
  0% { height: 4px; }
  100% { height: 18px; }
}

.station-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 4px;
  text-align: center;
}

.station-subtitle {
  font-size: 13px;
  color: #a3a3a3;
  font-weight: 500;
  margin-bottom: 12px;
}

.status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #a3a3a3;
  margin-bottom: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #525252;
  transition: background-color 0.3s;
}

.status-dot.live {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.status-dot.buffering {
  background-color: #f59e0b;
}

.status-dot.error {
  background-color: #ef4444;
}

/* Botón Reproducción */
.controls-wrapper {
  margin-bottom: 20px;
}

.btn-play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-play.playing {
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.7); }
}

.icon {
  width: 36px;
  height: 36px;
}

.icon-spin {
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}

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

/* Barra de volumen */
.volume-container {
  width: 100%;
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.btn-mute {
  background: none;
  border: none;
  color: #a3a3a3;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.volume-slider {
  flex-grow: 1;
  height: 4px;
  accent-color: #ef4444;
  cursor: pointer;
}

.vol-text {
  font-size: 11px;
  font-family: monospace;
  color: #737373;
  width: 34px;
  text-align: right;
}

.toast-box {
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 11px;
  color: #d4d4d4;
  background: #171717;
  border: 1px solid #262626;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-top: 16px;
  pointer-events: none;
}

.toast-box.show {
  opacity: 1;
}

/* Redes Sociales */
.social-bar {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(23, 23, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.social-btn:hover {
  color: #ffffff;
  background: rgba(38, 38, 38, 0.9);
}

.social-btn.facebook svg { color: #3b82f6; }
.social-btn.instagram svg { color: #ec4899; }

/* Footer */
.app-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 16px;
  color: #525252;
  font-size: 11px;
}

/* Modal iOS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #111111;
  border: 1px solid #262626;
  border-radius: 20px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
}

.btn-close-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #737373;
  font-size: 20px;
  cursor: pointer;
}

.modal-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.modal-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 12px;
  color: #a3a3a3;
  line-height: 1.5;
  margin-bottom: 16px;
}

.ios-steps {
  text-align: left;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: #d4d4d4;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.btn-modal-action {
  width: 100%;
  background: #262626;
  border: none;
  color: #ffffff;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}