/* ===== RADIO THEME — SERIOUS / PREMIUM ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens ── */
:root {
    --bg1: #0d0d0f;
    --bg2: #131316;
    --surface: rgba(255, 255, 255, .04);
    --surface2: rgba(255, 255, 255, .07);

    --ink: #f0f0f3;
    --inkSoft: rgba(255, 255, 255, .50);

    --accent: #6366f1;
    /* indigo-500 */
    --accentSoft: rgba(99, 102, 241, .18);
    --live: #ef4444;

    --strokeColor: rgba(255, 255, 255, .08);
    --stroke: 1px solid var(--strokeColor);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow2: 0 2px 8px rgba(0, 0, 0, .3);

    --r: 16px;

    --safeB: env(safe-area-inset-bottom, 0px);
    --safeT: env(safe-area-inset-top, 0px);
}

/* ── Reset / Global ── */
html,
body {
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    /* lock to viewport */
}

body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Page shell ── */
.page {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: var(--safeT);
    padding-bottom: var(--safeB);
    overflow: hidden;
}

.wrap {
    flex: 1;
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 10px 16px;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    /* Firefox */
}

.wrap::-webkit-scrollbar {
    display: none;
}

/* ── Visual order via CSS ── */
.hero {
    order: 1;
    flex-shrink: 0;
}

.carousel {
    order: 2;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.player {
    order: 3;
    flex-shrink: 0;
}

.socials {
    order: 4;
    flex-shrink: 0;
}

/* ── Card base ── */
.card {
    background: var(--surface);
    border: var(--stroke);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::after {
    display: none !important;
}

/* kill sticker corner */

/* ── Hero ── */
.hero {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--surface2), var(--surface));
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: var(--stroke);
    overflow: hidden;
    flex: 0 0 auto;
    transform: none;
    box-shadow: var(--shadow2);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.heroText {
    min-width: 0;
}

.heroText h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.heroText p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--inkSoft);
    font-weight: 400;
}

.heroActions {
    margin-left: auto;
    flex: 0 0 auto;
}

/* ── Buttons ── */
.btn {
    cursor: pointer;
    border: var(--stroke);
    background: var(--surface2);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none;
    transition: background .15s ease, transform .12s ease;
    user-select: none;
    white-space: nowrap;
}

.btn:hover {
    background: rgba(255, 255, 255, .10);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btnPrimary {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.btnPrimary:hover {
    background: #818cf8;
}

/* ── Player ── */
.boombox.player {
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--surface2), var(--surface));
}

.rowTop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 999px;
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: none;
}

.liveDot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--live);
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .25
    }
}

/* EQ */
.eq {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.eq .bar {
    width: 3px;
    height: 14px;
    border-radius: 3px;
    background: var(--accent);
    transform-origin: bottom;
    animation: dance .85s ease-in-out infinite;
}

.eq .bar:nth-child(2) {
    animation-delay: .07s
}

.eq .bar:nth-child(3) {
    animation-delay: .14s
}

.eq .bar:nth-child(4) {
    animation-delay: .21s
}

.eq .bar:nth-child(5) {
    animation-delay: .28s
}

.eq .bar:nth-child(6) {
    animation-delay: .35s
}

.eq .bar:nth-child(7) {
    animation-delay: .42s
}

@keyframes dance {

    0%,
    100% {
        transform: scaleY(.25);
        opacity: .6
    }

    50% {
        transform: scaleY(1);
        opacity: 1
    }
}

.eq.paused .bar {
    animation: none;
    transform: scaleY(.18);
    opacity: .3;
}

/* Controls */
.controls {
    display: flex;
    gap: 14px;
    align-items: center;
}

.bigPlay {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #0d0d0f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 12px rgba(255, 255, 255, .12);
    transition: transform .15s ease, box-shadow .15s ease;
    flex-shrink: 0;
}

.bigPlay #playText {
    display: none;
}

/* icon-only */
.bigPlay #playIcon {
    font-size: 18px;
    margin-left: 2px;
}

.bigPlay:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(255, 255, 255, .18);
}

.bigPlay:active {
    transform: scale(.96);
}

.bigPlay:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.track {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tiny {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--inkSoft);
    gap: 8px;
}

.progress {
    height: 4px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
    box-shadow: none;
}

.fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 999px;
    transition: width .2s linear;
}

.volRow {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-size: 11px;
    color: var(--inkSoft);
}

.range {
    width: 100px;
    accent-color: var(--accent);
}

/* ── Carousel ── */
.polaroid.carousel {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.frame {
    flex: 1;
    /* grow to fill available space */
    min-height: 120px;
    border-radius: var(--r);
    border: 1px solid var(--strokeColor);
    background: #000;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .5);
    transform: none;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform 1.2s cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.92) saturate(1.1);
}

.cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, transparent 100%);
    border: none;
    border-radius: 0;
    padding: 32px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    transform: none;
    opacity: 1;
    color: #fff;
}

.cap h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.cap p {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide.active .cap {
    animation: capFade .5s ease;
}

@keyframes capFade {
    0% {
        opacity: 0;
        transform: translateY(8px)
    }

    100% {
        opacity: 1;
        transform: translateY(0)
    }
}

.nav {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

.dots {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.dots button {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, .18);
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
}

.dots button:hover {
    background: rgba(255, 255, 255, .35);
}

.dots button.active {
    background: var(--accent);
    width: 18px;
}

/* ── Socials ── */
.socials {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--strokeColor);
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    font-size: 13px;
    transition: background .15s ease, transform .12s ease, border-color .15s ease;
    box-shadow: none;
}

.chip:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, .15);
    transform: translateY(-1px);
}

.chipIcon {
    background: rgba(255, 255, 255, .06);
    width: 20px;
    height: 20px;
    font-size: 11px;
}

/* ── Accessibility ── */
@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ── Anti-overflow ── */
*,
*::before,
*::after {
    box-sizing: border-box
}

.page,
.wrap,
.card {
    max-width: 100%
}

.wrap>* {
    max-width: 100%
}

/* ── Small screens ── */
@media(max-width:520px) {
    .heroText h1 {
        font-size: 19px
    }

    .wrap {
        gap: 8px;
        padding: 8px 12px
    }

    .frame {
        aspect-ratio: 16/9
    }

    .hero {
        padding: 10px 14px;
        gap: 10px
    }

    .boombox.player {
        padding: 12px 14px
    }

    .range {
        width: 80px
    }
}

/* ── Very short screens ── */
@media(max-height:680px) {
    .wrap {
        gap: 6px;
        padding: 6px 12px
    }

    .hero {
        padding: 8px 14px
    }

    .boombox.player {
        padding: 10px 14px
    }

    .frame {
        aspect-ratio: 21/8
    }

    .nav {
        margin-top: 4px
    }
}