/* World Radios 3 – globe page · © Anow Hosting (anowhosting.com) */

/* ---------- theme tokens (colours from Admin → Settings are injected as --accent, --dot, --bg, --glass-rgb) */
:root {
    --accent: #3ee27f;
    --accent-rgb: 62, 226, 127;
    --dot: #3ee27f;
    --dot-active: #ffffff;
    --on-accent: #08130d;
    --blur: 18px;
    --glass-op: .55;
    --radius: 18px;
    --player-h: 80px;
    --nav-h: 0px;
    --panel-w: 380px;
    --ease: cubic-bezier(.22, .8, .24, 1);
    --cx: 50vw;
    --cy: 50vh;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", "Noto Sans Sinhala", "Noto Sans Devanagari", "Noto Sans Arabic", sans-serif;
}
:root, :root[data-theme=dark] {
    color-scheme: dark;
    --bg: #04070c;
    --glass-rgb: 11, 18, 27;
    --text: #eef3f7;
    --muted: #93a3b3;
    --line: rgba(255, 255, 255, .10);
    --edge: rgba(255, 255, 255, .16);
    --hover: rgba(255, 255, 255, .07);
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --thumb-bg: rgba(255, 255, 255, .08);
    --tool-fg: #fff;
}
:root[data-theme=light] {
    color-scheme: light;
    --bg: #dfe8f1;
    --glass-rgb: 255, 255, 255;
    --text: #0d1823;
    --muted: #566676;
    --line: rgba(13, 30, 48, .10);
    --edge: rgba(255, 255, 255, .7);
    --hover: rgba(13, 30, 48, .06);
    --shadow: 0 18px 50px rgba(30, 50, 80, .22);
    --thumb-bg: rgba(13, 30, 48, .07);
    --tool-fg: #0d1823;
}
/* Increased contrast (Settings → Increased contrast): solid panels, brighter secondary text, stronger lines. */
:root[data-contrast=high] { --glass-op: .95 !important; --blur: 0px !important; }
:root[data-contrast=high][data-theme=dark] { --muted: #d2dbe3; --line: rgba(255, 255, 255, .32); --text: #fff; --glass-rgb: 0, 0, 0 !important; }
:root[data-contrast=high][data-theme=light] { --muted: #1f2b36; --line: rgba(0, 0, 0, .35); --text: #000; --glass-rgb: 255, 255, 255 !important; }
:root[data-contrast=high] .list .sub, :root[data-contrast=high] .muted { font-weight: 550; }
:root[data-contrast=high] :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); transition: background-color .45s var(--ease), color .45s var(--ease); }
body.app { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }
.ad-slot { margin: 12px 0; text-align: center; overflow: hidden; max-width: 100%; }
.ad-slot:empty { display: none; }
.cc { display: inline-block; padding: 1px 5px; border-radius: 5px; background: rgba(var(--accent-rgb), .15); color: var(--accent);
    font: 700 10.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; vertical-align: 1px; }
.brand-icon {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--accent); color: var(--on-accent); font-size: 15px; box-shadow: 0 0 14px rgba(var(--accent-rgb), .5);
}
kbd { font: 12px ui-monospace, monospace; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--hover); }

/* ---------- glass surfaces: blurred, see-through, with a soft light edge */
.glass {
    background: linear-gradient(135deg,
        rgba(var(--glass-rgb), calc(var(--glass-op) + .12)),
        rgba(var(--glass-rgb), calc(var(--glass-op) - .08)));
    -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
    backdrop-filter: blur(var(--blur)) saturate(170%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow), inset 0 1px 0 var(--edge);
}

/* ---------- globe stage (MapLibre fills the whole screen, panels float above it) */
#stage { position: fixed; inset: 0; overflow: hidden; }
#sky {
    position: absolute; inset: -2%; background: #000 center / cover no-repeat; opacity: 1;
    transition: opacity .8s var(--ease); will-change: opacity;
}
:root[data-theme=light] #sky { opacity: 0; }
#globe { position: absolute; inset: 0; }
#glow {
    position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 50%; pointer-events: none; opacity: 0;
    box-shadow: 0 0 60px 14px rgba(124, 196, 255, .38), 0 0 160px 40px rgba(124, 196, 255, .14);
    transition: opacity .4s; will-change: transform, width, height;
}
:root[data-theme=light] #glow { box-shadow: 0 0 60px 14px rgba(255, 255, 255, .7), 0 0 160px 40px rgba(120, 170, 220, .25); }
#globe .maplibregl-canvas { outline: none; }
#globe .maplibregl-canvas-container.maplibregl-interactive { cursor: grab; }
#globe .maplibregl-canvas-container.maplibregl-interactive:active { cursor: grabbing; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none !important; }

/* Tuner crosshair – sits on the centre of the visible map area (moved by JS when panels open / close) */
#crosshair {
    position: fixed; left: var(--cx); top: var(--cy); width: 58px; height: 58px; margin: -29px 0 0 -29px;
    pointer-events: none; z-index: 4; transition: left .45s var(--ease), top .45s var(--ease);
}
#crosshair i, #crosshair b { position: absolute; inset: 0; border-radius: 50%; }
#crosshair i {
    border: 2px solid rgba(255, 255, 255, .95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 18px rgba(0, 0, 0, .35);
    transition: transform .3s var(--ease), border-color .3s;
}
#crosshair b { inset: 25px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); transition: transform .3s var(--ease), background .3s; }
#crosshair.near i { border-color: var(--accent); transform: scale(.9); }
#crosshair.locked i { border-color: var(--accent); transform: scale(.82); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 24px rgba(var(--accent-rgb), .8); }
#crosshair.locked b { background: var(--dot-active); transform: scale(1.5); }

/* Place labels next to the selected / previewed dot */
.pin-wrap { position: relative; width: 0; height: 0; pointer-events: none; }
.pin-pulse {
    position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--dot-active); box-shadow: 0 0 12px var(--dot); animation: pulse 2.2s var(--ease) infinite; will-change: transform, opacity;
}
.pin-label {
    position: absolute; inset-inline-start: 36px; top: 0; transform: translateY(-50%); white-space: nowrap;
    padding: 6px 12px; border-radius: 999px; font: 650 13px/1.2 system-ui, sans-serif; color: var(--text);
    animation: fade .3s var(--ease);
}
.pin-wrap.near .pin-label { opacity: .85; font-weight: 550; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

.loading {
    position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; gap: 14px;
    text-align: center; background: var(--bg); transition: opacity .7s var(--ease), visibility .7s;
}
.loading.hide { opacity: 0; visibility: hidden; }
.loading p { margin: 0; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
/* preloader: a spinning Earth that "plays" like a speaker – sound waves pulse out, a signal orbits */
.loader { position: relative; width: 168px; height: 168px; margin: 0 auto 6px; display: grid; place-items: center; }
.loader-earth {
    width: 96px; height: 96px; border-radius: 50%; position: relative; z-index: 2;
    background-color: #0b2a4a; background-size: auto 100%; background-repeat: repeat-x;
    box-shadow: inset -16px -8px 26px rgba(0,0,0,.75), inset 6px 4px 14px rgba(255,255,255,.18), 0 0 0 3px rgba(var(--accent-rgb), .55), 0 0 34px rgba(var(--accent-rgb), .45);
    animation: earthSpin 7s linear infinite, speakerBeat 1.2s ease-in-out infinite;
}
.loader-cap {
    position: absolute; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--on-accent); font-size: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.4), 0 0 0 4px rgba(var(--accent-rgb), .25);
    right: 18px; bottom: 18px; animation: speakerBeat 1.2s ease-in-out infinite;
}
.loader-wave {
    position: absolute; inset: 36px; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb), .7);
    animation: soundWave 2.4s cubic-bezier(.2, .6, .3, 1) infinite; opacity: 0;
}
.loader-wave:nth-child(2) { animation-delay: .8s; }
.loader-wave:nth-child(3) { animation-delay: 1.6s; }
.loader-orbit { position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(var(--accent-rgb), .35); animation: spin 3.2s linear infinite; }
.loader-orbit i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.loader-eq { display: flex; gap: 4px; justify-content: center; align-items: flex-end; height: 18px; }
.loader-eq i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: eqBar 1s ease-in-out infinite; }
.loader-eq i:nth-child(2) { animation-delay: -.2s; } .loader-eq i:nth-child(3) { animation-delay: -.5s; }
.loader-eq i:nth-child(4) { animation-delay: -.7s; } .loader-eq i:nth-child(5) { animation-delay: -.35s; }
@keyframes earthSpin { from { background-position: 0 0; } to { background-position: 192px 0; } }
@keyframes speakerBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.06); } 24% { transform: scale(.99); } }
@keyframes soundWave { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes eqBar { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
[dir=rtl] .loader-cap { right: auto; left: 18px; }
.spinner, .i-load {
    width: 34px; height: 34px; margin: auto; border-radius: 50%;
    border: 3px solid rgba(var(--accent-rgb), .2); border-top-color: var(--accent); animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
body.fading { opacity: 0; transition: opacity .25s; }

/* ---------- top bar */
.topbar {
    position: fixed; top: 0; inset-inline: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
    justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 0; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
    display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0;
    font-weight: 750; letter-spacing: .01em; font-size: 17px; padding: 6px 16px 6px 7px; border-radius: 999px;
}
[dir=rtl] .brand { padding: 6px 7px 6px 16px; }
.brand img { border-radius: 50%; object-fit: cover; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; padding: 0; position: relative;
    color: var(--text); transition: background .2s, color .2s, transform .15s;
}
.icon-btn i { font-size: 17px; }
.icon-btn.flat { background: transparent; border: 0; }
.icon-btn.glass:hover, .icon-btn.flat:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--accent); }
.pill-btn {
    display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
    color: var(--text); text-decoration: none; font-weight: 650; font-size: 14px;
}
.pill-btn i { color: var(--accent); font-size: 15px; }

/* ---------- map tools: one glass rail on the right edge */
.map-tools {
    position: fixed; z-index: 9; top: 78px; inset-inline-end: 16px; display: flex; flex-direction: column; gap: 2px;
    padding: 6px; border-radius: 26px; background: rgba(var(--glass-rgb), calc(var(--glass-op) + .15));
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%); backdrop-filter: blur(var(--blur)) saturate(160%);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tool {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0;
    color: var(--text); background: transparent; font-size: 17px; transition: transform .15s, color .2s, background .2s;
}
.tool:hover { background: var(--hover); }
.tool:active { transform: scale(.9); }
.tool.zoom { font-size: 15px; }
.tool-gap { height: 1px; margin: 4px 8px; background: var(--line); }
#btn-lock .i-locked, body.locked #btn-lock .i-unlocked { display: none; }
body.locked #btn-lock .i-locked { display: block; }
body.locked #btn-lock { color: var(--accent); }
#btn-theme .i-sun { display: none; }
:root[data-theme=light] #btn-theme .i-sun { display: block; }
:root[data-theme=light] #btn-theme .i-moon { display: none; }

/* ---------- side panel (desktop) / bottom sheet (phone) */
.panel {
    position: fixed; z-index: 8; top: 76px; inset-inline-start: 16px; bottom: calc(var(--player-h) + 28px);
    width: var(--panel-w); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
    transition: transform .45s var(--ease), opacity .35s var(--ease), height .45s var(--ease);
}
body.panel-hidden .panel { transform: translateX(calc(-100% - 30px)); opacity: 0; pointer-events: none; }
[dir=rtl] body.panel-hidden .panel { transform: translateX(calc(100% + 30px)); }
.panel-grip { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; padding: 0 4px; }
.tabs button[role=tab] {
    flex: 1; padding: 12px 0 9px; background: none; border: 0; color: var(--muted); min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.tabs button[role=tab] i { font-size: 18px; }
.tabs button[role=tab] span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-close { flex: none; width: 26px; background: none; border: 0; color: var(--muted); display: grid; place-items: center; transform: rotate(90deg); font-size: 14px; }
[dir=rtl] .tab-close { transform: rotate(-90deg); }
.tab-body { display: none; flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: thin; overscroll-behavior: contain; }
.tab-body.active { display: block; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.panel-credit { flex: none; margin: 0; padding: 8px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }
.panel-credit a { color: inherit; }

.place-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.place-titles { flex: 1; min-width: 0; }
.place-count {
    flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000;
    font-size: 19px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.place-time { flex: none; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--text); opacity: .95; align-self: flex-end; padding-bottom: 4px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.place-head h2 { margin: 4px 0 3px; font-size: 27px; line-height: 1.12; letter-spacing: -.01em; font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.small { font-size: 12px; }
.list-title { margin: 22px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.list-title.first { margin-top: 0; }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; font-size: 14px; list-style: none; }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px;
    border-radius: 12px; cursor: pointer; transition: background .15s;
}
.list li:hover { background: var(--hover); }
.list li.playing { background: rgba(var(--accent-rgb), .14); }
.list li.playing .title { color: var(--accent); }
.list .thumb, .confirm-head .thumb {
    flex: none; width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--thumb-bg);
    display: grid; place-items: center; color: var(--accent); font-size: 17px;
}
.list .meta { min-width: 0; flex: 1; }
.list .title { display: block; font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .sub { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .badge { flex: none; font-size: 12px; color: var(--muted); }
.list .info-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; opacity: .7; }
.list .info-btn:hover { background: var(--hover); color: var(--accent); opacity: 1; }
.list .info-btn i { font-size: 17px; }
.list.compact li { padding: 7px 10px; }
.list.compact .pin { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 8px var(--dot); }
.eq { display: none; gap: 2px; align-items: flex-end; height: 16px; flex: none; }
.list li.playing .eq { display: flex; }
.eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
body:not(.playing) .eq i { animation-play-state: paused; }

.search { position: relative; }
.search i { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; }
.search input {
    width: 100%; padding: 13px 16px; padding-inline-start: 42px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--hover); color: var(--text); font-size: 16px; outline: none; transition: border-color .2s;
}
.search input:focus { border-color: var(--accent); }
.crumbs { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.crumbs button { background: none; border: 0; color: var(--accent); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.chips button { border: 1px solid var(--line); background: var(--hover); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chips button:hover { border-color: var(--accent); }

/* ---------- settings tab (Language, Globe quality, Increased contrast…) */
.set-list { list-style: none; margin: -6px 0 0; padding: 0; }
.set-list button, .set-opts button {
    width: 100%; display: flex; align-items: center; gap: 14px; text-align: start; background: none; border: 0;
    border-bottom: 1px solid var(--line); padding: 15px 4px; color: var(--text);
}
.set-list button:hover, .set-opts button:hover { background: var(--hover); }
.set-list i.lead { width: 22px; text-align: center; color: var(--accent); font-size: 17px; }
.set-list .lbl { flex: 1; min-width: 0; font-size: 16px; }
.set-list .val { color: var(--muted); font-size: 13.5px; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-list .chev { color: var(--muted); font-size: 13px; }
[dir=rtl] .set-list .chev { transform: scaleX(-1); }
.set-back { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--text); font-size: 17px; padding: 2px 0 10px; }
.set-back i { font-size: 18px; }
[dir=rtl] .set-back i { transform: scaleX(-1); }
.set-title { margin: 4px 0 10px; font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.set-opts { margin: 0 -16px; background: rgba(var(--glass-rgb), .25); }
.set-opts button { padding: 14px 20px; }
.set-opts .o-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-opts .o-name { font-size: 18px; }
.set-opts .o-sub { font-size: 13.5px; color: var(--muted); }
.set-opts button.on .o-name { color: var(--accent); }
.set-opts .o-check { color: var(--accent); font-size: 22px; visibility: hidden; }
.set-opts button.on .o-check { visibility: visible; }
.set-note { font-size: 15px; line-height: 1.5; margin: 18px 4px 6px; color: var(--text); opacity: .9; }
.set-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
.set-switch input { width: 46px; height: 26px; accent-color: var(--accent); }

/* ---------- player */
.player {
    position: fixed; z-index: 12; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom)); height: var(--player-h);
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 0 14px 0 12px;
    border-radius: var(--radius);
}
.player-main { display: flex; align-items: center; gap: 12px; min-width: 0; background: none; border: 0; padding: 6px; margin: -6px; border-radius: 14px; text-align: start; }
.player-main:hover { background: var(--hover); }
.disc {
    flex: none; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: var(--thumb-bg);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35), 0 6px 18px rgba(0,0,0,.3); position: relative; transform: translateZ(0);
}
.disc img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.disc img[hidden] { display: none; }
.disc-ph { position: absolute; inset: 0; width: 100% !important; height: 100%; display: grid; place-items: center; font-size: 22px; color: var(--on-accent); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), transparent 60%), var(--accent); }
.disc img:not([hidden]) + .disc-ph { display: none; }
body.playing .disc img:not([hidden]) { animation: spin 16s linear infinite; will-change: transform; }
.disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--accent); opacity: 0; z-index: 2; pointer-events: none; }
body.playing .disc::after { animation: livePulse 2.4s ease-in-out infinite; }
body.locked .disc { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(0,0,0,.3); }
@keyframes livePulse { 0%, 100% { opacity: 0; } 50% { opacity: .9; } }
.player-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-info strong, .player-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info strong { font-size: 16px; color: var(--accent); font-weight: 600; }
body:not(.has-station) .player-info strong { color: var(--text); }
.player-info span { color: var(--text); opacity: .8; font-size: 13.5px; }
.player-controls { display: flex; align-items: center; gap: 10px; }
.player-extra { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.play-btn {
    width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent);
    display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .14), 0 8px 26px rgba(var(--accent-rgb), .45);
    transition: transform .15s; position: relative; transform: translateZ(0);
}
@media (hover: hover) { .play-btn:hover { transform: scale(1.05); } }
.play-btn:active { transform: scale(.95); }
.play-btn i { font-size: 22px; }
.play-btn .i-play { margin-left: 3px; }
.play-btn .i-pause { display: none; }
body.playing .play-btn .i-play, body.buffering .play-btn .i-play { display: none; }
body.playing .play-btn .i-pause, body.buffering .play-btn .i-pause { display: block; }
.play-btn .i-load {
    display: block; position: absolute; inset: -6px; width: auto; height: auto; margin: 0; border-radius: 50%;
    border: 3px solid transparent; border-top-color: var(--accent); border-right-color: rgba(var(--accent-rgb), .35);
    opacity: 0; transition: opacity .25s; animation: spin .8s linear infinite; animation-play-state: paused;
    will-change: transform; pointer-events: none;
}
body.buffering .play-btn .i-load { opacity: 1; animation-play-state: running; }
#btn-fav.on { color: #ff5d7a; }
#btn-sleep.on { color: var(--accent); }
/* Media controls keep their direction in right-to-left languages. */
[dir=rtl] .player-controls { direction: ltr; }
.volume { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 0 6px; font-size: 14px; }
#volume { width: 96px; accent-color: var(--accent); }
.sleep-badge { position: absolute; top: -6px; inset-inline-end: -8px; font-size: 10px; font-weight: 750; padding: 2px 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); white-space: nowrap; }

.sheet-pill {
    display: flex; align-items: center; gap: 8px; position: fixed; z-index: 11; inset-inline-start: 16px;
    bottom: calc(var(--player-h) + 30px); height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: 14px;
    opacity: 0; pointer-events: none; transform: translateY(16px); transition: .4s var(--ease); max-width: calc(100vw - 32px); color: var(--text);
}
.sheet-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-pill i:first-child { color: var(--accent); }
body.panel-hidden .sheet-pill { opacity: 1; transform: none; pointer-events: auto; }

.bottom-nav { display: none; }

/* ---------- popover menu, modal, toast */
.menu { position: fixed; z-index: 40; min-width: 240px; max-height: 70vh; overflow: auto; padding: 6px; border-radius: 16px; animation: pop .2s var(--ease); }
.menu i { width: 20px; text-align: center; color: var(--accent); }
.menu button, .menu a {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: none;
    border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; text-align: start;
}
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.menu .menu-title { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.menu .on { color: var(--accent); font-weight: 650; }
.menu .layer-thumb { width: 34px; height: 34px; border-radius: 8px; flex: none; background: #123 center / cover; box-shadow: inset 0 0 0 1px var(--line); }
.menu .on .layer-thumb { box-shadow: 0 0 0 2px var(--accent); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); animation: fade .25s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(440px, 100%); max-height: 86vh; overflow: auto; border-radius: 22px; padding: 26px; animation: pop .3s var(--ease); }
.modal-x { position: absolute; top: 10px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--hover); font-size: 16px; line-height: 1; display: grid; place-items: center; }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-soft {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--hover); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.btn-soft.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.confirm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.confirm-head .thumb { width: 60px !important; height: 60px !important; font-size: 24px !important; border-radius: 14px !important; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 14px; }
.share-grid a, .share-grid button { flex-direction: column; justify-content: center; text-align: center; font-size: 12.5px; padding: 14px 6px; }
.share-grid i { font-size: 24px; }
.share-grid .fa-whatsapp { color: #25d366; } .share-grid .fa-facebook { color: #1877f2; } .share-grid .fa-telegram { color: #29a9eb; }
.about-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 750; margin-bottom: 8px; }
.about-brand img { width: 44px; height: 44px; border-radius: 50%; }
.about-brand .brand-icon { width: 44px; height: 44px; font-size: 20px; }
.howto i { color: var(--accent); width: 18px; text-align: center; }
.howto { padding-inline-start: 18px; line-height: 1.7; font-size: 14px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

.toast {
    position: fixed; z-index: 60; left: 50%; bottom: calc(var(--player-h) + var(--nav-h) + 40px); transform: translate(-50%, 16px);
    padding: 11px 18px; border-radius: 18px; font-size: 14px; opacity: 0; transition: .3s var(--ease);
    pointer-events: none; max-width: min(92vw, 420px); text-align: center; line-height: 1.45;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.action.show { pointer-events: auto; cursor: pointer; }
.toast i { color: var(--accent); margin-inline-end: 4px; }
.toast u { color: var(--accent); text-underline-offset: 3px; }
.attribution {
    position: fixed; z-index: 3; inset-inline-end: 10px; bottom: calc(var(--player-h) + 20px); font-size: 10px; max-width: 60vw; text-align: end;
    color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; pointer-events: none; transition: opacity .3s;
}
:root[data-theme=light] .attribution { color: rgba(0,0,0,.7); text-shadow: 0 1px 2px #fff; }
/* compact credits: a small (i) – the text opens on tap */
.attribution.compact { display: flex; align-items: center; gap: 6px; pointer-events: auto; text-shadow: none; }
.attribution.compact[hidden] { display: none; }
.credit-btn {
    flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer;
    background: rgba(var(--glass-rgb), .75); color: var(--muted); font: italic 700 11px/1 Georgia, serif;
}
.credit-text {
    padding: 3px 8px; border-radius: 8px; background: rgba(var(--glass-rgb), .85); color: var(--text);
    max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .35s var(--ease), opacity .25s;
}
.attribution.compact.open .credit-text { max-width: min(80vw, 520px); opacity: 1; white-space: normal; }
.no-webgl { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 30px; color: var(--muted); }

/* ---------- phone: floating cards – the sheet, the player card and the dock float above the globe */
@media (max-width: 760px) {
    :root {
        --player-h: 64px; --nav-h: 58px; --radius: 22px; --gap: 8px;
        --dock-b: calc(env(safe-area-inset-bottom) + 10px);
        --player-b: calc(var(--dock-b) + var(--nav-h) + var(--gap));
        --sheet-b: calc(var(--player-b) + var(--player-h) + var(--gap));
    }
    .topbar { padding: max(10px, env(safe-area-inset-top)) 10px 0; }
    .brand { padding: 5px; font-size: 0; }
    .brand > span:not(.brand-icon) { display: none; }
    .icon-btn { width: 40px; height: 40px; }
    .pill-btn { width: 40px; padding: 0; justify-content: center; }
    .pill-btn span, #btn-about { display: none; }
    .map-tools { top: max(62px, calc(env(safe-area-inset-top) + 52px)); inset-inline-end: 10px; padding: 4px; transition: opacity .3s var(--ease); }
    .tool { width: 40px; height: 40px; font-size: 17px; }
    .tool.zoom, .tool-gap { display: none; }
    body:not(.panel-hidden) .map-tools { opacity: 0; pointer-events: none; }

    /* dock: icons only, the open section grows into a pill with its name */
    .bottom-nav {
        display: flex; gap: 4px; position: fixed; z-index: 13; inset-inline: 12px; bottom: var(--dock-b); height: var(--nav-h);
        padding: 6px; border-radius: 20px; background: rgba(var(--glass-rgb), .97); box-shadow: var(--shadow);
    }
    .bottom-nav button {
        flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 14px;
        background: none; color: var(--muted); font-size: 13px; font-weight: 650; min-width: 0; padding: 0 6px;
        transition: flex-grow .35s var(--ease), background .25s, color .25s;
    }
    .bottom-nav button i { font-size: 19px; flex: none; }
    .bottom-nav button span { max-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transition: max-width .35s var(--ease), opacity .25s; }
    .bottom-nav button.active { flex-grow: 2.4; color: var(--accent); background: rgba(var(--accent-rgb), .15); }
    .bottom-nav button.active span { max-width: 120px; opacity: 1; }
    body.panel-hidden .bottom-nav button.active { flex-grow: 1; background: none; color: var(--muted); }
    body.panel-hidden .bottom-nav button.active span { max-width: 0; opacity: 0; }

    /* player card: logo · name · heart · play · next */
    .player {
        inset-inline: 12px; bottom: var(--player-b); border-radius: 20px; padding: 0 8px 0 10px; gap: 6px;
        grid-template-columns: minmax(0, 1fr) auto auto; background: rgba(var(--glass-rgb), .97); box-shadow: var(--shadow);
    }
    .player-main { margin: 0; padding: 4px 0; gap: 10px; }
    .disc { width: 44px; height: 44px; }
    .disc-ph { font-size: 18px; }
    .player-info strong { font-size: 16px; }
    .player-info span { font-size: 13px; }
    .player-extra { order: 2; gap: 0; }
    .player-extra .volume, #btn-more { display: none; }
    .player-controls { order: 3; gap: 2px; }
    #btn-prev, #btn-sleep { display: none; }
    .player-controls .icon-btn, #btn-fav { width: 40px; height: 40px; }
    .player-controls .icon-btn i, #btn-fav i { font-size: 18px; }
    .player .play-btn { width: 46px; height: 46px; box-shadow: 0 4px 16px rgba(var(--accent-rgb), .4); }
    .player .play-btn i { font-size: 18px; }
    .player .play-btn .i-load { inset: -4px; }
    #btn-fav:not(.on) { color: var(--muted); }

    /* sheet: a solid card above the player – nothing of the globe shows through */
    .panel {
        top: auto; inset-inline: 12px; width: auto; bottom: var(--sheet-b); z-index: 10;
        height: min(46vh, 430px); border-radius: var(--radius); box-shadow: var(--shadow);
        background: rgb(var(--glass-rgb)); -webkit-backdrop-filter: none; backdrop-filter: none;
        transition: transform .4s var(--ease), opacity .3s var(--ease), height .4s var(--ease), visibility 0s linear 0s;
    }
    body.sheet-full .panel { height: calc(100dvh - var(--sheet-b) - max(62px, calc(env(safe-area-inset-top) + 52px))); }
    body.panel-hidden .panel, [dir=rtl] body.panel-hidden .panel {
        transform: translateY(24px) scale(.98); opacity: 0; visibility: hidden; pointer-events: none;
        transition: transform .35s var(--ease), opacity .25s var(--ease), visibility 0s linear .35s;
    }
    .panel-grip { display: block; flex: none; width: 100%; height: 20px; border: 0; background: none; padding: 0; cursor: grab; touch-action: none; }
    .panel-grip span { display: block; width: 44px; height: 4px; margin: 8px auto 0; border-radius: 9px; background: var(--muted); opacity: .6; }
    .tabs { display: none; }
    .tab-body { padding: 8px 16px 16px; }
    .panel-credit { display: none; }
    .place-head h2 { font-size: 28px; }
    .sheet-pill { display: none; }

    .attribution { inset-inline-start: 12px; inset-inline-end: auto; text-align: start; bottom: calc(var(--player-b) + var(--player-h) + 8px); max-width: calc(100vw - 24px); }
    body:not(.panel-hidden) .attribution { opacity: 0; pointer-events: none; }
    .modal { align-items: end; padding: 8px; }
    .modal-card { border-radius: 24px; }
    .toast { bottom: calc(var(--player-b) + var(--player-h) + 16px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* touch screens: no sticky hover background after a tap */
@media (hover: none) {
    .icon-btn.flat:hover, .tool:hover { background: transparent; }
}
