:root {
  --purple: #7548ff;
  --orange: #ff8534;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: #070914; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.radio-shell {
  --page: #070914;
  --page-alt: #0b0d1b;
  --ink: #f7f8ff;
  --muted: #9ca3bb;
  --card: rgba(13, 17, 34, .8);
  --line: rgba(255, 255, 255, .1);
  --soft: rgba(255, 255, 255, .04);
  --soft-hover: rgba(255, 141, 53, .08);
  --control: #aeb4c9;
  --status: #737b94;
  --footer: #656c82;
  --card-shadow: 0 30px 100px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .055);
  --custom-background-image: none;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 26px clamp(20px, 4vw, 64px) 20px;
  color: var(--ink);
  background-image:
    linear-gradient(145deg, rgba(7, 9, 20, .84), rgba(11, 13, 27, .9)),
    radial-gradient(circle at 50% 115%, rgba(255, 141, 53, .2), transparent 36%),
    var(--custom-background-image),
    linear-gradient(145deg, var(--page) 0%, var(--page-alt) 58%, var(--page) 100%);
  background-size: cover, auto, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: color .35s ease, background .35s ease;
}

.radio-shell[data-theme="light"] {
  --page: #f7f4fc;
  --page-alt: #fffaf4;
  --ink: #181523;
  --muted: #65677a;
  --card: rgba(255, 255, 255, .76);
  --line: rgba(31, 25, 51, .1);
  --soft: rgba(45, 33, 75, .035);
  --soft-hover: rgba(122, 77, 255, .07);
  --control: #6b6d7e;
  --status: #77798c;
  --footer: #7a7988;
  --card-shadow: 0 30px 90px rgba(64, 38, 95, .13), inset 0 1px 0 rgba(255, 255, 255, .8);
  background-image:
    linear-gradient(145deg, rgba(247, 244, 252, .82), rgba(255, 250, 244, .88)),
    radial-gradient(circle at 8% 5%, rgba(122, 77, 255, .13), transparent 28%),
    var(--custom-background-image),
    linear-gradient(145deg, var(--page) 0%, var(--page-alt) 100%);
  background-size: cover, auto, cover, cover;
  background-position: center, center, center, center;
}

.radio-shell.background-overlay-off,
.radio-shell.background-overlay-off[data-theme="light"] {
  background-image:
    var(--custom-background-image),
    linear-gradient(145deg, var(--page) 0%, var(--page-alt) 58%, var(--page) 100%);
  background-size: cover, cover;
  background-position: center, center;
}

.radio-shell.background-overlay-off::before,
.radio-shell.background-overlay-off .ambient {
  display: none;
}

.radio-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, black 35%, black 70%, transparent);
}

.ambient {
  position: absolute;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(95px);
  opacity: .14;
  pointer-events: none;
}
.ambient-one { background: var(--purple); top: -25vw; left: -10vw; }
.ambient-two { background: var(--orange); right: -20vw; bottom: -28vw; }
.site-header, .site-footer, .player-card { position: relative; z-index: 2; }

.site-header {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-actions { display: flex; align-items: center; gap: 9px; }
.theme-button, .service-link {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--control);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.theme-button { width: 40px; padding: 0; cursor: pointer; }
.service-link { gap: 9px; padding: 0 14px; text-decoration: none; font-size: 13px; }
.theme-button:hover, .service-link:hover { color: var(--ink); border-color: rgba(255, 141, 53, .55); background: var(--soft-hover); }

.player-card {
  width: min(500px, 100%);
  margin: clamp(34px, 5vh, 70px) auto;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(24px);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.cover-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; align-self: center; }
.cover-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 34px 28px;
  border-radius: 24px;
  isolation: isolate;
  color: white;
  background: radial-gradient(circle at 78% 18%, rgba(255,218,182,.5) 0 3%, transparent 18%), linear-gradient(145deg, #6d37ff 0%, #8f40e2 42%, #ff7b28 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.cover-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 90% 78%, rgba(255,222,194,.28), transparent 30%), linear-gradient(115deg, transparent 40%, rgba(255,255,255,.13) 41%, transparent 42%); }
.cover-fallback { position: absolute; inset: 0; z-index: 0; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 34px 28px; }
.fallback-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-fallback::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(5, 4, 14, .8), transparent 58%); }
.album-art { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; animation: artwork-in .45s ease both; }
.cover-kicker, .cover-frequency { position: relative; z-index: 2; font-size: 12px; letter-spacing: .28em; font-weight: 800; }
.cover-fallback strong { position: relative; z-index: 2; margin: 5px 0 12px; font-size: clamp(48px, 4.6vw, 67px); line-height: .83; letter-spacing: -.09em; }
.cover-frequency { color: rgba(255,255,255,.72); font-size: 9px; }

.live-pill {
  position: absolute;
  top: 17px;
  left: 17px;
  z-index: 2;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  color: white;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(8,9,20,.6);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #ff8d35; box-shadow: 0 0 0 4px rgba(255,141,53,.16); animation: pulse 1.8s ease infinite; }

.player-content { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 32px clamp(24px, 6vw, 44px) 38px; }
.station-heading { text-align: center; }
.station-name { margin: 0 0 22px; color: var(--muted); font-size: calc(9px + 10pt); font-weight: 800; letter-spacing: .12em; }
.eyebrow { margin: 0 0 10px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .21em; }
.station-heading h1 { margin: 0 auto; max-width: 450px; font-size: clamp(calc(29px - 10pt), calc(7vw - 10pt), calc(45px - 10pt)); line-height: 1.04; letter-spacing: -.05em; text-wrap: balance; }
.track-title { margin: 13px 0 0; color: var(--muted); font-size: 15px; }
.album-title { margin: 7px 0 0; color: var(--status); font-size: 11px; line-height: 1.4; }

.waveform { height: 48px; margin: 28px 0 24px; display: flex; align-items: center; justify-content: center; gap: 4px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent); }
.waveform i { width: 3px; min-width: 3px; height: calc(7px + (var(--bar) % 7) * 4px); border-radius: 999px; background: linear-gradient(to top, var(--purple), var(--orange)); opacity: .35; transform-origin: center; }
.waveform.active i { opacity: .95; animation: sound 1s ease-in-out infinite alternate; animation-delay: calc(var(--bar) * -45ms); }

.controls-row { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.play-button {
  width: 74px;
  height: 74px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--purple), #a847db 56%, var(--orange));
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(122,77,255,.32), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.play-button:hover { transform: scale(1.045); box-shadow: 0 16px 46px rgba(122,77,255,.43), inset 0 1px 0 rgba(255,255,255,.3); }
.play-button:active { transform: scale(.97); }
.play-button span { display: grid; place-items: center; }
.play-button .icon { width: 31px; height: 31px; stroke-width: 2; }
.play-button.loading { animation: glow 1.2s ease-in-out infinite alternate; }
.volume-control { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--control); }
.volume-control input { width: min(180px, 55vw); accent-color: var(--orange); }
.site-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 12px;
  color: var(--footer);
  font-size: 10px;
  letter-spacing: .04em;
}
.social-links { display: flex; align-items: center; justify-content: center; gap: 9px; }
.social-link {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  text-decoration: none;
  transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.social-link:hover { transform: translateY(-2px); color: var(--ink); background: var(--soft-hover); }
.social-link-facebook:hover { color: #1877f2; border-color: rgba(24, 119, 242, .55); }
.social-link-instagram:hover { color: #e4405f; border-color: rgba(228, 64, 95, .55); }
.social-link-tiktok:hover { color: #25f4ee; border-color: rgba(37, 244, 238, .5); }
.social-link-whatsapp:hover { color: #25d366; border-color: rgba(37, 211, 102, .55); }
.social-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.radio-copyright { margin: 0; text-align: center; line-height: 1.5; }
.radio-copyright a { color: var(--muted); font-weight: 700; text-decoration: none; }
.radio-copyright a:hover { color: var(--ink); text-decoration: underline; }
.radio-copyright span { margin-left: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

@keyframes sound { from { transform: scaleY(.35); } to { transform: scaleY(1.18); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,141,53,.04); } }
@keyframes glow { from { box-shadow: 0 12px 34px rgba(122,77,255,.2); } to { box-shadow: 0 12px 50px rgba(255,141,53,.42); } }
@keyframes artwork-in { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 720px) {
  .radio-shell { padding: 16px 14px max(14px, env(safe-area-inset-bottom)); background-attachment: scroll; }
  .service-link { display: none; }
  .player-card { width: min(420px, 100%); margin: 20px auto; border-radius: 29px; }
  .cover-wrap { min-height: 0; aspect-ratio: 1 / 1; }
  .cover-art { padding: 27px 24px; }
  .cover-fallback { padding: 27px 24px; }
  .player-content { padding: 28px 19px 24px; }
  .station-heading { text-align: center; }
  .waveform { margin: 24px 0 20px; }
  .controls-row { gap: 12px; }
  .play-button { width: 68px; height: 68px; }
  .site-footer { justify-content: center; }
}

@media (max-width: 480px) {
  .radio-shell {
    min-height: 100svh;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    grid-template-rows: auto auto auto;
  }
  .site-header { min-height: 36px; }
  .theme-button { width: 36px; height: 36px; }
  .player-card {
    width: min(360px, 100%);
    margin: 10px auto 12px;
    padding: 9px;
    border-radius: 25px;
  }
  .cover-wrap { width: min(260px, 68vw); margin: 0 auto; }
  .cover-art { padding: 21px 18px; border-radius: 19px; }
  .cover-fallback { padding: 21px 18px; }
  .cover-kicker { font-size: 9px; }
  .cover-fallback strong { margin: 4px 0 9px; font-size: clamp(34px, 10vw, 46px); }
  .cover-frequency { font-size: 8px; }
  .live-pill { top: 11px; left: 11px; padding: 6px 8px; font-size: 8px; }
  .player-content { padding: 17px 15px 16px; }
  .station-name { margin-bottom: 10px; line-height: 1.05; }
  .eyebrow { margin-bottom: 7px; font-size: 9px; }
  .track-title { margin-top: 8px; font-size: 13px; }
  .album-title { margin-top: 5px; font-size: 10px; }
  .waveform { height: 27px; margin: 13px 0 12px; gap: 3px; }
  .waveform i { width: 2px; min-width: 2px; }
  .controls-row { gap: 9px; }
  .volume-control { gap: 7px; }
  .volume-control .icon { width: 18px; height: 18px; }
  .volume-control input { width: min(150px, 48vw); }
  .play-button { width: 58px; height: 58px; }
  .play-button .icon { width: 26px; height: 26px; }
  .site-footer { gap: 8px; padding-top: 3px; }
  .social-links { gap: 8px; }
  .social-link { width: 34px; height: 34px; }
  .social-icon { width: 17px; height: 17px; }
  .radio-copyright { max-width: 350px; font-size: 9px; line-height: 1.4; }
  .radio-copyright span { display: block; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
