/* Mesmo visual do popup da extensão, adaptado pra celular (mobile-first) */
:root { --bg: #15151c; --card: #1e1e28; --card2: #2a2a36; --text: #f2f2f5; --muted: #8b8b99; --accent: #e63946; color-scheme: dark; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0 auto; max-width: 480px; min-height: 100vh; min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 16px) calc(env(safe-area-inset-bottom) + 16px) calc(env(safe-area-inset-left) + 16px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(120% 55% at 50% 0%, #2a1c25 0%, var(--bg) 62%) no-repeat, var(--bg);
  color: var(--text); text-align: center;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; border: 0; cursor: pointer; color: var(--text); background: transparent; padding: 0; }
button:focus-visible, input[type=range]:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
svg { display: block; }
[hidden] { display: none !important; }

/* topo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .3px; color: #d6d6de; }
.brand img { border-radius: 5px; }
.install { font-size: 12px; font-weight: 600; color: #cfcfd8; padding: 7px 12px; border-radius: 999px; border: 1px solid #3a3a48; }
.install:active { background: var(--card2); }

/* capa + vinil */
.stage { position: relative; width: 300px; height: 152px; margin: 14px auto 18px; }
.cover { position: absolute; top: 0; left: 40px; z-index: 1; width: 220px; height: 152px; margin: 0; transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .3s; background: #fff; border-radius: 26px; padding: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.55); }
.cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cover svg { width: 70%; height: 70%; }
body.playing .cover { box-shadow: 0 10px 30px rgba(230,57,70,.35), 0 0 0 2px rgba(230,57,70,.55); }
.vinyl { position: absolute; top: 8px; left: 82px; width: 136px; height: 136px; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.6); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.disc { position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, #15151c 0 4px, var(--accent) 4.5px 23px, #0d0d10 23.5px 25px, transparent 25.5px),
    repeating-radial-gradient(circle, #18181c 0 1.4px, #25252b 1.4px 2.8px);
  box-shadow: inset 0 0 0 2px #0c0c0f; }
.disc::after { content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 3px; margin: -1.5px 0 0 6px; border-radius: 2px; background: rgba(255,255,255,.85); }
.vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg, transparent 0 30deg, rgba(255,255,255,.13) 50deg, transparent 70deg 200deg, rgba(255,255,255,.08) 220deg, transparent 240deg); }
body.playing .cover { transform: translateX(-36px); }
body.playing .vinyl { transform: translateX(80px); }
body.playing .disc { animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 340px) { .stage { zoom: .88; } }
@media (prefers-reduced-motion: reduce) { body.playing .disc { animation: none; } .cover, .vinyl { transition: none; } }

/* textos */
h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; line-height: 1.2; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live:not(.off) { color: var(--accent); }
.live:not(.off)::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
#title { font-size: 14px; color: #d6d6de; min-height: 40px; margin: 12px 8px 0; line-height: 1.4; display: flex; align-items: center; justify-content: center; word-break: break-word; }

/* controles */
.controls { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 10px 0 18px; }
.nav { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #cfcfd8; transition: background .15s, transform .08s; }
.nav:active { background: var(--card2); transform: scale(.92); }
.nav svg { width: 24px; height: 24px; }
.main { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(230,57,70,.45); transition: transform .08s, filter .15s; }
.main:active { transform: scale(.95); }
.main:disabled { opacity: .4; cursor: default; }
.main svg { width: 32px; height: 32px; }
#icPlay { margin-left: 3px; }
body.loading .main { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(1.25); } }

/* volume */
.volume { display: flex; align-items: center; gap: 12px; max-width: 320px; margin: 0 auto; }
.volume.ios { justify-content: center; }
.mute { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.mute:active { background: var(--card2); }
.mute.muted { color: var(--accent); }
.mute svg { width: 22px; height: 22px; }
input[type=range] { --p: 100%; flex: 1; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 2px; cursor: pointer; background: linear-gradient(to right, var(--accent) var(--p), #3d3d4a var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; }

/* lista de rádios */
h2 { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); text-align: left; margin: 28px 0 10px; }
.stations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.station { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--card); text-align: left; min-height: 60px; transition: background .15s; }
.station:active { background: var(--card2); }
.station .thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: #fff; padding: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.station .thumb img { width: 100%; height: 100%; object-fit: contain; }
.station .name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.station[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: #261c24; }
.station[aria-current="true"] .name { font-weight: 700; }
.station.down { opacity: .5; }

/* rodapé */
footer { margin-top: 28px; font-size: 11px; color: var(--muted); line-height: 1.5; }
footer p { margin: 0 0 6px; }
footer a { color: #cfcfd8; }

/* instrução do iPhone */
.sheet { border: 0; border-radius: 20px; padding: 20px; max-width: 340px; width: calc(100% - 32px); background: var(--card); color: var(--text); text-align: left; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.sheet::backdrop { background: rgba(0,0,0,.6); }
.sheet h3 { margin: 0 0 10px; font-size: 16px; }
.sheet ol { margin: 0 0 16px; padding-left: 20px; font-size: 14px; line-height: 1.5; color: #d6d6de; }
.sheet li { margin-bottom: 6px; }
.btn { width: 100%; padding: 12px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
