:root {
    color-scheme: dark;
    --black: #050507;
    --panel: #0d0e12;
    --panel-soft: #121319;
    --line: rgba(255, 255, 255, 0.14);
    --text: #f5f5f7;
    --muted: #a4a5af;
    --quiet: #70727d;
    --red: #ff3158;
    --green: #72ff79;
    --blue: #547cff;
    --rgb: linear-gradient(90deg, var(--red), var(--blue), var(--green), var(--red));
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--black);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: var(--black);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

body::before {
    position: fixed;
    inset: -12rem;
    z-index: -2;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at 12% 14%, rgba(255, 49, 88, 0.12), transparent 25rem),
        radial-gradient(circle at 88% 22%, rgba(84, 124, 255, 0.13), transparent 27rem),
        radial-gradient(circle at 55% 94%, rgba(114, 255, 121, 0.07), transparent 25rem);
    animation: aura 15s ease-in-out infinite alternate;
}

button,
input,
a {
    font: inherit;
}

button,
a,
input[type="range"] {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.24;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.station-shell {
    width: min(62rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.identity {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.identity-mark {
    position: relative;
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--text);
    background:
        linear-gradient(#0b0c10, #0b0c10) padding-box,
        var(--rgb) border-box;
    background-size: auto, 300% 100%;
    font-size: 0.75rem;
    font-weight: 900;
    animation: rgb-shift 7s linear infinite;
}

.identity-copy {
    display: grid;
    line-height: 1.15;
}

.identity-copy strong {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.identity-copy span {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.listener-count {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.live-badge {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(13, 14, 18, 0.9);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.live-badge.is-live {
    border-color: rgba(114, 255, 121, 0.35);
    color: var(--green);
}

.live-badge.is-ready {
    border-color: rgba(84, 124, 255, 0.4);
    color: #8ca7ff;
}

.live-badge.is-offline {
    border-color: rgba(255, 49, 88, 0.4);
    color: var(--red);
}

.live-badge.is-live .live-dot,
.live-badge.is-ready .live-dot {
    box-shadow: 0 0 0.75rem currentColor;
    animation: pulse 1.7s ease-in-out infinite;
}

.player-card,
.history-card {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        var(--rgb) border-box;
    background-size: auto, 300% 100%;
    animation: rgb-shift 12s linear infinite;
}

.player-card {
    display: grid;
    grid-template-columns: minmax(18rem, 0.9fr) minmax(21rem, 1.1fr);
    overflow: hidden;
    border-radius: 0.85rem;
}

.art-frame {
    position: relative;
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    padding: clamp(0.85rem, 2.5vw, 1.5rem);
    background: #020203;
}

.art-frame img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    filter: saturate(0.96) contrast(1.02);
    transition: transform 800ms ease, filter 800ms ease;
}

.is-playing .art-frame img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(0.985);
}

.art-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 3rem rgba(0, 0, 0, 0.35);
}

.player-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-left: 1px solid var(--line);
}

.station-intro {
    margin-bottom: 0.8rem;
}

.station-intro h1 {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.station-intro p {
    max-width: 34rem;
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.now-playing {
    display: grid;
    min-height: 6.5rem;
    align-content: center;
    gap: 0.45rem;
}

.now-label {
    color: var(--quiet);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#nowPlaying {
    display: block;
    overflow: hidden;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    line-height: 1.2;
    white-space: nowrap;
}
}

.scroll-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.scroll-track {
    --marquee-gap: 2rem;
    --marquee-half-gap: 1rem;
    display: flex;
    width: max-content;
    gap: var(--marquee-gap);
    transform: translateX(0);
}

.scroll-copy {
    display: inline-block;
    min-width: max-content;
}

.scroll-copy[aria-hidden="true"] {
    display: none;
}

.scroll-text.is-overflowing {
    mask-image: linear-gradient(90deg, transparent, black 0.55rem calc(100% - 0.55rem), transparent);
}

.scroll-text.is-overflowing .scroll-copy[aria-hidden="true"] {
    display: inline-block;
}

.scroll-text.is-overflowing .scroll-track {
    animation: text-marquee var(--scroll-duration, 9s) linear infinite;
}

.timeline {
    height: 2px;
    margin: 1rem 0 1.35rem;
    background: rgba(255, 255, 255, 0.09);
}

.timeline span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--rgb);
    background-size: 300% 100%;
    box-shadow: 0 0 0.8rem rgba(84, 124, 255, 0.45);
    transition: width 1s linear;
    animation: rgb-shift 6s linear infinite;
}

.transport {
    display: grid;
    gap: 1rem;
}

.play-button {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--text);
    background:
        linear-gradient(#15161c, #15161c) padding-box,
        var(--rgb) border-box;
    background-size: auto, 300% 100%;
    cursor: pointer;
    font-weight: 850;
    animation: rgb-shift 6s linear infinite;
    transition: transform 150ms ease, background-color 150ms ease;
}

.play-button::after {
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    content: "";
    background: var(--rgb);
    background-size: 300% 100%;
    animation: rgb-shift 4s linear infinite;
}

.play-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.play-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.play-icon {
    width: 0;
    height: 0;
    margin-left: 0.1rem;
    border-top: 0.38rem solid transparent;
    border-bottom: 0.38rem solid transparent;
    border-left: 0.62rem solid currentColor;
}

.is-playing .play-icon {
    width: 0.65rem;
    height: 0.82rem;
    margin: 0;
    border: 0;
    background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%);
}

.is-buffering .play-icon {
    width: 0.85rem;
    height: 0.85rem;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: var(--blue);
    border-right-color: var(--red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.volume-control {
    display: grid;
    grid-template-columns: 2.4rem auto 1fr 3rem;
    align-items: center;
    gap: 0.65rem;
}

.volume-control label,
.volume-control output {
    color: var(--muted);
    font-size: 0.8rem;
}

.volume-control output {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.icon-button {
    appearance: none;
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 0.45rem;
    color: var(--muted);
    background: var(--panel-soft);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex: 0 0 2.4rem;
}

.icon-button:hover {
    color: var(--text);
}

.icon-button svg {
    width: 1.1rem;
    fill: currentColor;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
    cursor: pointer;
}

.history-card {
    margin-top: 0.8rem;
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    border-radius: 0.65rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
}

.section-heading {
    margin-bottom: 0.55rem;
}

h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.history-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 2.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-list strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: rgba(245, 245, 247, 0.82);
    font-size: 0.9rem;
    font-weight: 620;
    white-space: nowrap;
}

.history-list time,
.history-list .ad-label {
    color: var(--quiet);
    font-size: 0.75rem;
}

.history-list .ad-label {
    color: #9bb0ff;
    text-transform: uppercase;
}

.history-list .history-empty {
    display: block;
    min-height: auto;
    padding-top: 0.85rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0 0;
    color: var(--quiet);
    font-size: 0.8rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--muted);
    text-decoration-color: rgba(164, 165, 175, 0.45);
    text-underline-offset: 0.2em;
    transition: color 150ms ease, text-decoration-color 150ms ease;
}

.site-footer a:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

audio {
    display: none;
}

@media (min-width: 43.01rem) {
    .player-card {
        min-height: clamp(25rem, 44vw, 28rem);
    }

    .art-frame {
        aspect-ratio: auto;
    }
}

@keyframes rgb-shift {
    to { background-position: 300% 0; }
}

@keyframes aura {
    from { transform: translate3d(-1%, -1%, 0) scale(1); }
    to { transform: translate3d(1%, 1%, 0) scale(1.06); }
}

@keyframes pulse {
    50% { opacity: 0.35; transform: scale(0.75); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes text-marquee {
    to { transform: translateX(calc(-50% - var(--marquee-half-gap))); }
}

@media (max-width: 43rem) {
    /* Prevent mobile text autosizing from enlarging individual history rows. */
    .history-list {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .history-list strong,
    .history-list .scroll-track,
    .history-list .scroll-copy {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .station-shell {
        width: min(100% - 1rem, 34rem);
        padding-top: 0.6rem;
    }

    .identity-copy span {
        display: none;
    }

    .player-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .art-frame {
        width: 100%;
        min-height: 0;
        aspect-ratio: 1;
        padding: 1rem;
    }

    .player-panel {
        padding: 1.25rem;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .now-playing {
        min-height: 5.75rem;
    }

    .volume-control {
        grid-template-columns: 2.4rem 1fr 3rem;
    }

    .volume-control label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
