/* Plantilla de radio en vivo (diseño de Radio Compromiso Serio). Los colores salen de config.js */
:root {
  --r-pri: #1F5FA8;
  --r-osc: color-mix(in srgb, var(--r-pri) 38%, #050905);
  --r-med: color-mix(in srgb, var(--r-pri) 70%, #000);
  --r-oro: #F5C542;
  --r-blanco: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; color: #fff; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, var(--r-med), var(--r-osc) 60%, #060b05); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

/* Fondo con vida: auroras que se mueven y chispas doradas que suben */
.r-fondo { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.r-aura { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.r-aura.a1 { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: var(--r-pri); animation: r-flota 18s ease-in-out infinite; }
.r-aura.a2 { width: 50vmax; height: 50vmax; right: -20vmax; bottom: -20vmax; background: color-mix(in srgb, var(--r-oro) 55%, var(--r-pri)); opacity: .35; animation: r-flota 22s ease-in-out infinite reverse; }
.r-aura.a3 { width: 40vmax; height: 40vmax; left: 30%; top: 40%; background: color-mix(in srgb, var(--r-pri) 60%, #9be27f); opacity: .25; animation: r-flota 26s ease-in-out infinite; }
@keyframes r-flota { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(6vmax, 4vmax) scale(1.1); } 66% { transform: translate(-4vmax, 6vmax) scale(.95); } }
.r-chispas i { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: var(--r-oro); box-shadow: 0 0 10px var(--r-oro);
  opacity: 0; animation: r-sube linear infinite; }
@keyframes r-sube { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } 100% { transform: translateY(-105vh) scale(1.1); opacity: 0; } }

.r-app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); text-align: center; }
.r-cab { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.r-vivo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .14em; font-size: .78rem; padding: 7px 13px; border-radius: 99px;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .18); }
.r-vivo i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); animation: r-latido 1.6s infinite; }
@keyframes r-latido { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); } 70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }

/* Menú lateral (como el de la radio CENTRAMA): botón redondo arriba a la izquierda, panel que entra desde la izquierda */
.r-menu-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); transition: background .2s; }
.r-menu-btn:hover { background: rgba(255, 255, 255, .14); }
.r-barras { display: grid; gap: 4px; }
.r-barras i { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; }
.r-velo { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .55); animation: r-aparece .25s ease-out; }
.r-menu { position: fixed; top: 0; bottom: 0; left: 0; z-index: 21; width: min(320px, 86vw); display: flex; flex-direction: column; text-align: left;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 0 calc(env(safe-area-inset-bottom, 0px) + 18px); overflow-y: auto;
  background: color-mix(in srgb, var(--r-pri) 22%, #070d07); border-right: 1px solid rgba(255, 255, 255, .15); box-shadow: 20px 0 50px rgba(0, 0, 0, .5);
  animation: r-entra-izq .3s cubic-bezier(.2, .8, .2, 1); }
.r-menu::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--r-pri) 50%, var(--r-oro) 50%); }
.r-menu[hidden], .r-velo[hidden], .r-lista [hidden] { display: none !important; }
@keyframes r-entra-izq { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes r-aparece { from { opacity: 0; } to { opacity: 1; } }
.r-marca { display: flex; align-items: center; gap: 12px; padding: 4px 22px 18px 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.r-marca img { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; padding: 3px; flex: none; }
.r-marca b { display: block; font-size: 1.05rem; line-height: 1.2; }
.r-marca > div { flex: 1; min-width: 0; }
.r-cerrar { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1rem; cursor: pointer; }
.r-cerrar:hover { background: rgba(255, 255, 255, .18); }
.r-marca span { font-size: .85rem; opacity: .7; }
.r-lista { display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 0 14px; }
.r-lista a, .r-lista button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border-radius: 12px; border: 0; background: none;
  color: #eef5ec; font-family: inherit; font-size: 1.02rem; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: left; cursor: pointer; transition: background .2s; }
.r-lista a:hover, .r-lista button:hover { background: rgba(255, 255, 255, .09); }
.r-lista i { font-size: 1.25rem; width: 24px; text-align: center; color: var(--r-oro); }
.r-lista .wa i { color: #4ade80; }
.r-ir-sitio { display: flex; align-items: center; justify-content: center; gap: 10px; margin: auto 16px 0 18px; padding: 15px; border-radius: 14px; font-weight: 700;
  text-decoration: none; background: var(--r-pri); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.r-ir-sitio:hover { filter: brightness(1.1); }

/* Logo / portada con anillos que laten al ritmo */
.r-disco-wrap { position: relative; width: min(68vw, 300px, 36vh, 36dvh); aspect-ratio: 1; margin: clamp(14px, 4dvh, 44px) 0 clamp(10px, 2.5dvh, 18px); flex: none; display: grid; place-items: center; }
.r-disco { position: relative; width: 100%; height: 100%; border-radius: 50%; padding: 8px;
  background: conic-gradient(from 0deg, var(--r-oro), var(--r-pri), #fff, var(--r-pri), var(--r-oro)); box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
  animation: r-gira 14s linear infinite; animation-play-state: paused; }
.r-disco img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fff; border: 4px solid rgba(0, 0, 0, .25);
  animation: r-gira 14s linear infinite reverse; animation-play-state: paused; transition: opacity .6s; }
.sonando .r-disco, .sonando .r-disco img { animation-play-state: running; }
.r-disco.portada img { animation: none; }
@keyframes r-gira { to { transform: rotate(360deg); } }
.r-ondas span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--r-oro) 70%, transparent); opacity: 0; }
.sonando .r-ondas span { animation: r-onda 2.7s cubic-bezier(.2, .6, .3, 1) infinite; }
.sonando .r-ondas span:nth-child(2) { animation-delay: .9s; }
.sonando .r-ondas span:nth-child(3) { animation-delay: 1.8s; }
@keyframes r-onda { from { transform: scale(1); opacity: .8; } to { transform: scale(1.45); opacity: 0; } }

.r-info h1 { margin: 6px 0 4px; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(100deg, #fff 0%, #fff 40%, color-mix(in srgb, var(--r-oro) 40%, #fff) 50%, #fff 60%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: r-brillo 6s ease-in-out infinite; }
@keyframes r-brillo { 0%, 55% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.r-sonando { margin: 0; min-height: 2.9em; }
.r-eti { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--r-oro); font-weight: 800; margin-bottom: 3px; }
.r-sonando strong { font-size: 1.05rem; font-weight: 600; display: inline-block; animation: r-entra .6s ease both; }
@keyframes r-entra { from { transform: translateY(8px); } to { transform: none; } }

.r-eq { width: 100%; height: clamp(36px, 7dvh, 70px); margin: clamp(4px, 1.5dvh, 10px) 0 4px; flex: none; }

.r-controles { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; margin-top: 4px; flex: none; }
.r-play { width: 80px; height: 80px; flex: none; border-radius: 50%; border: 0; cursor: pointer; font-size: 2.7rem; color: var(--r-osc);
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--r-oro) 40%, #fff) 55%, var(--r-oro)); box-shadow: 0 14px 36px rgba(0, 0, 0, .4), 0 0 0 0 color-mix(in srgb, var(--r-oro) 50%, transparent);
  display: grid; place-items: center; transition: transform .15s; animation: r-llama 2.2s infinite; }
.sonando .r-play { animation: none; }
.r-play:active { transform: scale(.94); }
.r-play i { margin-left: 5px; }
.sonando .r-play i { margin-left: 0; }
@keyframes r-llama { 0% { box-shadow: 0 14px 36px rgba(0, 0, 0, .4), 0 0 0 0 color-mix(in srgb, var(--r-oro) 55%, transparent); } 70% { box-shadow: 0 14px 36px rgba(0, 0, 0, .4), 0 0 0 18px transparent; } 100% { box-shadow: 0 14px 36px rgba(0, 0, 0, .4), 0 0 0 0 transparent; } }
.r-mudo { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.3rem; cursor: pointer; }
.r-vol { width: 110px; min-width: 0; accent-color: var(--r-oro); }
.r-estado { margin: 12px 0 0; font-size: .92rem; opacity: .85; min-height: 1.4em; }

.r-pie { margin-top: auto; padding-top: 16px; font-size: .8rem; opacity: .6; }

:focus-visible { outline: 3px solid var(--r-oro); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .r-aura, .r-chispas, .r-disco, .r-disco img, .r-ondas span, .r-info h1, .r-play, .r-vivo i, .r-menu, .r-velo { animation: none !important; }
  .r-info h1 { -webkit-text-fill-color: #fff; background: none; }
}

/* Compartir por código QR */
.r-qr-velo { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); }
.r-qr-velo[hidden] { display: none !important; }
.r-qr { position: relative; width: min(360px, 100%); max-height: calc(100dvh - 36px); overflow: auto; text-align: center; padding: 24px 20px 20px; border-radius: 22px;
  background: linear-gradient(160deg, var(--r-med), var(--r-osc)); border: 1px solid color-mix(in srgb, var(--r-oro) 50%, transparent); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); animation: r-qr-entra .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes r-qr-entra { from { transform: translateY(18px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.r-qr .r-cerrar { position: absolute; top: 12px; right: 12px; }
.r-qr h2 { margin: 4px 40px 4px; font-size: 1.2rem; font-weight: 800; }
.r-qr p { margin: 0 0 14px; font-size: .9rem; opacity: .85; }
.r-qr-img canvas { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.r-qr-acc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.r-qr-acc [hidden] { display: none !important; }
.r-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 99px; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); transition: background .2s, transform .2s; font-family: inherit; }
.r-btn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
#qrBajar { background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--r-oro) 40%, #fff) 55%, var(--r-oro)); color: var(--r-osc); border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .r-qr { animation: none; } }
