/* ==========================================================================
   ESTILOS GENERALES - XPRESATGUATE PWA
   Color Primario de Marca: #017BAA
   ========================================================================== */

:root {
  --brand: #017BAA;
  --brand-light: #029ad3;
  --brand-dark: #015b7d;
  --brand-glow: rgba(1, 123, 170, 0.45);
  --bg-dark: #050b14;
  --card-bg: rgba(13, 23, 38, 0.75);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  user-select: none;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.4) contrast(1.1);
  transform: scale(1.08);
  z-index: 0;
}

.ambient-glow {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--brand-glow) 0%, rgba(0,0,0,0) 70%);
  z-index: 1;
  pointer-events: none;
}

.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.3s ease;
}

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

.status-dot.loading {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--brand-glow);
  transition: all 0.2s ease;
}

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

.player-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.logo-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ripple-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ripple-ring.active {
  animation: rippleAnimation 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes rippleAnimation {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(5, 11, 20, 0.8);
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease;
}

.logo-img.playing {
  transform: scale(1.04);
}

.station-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.station-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}

.station-subtitle a {
  color: var(--brand-light);
  text-decoration: none;
}

.station-subtitle a:hover {
  text-decoration: underline;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-light);
  height: 18px;
  margin-bottom: 16px;
}

.visualizer {
  width: 100%;
  height: 38px;
  margin-bottom: 20px;
}

.controls-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.btn-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px var(--brand-glow);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-play:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  transform: scale(1.05);
}

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.volume-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-icon {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: #ffffff;
}

input[type=range] {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #334155;
  outline: none;
  accent-color: var(--brand);
  cursor: pointer;
}

#volume-percent {
  font-size: 11px;
  font-family: monospace;
  color: #94a3b8;
  width: 32px;
  text-align: right;
}

.app-footer {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.social-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.modal-box {
  background: #0f1c2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.modal-steps {
  margin: 14px 0 20px 20px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.hidden {
  display: none !important;
}