/* Gedison Radio — public Icecast pages (status.xsl, server_version.xsl, auth.xsl).
   Admin pages keep using the stock style.css. */

:root {
    --brand: #0a3b7f;
    --brand-2: #1560c2;
    --brand-soft: #e8eef8;
    --live: #e0303a;
    --ok: #1f9d55;
    --bg: #f3f5f9;
    --card: #ffffff;
    --text: #1b2433;
    --muted: #5d6b82;
    --border: #dfe5ee;
    --shadow: 0 1px 2px rgba(10, 59, 127, .06), 0 8px 24px rgba(10, 59, 127, .08);
    --radius: 16px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand-soft: #16233a;
        --bg: #0c1220;
        --card: #141c2e;
        --text: #e6ebf3;
        --muted: #93a1b8;
        --border: #24304a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: #6ea8ff; } }

code {
    font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--brand-soft);
    padding: .1em .4em;
    border-radius: 6px;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(135deg, #072a5c 0%, var(--brand) 45%, var(--brand-2) 100%);
    padding-bottom: 72px;
}

/* subtle dotted pattern echoing the logo's cross of dots */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1.5px, transparent 1.6px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    pointer-events: none;
}

.topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.brand img {
    display: block;
    height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
    color: rgba(255, 255, 255, .85);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .92rem;
}
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; }

.hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 28px;
}

.hero h1 { margin: 0 0 4px; font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .8); }

.hero .now {
    margin-top: 14px;
    font-size: 1.05rem;
    color: #fff;
    min-height: 1.6em;
}
.hero .now:empty { display: none; }

/* ---------- Status badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 11px 3px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    margin-bottom: 10px;
}
.badge::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
}
.badge.live { background: var(--live); }
.badge.live::before { background: #fff; opacity: 1; animation: pulse 1.6s ease-out infinite; }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); }
    100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
}

/* ---------- Player button ---------- */

.play {
    flex: none;
    position: relative;
    width: 88px; height: 88px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.play:hover { transform: scale(1.05); box-shadow: 0 14px 36px rgba(0, 0, 0, .3); }
.play:active { transform: scale(.97); }
.play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.play svg { width: 36px; height: 36px; fill: currentColor; }
.play .i-pause, .play .i-load { display: none; }
.play.playing .i-play { display: none; }
.play.playing .i-pause { display: inline; }
.play.loading .i-play, .play.loading .i-pause { display: none; }
.play.loading .i-load { display: inline; animation: spin 1s linear infinite; }

/* ripple rings while playing */
.play.playing::before, .play.playing::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .6);
    animation: ring 2.4s ease-out infinite;
}
.play.playing::after { animation-delay: 1.2s; }

@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.volume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    color: rgba(255, 255, 255, .8);
    font-size: .85rem;
}
.volume input { width: 140px; accent-color: #fff; }

/* equalizer bars */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; margin-left: 8px; vertical-align: -2px; }
.eq i { width: 3px; height: 30%; background: currentColor; border-radius: 2px; }
.playing-on .eq i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s !important; }
.eq i:nth-child(3) { animation-delay: -.7s !important; }
.eq i:nth-child(4) { animation-delay: -.2s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.eq { visibility: hidden; }
.playing-on .eq { visibility: visible; }

.msg {
    margin-top: 12px;
    font-size: .9rem;
    color: #ffd6d8;
}
.msg:empty { display: none; }

/* ---------- Main ---------- */

main { flex: 1; position: relative; z-index: 2; margin-top: -44px; padding-bottom: 40px; }

.section-title {
    margin: 32px 0 12px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat .num { font-size: 1.9rem; font-weight: 750; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .stat .num { color: #8fb8ff; } }
.stat .lbl { font-size: .82rem; color: var(--muted); }

.mount-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mount-head h3 { margin: 0; font-size: 1.15rem; }
.mount-head .sub { color: var(--muted); font-size: .88rem; }

.pill {
    flex: none;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(31, 157, 85, .12);
    color: var(--ok);
}
.pill.off { background: var(--brand-soft); color: var(--muted); }

.track {
    margin: 14px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--brand-soft);
    font-size: .95rem;
    overflow-wrap: anywhere;
}
.track small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }

dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

.empty { text-align: center; padding: 36px 22px; color: var(--muted); }
.empty img { width: 72px; height: 72px; opacity: .35; margin-bottom: 8px; }
@media (prefers-color-scheme: dark) { .empty img { filter: invert(1); } }
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }

/* forms (auth.xsl) */
.form p { margin: 0 0 12px; }
.form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.form input[type=text], .form input[type=password] {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

/* ---------- Footer ---------- */

footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .85rem;
    padding: 20px 0;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
footer .legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
    .brand img { height: 48px; }
    .hero-body { flex-direction: column; align-items: flex-start; gap: 20px; }
    .play { width: 76px; height: 76px; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat .num { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
