/* Paleta de Color Base: #000000 */
:root {
  --bg-color: #000000;
  --accent-color: #f59e0b;
  --accent-hover: #d97706;
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Fondo con efecto blur y superposición oscura */
.backdrop-background {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(25px);
  opacity: 0.25;
  transform: scale(1.1);
  z-index: -2;
}

.backdrop-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.6) 0%, #000000 100%);
  z-index: -1;
}

/* Contenedor Adaptable */
.player-app-container {
  width: 100%;
  max-width: 440px;
  padding: 1.25rem;
  margin: auto;
}

/* Barra superior */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid rgba(63, 63, 70, 0.5);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #71717a;
}

.status-badge.live .status-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.status-badge.connecting .status-dot {
  background: var(--accent-color);
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* Botón de Instalación */
.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-install:hover {
  background: var(--accent-color);
  color: #000;
}

/* Tarjeta del Reproductor */
.player-card {
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.logo-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 1.5rem auto;
  border-radius: 20px;
  padding: 8px;
  background: linear-gradient(180deg, #27272a 0%, #09090b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.station-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.pulse-glow {
  display: none;
  position: absolute;
  inset: -3px;
  border-radius: 22px;
  border: 2px solid var(--accent-color);
  animation: ringPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

@keyframes ringPulse {
  0% { transform: scale(0.98); opacity: 0.8; }
  70% { transform: scale(1.06); opacity: 0; }
  100% { transform: scale(0.98); opacity: 0; }
}

.station-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.station-tagline {
  font-size: 0.8rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Canvas del ecualizador */
.canvas-wrapper {
  height: 48px;
  margin: 1.25rem 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#visualizerCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Botón Play/Pause */
.controls-row {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.btn-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

/* Control de volumen */
.volume-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0 1rem 0;
  padding: 0 0.5rem;
}

.vol-icon {
  color: var(--text-muted);
}

#volumeControl {
  flex: 1;
  height: 5px;
  accent-color: var(--accent-color);
  background: #27272a;
  border-radius: 9999px;
  cursor: pointer;
}

/* Barra social */
.social-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-bar a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid #27272a;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-bar a:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

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

.modal-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 24px;
  max-width: 360px;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
}

.modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem auto;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.modal-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.btn-modal-close {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--accent-color);
  color: #000;
  font-weight: 700;
  border: none;
  cursor: pointer;
}