/* Voltix Radio Online — estilos de la app
   Los colores llegan como variables desde el panel (ver <style> en index.php) */

:root{
  --yellow-deep:#F5A800;
  --shadow:0 18px 40px rgba(9,12,40,.35);
  --display:"Archivo Black", system-ui, sans-serif;
  --body:"Outfit", system-ui, sans-serif;
  --util:"Barlow Condensed", system-ui, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--body);
  background:#0B0E24;
  background-image:radial-gradient(120% 80% at 50% 0%, #2A1140 0%, #0B0E24 60%);
  display:grid;
  place-items:center;
  padding:24px 16px;
  color:var(--cream);
  -webkit-font-smoothing:antialiased;
  overscroll-behavior:none;
}

/* ---------- marco ---------- */
.phone{
  width:min(390px, 100%);
  aspect-ratio:9/19.5;
  max-height:calc(100dvh - 48px);
  border-radius:38px;
  overflow:hidden;
  position:relative;
  box-shadow:var(--shadow), 0 0 0 8px #05060F, 0 0 0 9px #2C3160;
  display:flex;
  flex-direction:column;
  background:var(--pink);
  isolation:isolate;
}

/* ---------- escenario ---------- */
.stage{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  display:grid;
  place-items:center;
  background:var(--bg-image) center/cover no-repeat, var(--pink);
  padding:28px 22px 10px;
  overflow:hidden;
}
.stage::after{
  content:"";
  position:absolute; inset:0;
  background:radial-gradient(60% 45% at 50% 42%, rgba(255,255,255,.18), transparent 70%);
  pointer-events:none;
}

.brand{
  position:relative; z-index:2;
  width:88%; max-width:300px;
  filter:drop-shadow(0 14px 22px rgba(90,0,40,.45));
  animation:brand-in .9s cubic-bezier(.16,1,.3,1) both;
}
.brand img{width:100%; height:auto; display:block}

.spark{position:absolute; z-index:1; width:54px; opacity:.9; animation:spark 3.6s ease-in-out infinite}
.spark.a{top:14%; left:8%; animation-delay:.2s}
.spark.b{bottom:22%; right:10%; animation-delay:1.4s; width:44px}
.spark.c{top:30%; right:14%; animation-delay:2.5s; width:32px}

@keyframes spark{
  0%,70%,100%{opacity:.25; transform:scale(.94) rotate(-4deg)}
  76%{opacity:1; transform:scale(1.08) rotate(2deg)}
  82%{opacity:.4; transform:scale(1) rotate(0)}
  88%{opacity:1; transform:scale(1.04)}
}
@keyframes brand-in{from{opacity:0; transform:translateY(18px) scale(.94)} to{opacity:1; transform:none}}

.live{
  position:absolute; top:18px; left:18px; z-index:3;
  display:flex; align-items:center; gap:7px;
  background:rgba(18,23,63,.82); /* respaldo para navegadores sin color-mix */
  background:color-mix(in srgb, var(--navy) 82%, transparent);
  border:1px solid rgba(255,209,0,.55);
  border:1px solid color-mix(in srgb, var(--yellow) 55%, transparent);
  padding:6px 12px 5px; border-radius:99px;
  font-family:var(--util); font-weight:700; letter-spacing:.16em; font-size:12px;
  color:var(--yellow);
  backdrop-filter:blur(6px);
}
.dot{width:7px;height:7px;border-radius:50%;background:#FF3B5C;box-shadow:0 0 0 0 rgba(255,59,92,.7);animation:beat 1.8s infinite}
@keyframes beat{70%{box-shadow:0 0 0 8px rgba(255,59,92,0)}100%{box-shadow:0 0 0 0 rgba(255,59,92,0)}}

.install{
  position:absolute; top:16px; right:16px; z-index:3;
  border:0; cursor:pointer;
  background:var(--navy); color:var(--yellow);
  font-family:var(--util); font-weight:700; font-size:13px; letter-spacing:.1em; text-transform:uppercase;
  padding:8px 14px; border-radius:99px;
  box-shadow:0 6px 16px rgba(9,12,40,.35);
}
.install[hidden]{display:none}

/* ---------- reproductor ---------- */
.player{
  position:relative; z-index:4;
  background:var(--navy);
  border-radius:26px 26px 0 0;
  margin-top:-14px;
  padding:22px 20px 16px;
  box-shadow:0 -14px 30px rgba(9,12,40,.35);
  flex:0 0 auto;
}
.controls{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px}

.icon-btn{
  all:unset; cursor:pointer;
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:50%; color:var(--cream);
  transition:background .18s ease, transform .18s ease, color .18s ease;
}
.icon-btn:hover{background:rgba(255,255,255,.09); color:var(--yellow)}
.icon-btn:active{transform:scale(.92)}
.icon-btn svg{width:23px;height:23px}
.controls .icon-btn:first-child{justify-self:start}
.controls .icon-btn:last-child{justify-self:end}

.play{
  all:unset; cursor:pointer; position:relative;
  width:72px; height:72px; border-radius:50%;
  display:grid; place-items:center;
  background:radial-gradient(circle at 32% 26%, #FFE873, var(--yellow) 45%, var(--yellow-deep));
  background:radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--yellow) 60%, white), var(--yellow) 45%, var(--yellow-deep));
  color:var(--navy);
  box-shadow:0 8px 22px rgba(255,177,0,.42), inset 0 -3px 0 rgba(160,100,0,.35);
  box-shadow:0 8px 22px color-mix(in srgb, var(--yellow) 45%, transparent), inset 0 -3px 0 rgba(160,100,0,.35);
  transition:transform .2s cubic-bezier(.34,1.56,.64,1);
}
.play:hover{transform:scale(1.05)}
.play:active{transform:scale(.96)}
.play svg{width:30px;height:30px}
.play .pause-ico{display:none}
.play::before{
  content:""; position:absolute; inset:-4px; border-radius:50%;
  border:2px solid rgba(255,209,0,.65);
  border:2px solid color-mix(in srgb, var(--yellow) 65%, transparent);
  opacity:0;
}
body.playing .play::before{animation:ripple 2s ease-out infinite}
body.playing .play .play-ico{display:none}
body.playing .play .pause-ico{display:block}
@keyframes ripple{0%{opacity:.8; transform:scale(1)} 100%{opacity:0; transform:scale(1.55)}}

.spinner{
  display:none;
  position:absolute; inset:-4px;
  border-radius:50%;
  border:3px solid transparent;
  border-top-color:var(--navy);
  animation:spin .8s linear infinite;
}
body.loading .spinner{display:block}
body.loading .play svg{opacity:.25}
@keyframes spin{to{transform:rotate(360deg)}}

.now{margin:16px 0 0; text-align:center}
.station{font-family:var(--display); font-size:19px; margin:0; color:var(--cream)}
.freq{
  display:inline-flex; align-items:center; gap:8px;
  margin:10px 0 0; padding:7px 18px 6px; border-radius:99px;
  background:linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  color:#5A3A00;
  font-family:var(--util); font-weight:700; font-size:15px; letter-spacing:.09em; text-transform:uppercase;
  box-shadow:0 4px 12px rgba(255,177,0,.3);
  box-shadow:0 4px 12px color-mix(in srgb, var(--yellow) 30%, transparent);
}
.status{
  min-height:16px; margin:8px 0 0;
  font-family:var(--util); font-size:13px; letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,246,227,.65);
  color:color-mix(in srgb, var(--cream) 65%, transparent);
}
.status.error{color:#FF7A94}

.eq{display:inline-flex; align-items:flex-end; gap:3px; height:13px}
.eq i{width:3px; height:4px; background:#5A3A00; border-radius:2px; opacity:.5}
body.playing .eq i{opacity:1; animation:bounce .9s ease-in-out infinite}
body.playing .eq i:nth-child(2){animation-delay:.15s}
body.playing .eq i:nth-child(3){animation-delay:.3s}
body.playing .eq i:nth-child(4){animation-delay:.45s}
@keyframes bounce{0%,100%{height:4px}50%{height:13px}}

.volume{display:grid; grid-template-rows:0fr; transition:grid-template-rows .28s ease}
.volume.open{grid-template-rows:1fr}
.volume > div{overflow:hidden}
.volume-inner{display:flex; align-items:center; gap:12px; padding:16px 6px 2px}

input[type=range]{
  -webkit-appearance:none; appearance:none;
  flex:1; height:6px; border-radius:99px;
  background:linear-gradient(90deg, var(--yellow) 0 var(--fill,80%), rgba(255,255,255,.16) var(--fill,80%) 100%);
  cursor:pointer;
}
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background:var(--cream); border:3px solid var(--yellow);
}
input[type=range]::-moz-range-thumb{
  width:14px; height:14px; border-radius:50%;
  background:var(--cream); border:3px solid var(--yellow);
}
.vol-value{font-family:var(--util); font-weight:700; font-size:14px; letter-spacing:.08em; color:var(--yellow); min-width:38px; text-align:right}

/* ---------- redes ---------- */
.social{
  background:var(--pink);
  background:linear-gradient(180deg, color-mix(in srgb, var(--pink) 82%, white), var(--pink));
  padding:14px 18px calc(16px + env(safe-area-inset-bottom));
  display:flex; justify-content:center; flex-wrap:wrap; gap:12px;
  flex:0 0 auto;
}
.social a{
  width:38px; height:38px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--cream); color:var(--pink);
  transition:transform .18s ease, background .18s ease, color .18s ease;
}
.social a:hover{background:var(--yellow); color:var(--navy); transform:translateY(-3px)}
.social svg{width:19px; height:19px; fill:currentColor}

:focus-visible{outline:3px solid var(--yellow); outline-offset:3px; border-radius:8px}

@media (prefers-reduced-motion:reduce){
  *{animation:none !important; transition-duration:.01ms !important}
}
@media (max-width:420px){
  body{padding:0}
  .phone{width:100%; height:100dvh; max-height:none; aspect-ratio:auto; border-radius:0; box-shadow:none}
}
@media (display-mode:standalone){
  body{padding:0}
  .phone{width:100%; height:100dvh; max-height:none; aspect-ratio:auto; border-radius:0; box-shadow:none}
  .stage{padding-top:calc(28px + env(safe-area-inset-top))}
}

/* ---------------------------------------------- invitación a instalar */

.sheet-wrap{
  position:absolute; inset:0; z-index:20;
  display:flex; align-items:flex-end; justify-content:center;
  background:rgba(6,8,26,.62);
  backdrop-filter:blur(3px);
  padding:14px;
  animation:fade .25s ease both;
}
.sheet-wrap[hidden]{display:none}

.sheet{
  position:relative;
  width:100%;
  background:var(--navy);
  border-radius:24px;
  padding:26px 22px 18px;
  text-align:center;
  box-shadow:0 -10px 40px rgba(0,0,0,.4);
  animation:sheet-up .38s cubic-bezier(.16,1,.3,1) both;
}

@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes sheet-up{from{opacity:0; transform:translateY(28px)} to{opacity:1; transform:none}}

.sheet-close{
  position:absolute; top:12px; right:12px;
  width:34px; height:34px;
  display:grid; place-items:center;
  border:0; border-radius:50%; cursor:pointer;
  background:rgba(255,255,255,.08);
  color:var(--cream);
}
.sheet-close svg{width:15px; height:15px}
.sheet-close:hover{background:rgba(255,255,255,.16)}

.sheet-icon{
  width:74px; height:74px;
  border-radius:20px;
  display:block; margin:0 auto 12px;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
}

.sheet-title{
  font-family:var(--display);
  font-size:20px; margin:0 0 6px;
  color:var(--cream);
}
.sheet-sub{
  margin:0 auto 18px;
  max-width:30ch;
  font-size:14.5px; line-height:1.5;
  color:rgba(255,246,227,.7);
  color:color-mix(in srgb, var(--cream) 70%, transparent);
}

.sheet-cta{
  width:100%; border:0; cursor:pointer;
  background:linear-gradient(180deg, var(--yellow), var(--yellow-deep));
  color:var(--navy);
  font-family:var(--util); font-weight:700;
  font-size:17px; letter-spacing:.06em; text-transform:uppercase;
  padding:15px 24px; border-radius:99px;
  box-shadow:0 8px 20px rgba(255,177,0,.3);
  transition:transform .18s ease;
}
.sheet-cta:active{transform:scale(.97)}

/* pasos de iOS */
.sheet-steps{
  list-style:none; margin:0 0 6px; padding:0;
  display:flex; flex-direction:column; gap:12px;
  text-align:left;
}
.sheet-steps li{
  display:flex; align-items:center; gap:11px;
  background:rgba(255,255,255,.06);
  border-radius:14px; padding:12px 14px;
  font-size:14.5px; line-height:1.45;
  color:var(--cream);
}
.step-n{
  flex:0 0 auto;
  width:24px; height:24px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--yellow); color:var(--navy);
  font-family:var(--util); font-weight:700; font-size:14px;
}
.step-ico{
  width:17px; height:17px;
  vertical-align:-3px; margin:0 1px;
  color:var(--yellow);
}
.sheet-steps strong{font-weight:700}

.sheet-note{
  margin:0; font-size:14.5px; line-height:1.5;
  color:rgba(255,246,227,.75);
  color:color-mix(in srgb, var(--cream) 75%, transparent);
}

.sheet-later{
  margin-top:14px; border:0; cursor:pointer;
  background:none; color:rgba(255,246,227,.5);
  color:color-mix(in srgb, var(--cream) 50%, transparent);
  font:inherit; font-size:14px;
  padding:8px 16px;
}
.sheet-later:hover{color:var(--cream)}

@media (min-width:421px){
  .sheet-wrap{align-items:center}
}
