/* Neon player deck */
:root {
    --player-height: 186px;
}

.global-player {
    bottom: 22px;
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(280px, 400px) minmax(360px, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "track controls tools"
        "progress progress progress";
    gap: 18px clamp(18px, 2.2vw, 42px);
    align-items: center;
    width: min(1920px, calc(100% - 72px));
    min-height: 156px;
    padding: 30px 40px 26px;
    border: 1px solid rgba(130, 106, 255, 0.48);
    border-radius: 42px;
    background:
        linear-gradient(180deg, rgba(11, 16, 48, 0.84), rgba(5, 8, 28, 0.92)),
        linear-gradient(90deg, rgba(28, 222, 255, 0.1), rgba(143, 91, 255, 0.13) 52%, rgba(255, 112, 202, 0.08));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -28px 70px rgba(26, 14, 76, 0.28),
        0 0 0 1px rgba(67, 213, 255, 0.13),
        0 0 38px rgba(91, 105, 255, 0.32),
        0 26px 90px rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(28px) saturate(1.18);
}

.global-player::before {
    inset: 1px;
    border-radius: 41px;
    background:
        linear-gradient(90deg, rgba(75, 220, 255, 0.1), transparent 26%, rgba(127, 91, 255, 0.14) 72%, rgba(255, 112, 202, 0.08)),
        rgba(4, 7, 27, 0.32);
}

.global-player::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 22px;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(113, 106, 255, 0.36), rgba(80, 216, 255, 0.22), transparent);
    pointer-events: none;
}

.player-track {
    grid-area: track;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 22px;
}

.track-cover {
    width: 112px;
    border-radius: 24px;
    border-color: rgba(99, 218, 255, 0.46);
    box-shadow:
        inset 0 0 26px rgba(121, 103, 255, 0.22),
        0 0 0 1px rgba(129, 92, 255, 0.26),
        0 0 28px rgba(64, 211, 255, 0.18);
}

.player-track-copy {
    gap: 9px;
}

.player-track .eyebrow {
    color: var(--cyan);
    font-size: 0.86rem;
    letter-spacing: 0;
    text-transform: none;
}

.player-track h2 {
    font-size: clamp(1.1rem, 1.6vw, 1.45rem);
    line-height: 1.08;
}

.player-track p {
    color: #a889ff;
    font-size: clamp(0.96rem, 1.15vw, 1.12rem);
}

.now-playing-badge {
    min-height: 31px;
    padding-inline: 13px;
    border-color: rgba(113, 106, 255, 0.36);
    border-radius: 10px;
    background: rgba(92, 80, 210, 0.18);
    color: #bdaaff;
    font-size: 0.84rem;
    box-shadow: inset 0 0 18px rgba(97, 220, 255, 0.06);
}

.now-playing-badge span {
    width: 16px;
    height: 16px;
    background:
        radial-gradient(circle at 65% 32%, rgba(255, 255, 255, 0.92) 0 2px, transparent 3px),
        radial-gradient(circle at 62% 42%, transparent 0 8px, #7c65ff 9px);
    box-shadow: 0 0 16px rgba(127, 101, 255, 0.85);
}

.player-controls {
    grid-area: controls;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.loop-button {
    display: grid;
}

.icon-button,
.queue-toggle-button,
.heart-button,
.timer-pill {
    border-color: rgba(134, 112, 255, 0.26);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        rgba(24, 25, 71, 0.68);
    color: #f4f0ff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 30px rgba(0, 0, 0, 0.24);
}

.icon-button {
    width: 62px;
    height: 62px;
    border-radius: 20px;
}

.global-player .player-controls .icon-button {
    width: 62px;
    height: 62px;
}

.global-player .player-controls .play-button {
    width: 88px;
    height: 88px;
}

.previous-button span,
.next-button span {
    width: 18px;
    height: 18px;
    border-width: 3px;
}

.play-button {
    width: 88px;
    height: 88px;
    border-color: rgba(137, 118, 255, 0.9);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.28), transparent 34%),
        radial-gradient(circle, rgba(96, 210, 255, 0.2), rgba(123, 93, 255, 0.38) 58%, rgba(45, 32, 121, 0.58));
    box-shadow:
        inset 0 0 30px rgba(255, 255, 255, 0.1),
        0 0 0 7px rgba(111, 91, 255, 0.2),
        0 0 34px rgba(109, 100, 255, 0.66);
}

.play-symbol {
    border-top-width: 14px;
    border-bottom-width: 14px;
    border-left-width: 20px;
}

.is-playing .play-symbol {
    width: 24px;
    height: 30px;
}

.player-tools {
    grid-area: tools;
    display: flex;
    flex-wrap: nowrap;
    justify-content: end;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.player-tools > * {
    position: static;
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
}

.queue-toggle-button,
.heart-button,
.player-size-button {
    width: 62px;
    min-width: 62px;
    height: 62px;
    padding: 0;
    border-radius: 20px;
}

.queue-toggle-button > span:last-child {
    display: none;
}

@media (min-width: 1181px) and (max-width: 1400px) {
    .global-player {
        grid-template-columns: minmax(280px, 1fr) minmax(300px, auto);
        grid-template-areas:
            "track controls"
            "tools tools"
            "progress progress";
        gap: 10px 28px;
        min-height: 0;
        padding: 20px 32px 22px;
    }

    .player-track {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 16px;
    }

    .track-cover {
        width: 82px;
        border-radius: 19px;
    }

    .now-playing-badge {
        display: none;
    }

    .global-player .player-controls .icon-button {
        width: 52px;
        height: 52px;
        border-radius: 17px;
    }

    .global-player .player-controls .play-button {
        width: 76px;
        height: 76px;
    }

    .player-tools {
        justify-content: center;
        gap: 10px;
    }

    .queue-toggle-button,
    .heart-button,
    .player-size-button {
        width: 52px;
        min-width: 52px;
        height: 52px;
        border-radius: 17px;
    }

    .timer-pill {
        min-height: 52px;
        min-width: 142px;
        border-radius: 19px;
    }

    .volume-control {
        min-width: 142px;
    }

    .player-progress {
        margin-top: 0;
    }
}

.queue-icon {
    width: 23px;
    gap: 5px;
}

.queue-icon span {
    height: 3px;
    box-shadow: -7px 0 0 -1px currentColor;
}

.heart-button {
    color: #ff8ed7;
    border-color: rgba(255, 115, 202, 0.34);
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 115, 202, 0.16), transparent 66%),
        rgba(40, 22, 64, 0.62);
}

.heart-button span {
    width: 25px;
    height: 22px;
}

.heart-button span::before {
    font-size: 1.68rem;
}

.volume-control {
    display: grid;
    grid-template-columns: 28px minmax(96px, 150px);
    gap: 12px;
    min-width: 150px;
}

.volume-icon {
    width: 25px;
    height: 25px;
}

.volume-control input {
    width: 100%;
    accent-color: #8b6cff;
}

.timer-pill {
    position: relative;
    display: grid;
    grid-template-columns: 30px auto;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-width: 152px;
    min-height: 62px;
    padding: 0 18px;
    border-radius: 24px;
}

.timer-pill::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #8b6cff;
    box-shadow:
        8px -4px 0 -2px rgba(9, 13, 46, 0.95),
        0 0 16px rgba(139, 108, 255, 0.8);
}

.timer-pill img {
    display: none;
}

.timer-copy {
    display: grid;
    gap: 1px;
    line-height: 1.08;
    text-align: left;
}

.timer-kicker {
    color: rgba(240, 243, 251, 0.76);
    font-size: 0.8rem;
    font-weight: 650;
}

.timer-pill [data-timer-label] {
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 850;
}

.player-size-button {
    color: var(--cyan);
}

.player-progress {
    position: relative;
    z-index: 1;
    grid-area: progress;
    grid-column: auto;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: 14px;
    color: #a993ff;
    font-size: 0.96rem;
}

.progress-rail {
    height: 8px;
    background: rgba(139, 108, 255, 0.14);
}

.progress-rail span {
    background: linear-gradient(90deg, var(--cyan), #6f78ff 56%, #a66cff);
    box-shadow:
        0 0 18px rgba(90, 213, 246, 0.42),
        0 0 28px rgba(139, 108, 255, 0.4);
}

.progress-rail span::after {
    right: -11px;
    width: 22px;
    height: 22px;
    background: #f1edff;
    box-shadow:
        0 0 0 8px rgba(70, 118, 255, 0.22),
        0 0 26px rgba(103, 126, 255, 0.82);
}

.player-queue-panel,
.player-save-panel {
    border-color: rgba(126, 103, 255, 0.38);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(13, 17, 54, 0.98), rgba(5, 8, 30, 0.98)),
        rgba(5, 8, 30, 0.98);
    box-shadow:
        0 0 34px rgba(103, 126, 255, 0.22),
        0 26px 80px rgba(0, 0, 0, 0.68);
}

body.player-is-compact {
    --player-height: 92px;
}

body.player-is-compact .global-player {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "track controls tools";
    width: min(980px, calc(100% - 40px));
    min-height: 74px;
    padding: 10px 14px;
    border-radius: 24px;
}

body.player-is-compact .global-player::before {
    border-radius: 23px;
}

body.player-is-compact .global-player::after,
body.player-is-compact .player-progress,
body.player-is-compact .player-notice,
body.player-is-compact .player-queue-panel,
body.player-is-compact .player-save-panel,
body.player-is-compact .volume-control,
body.player-is-compact .timer-pill,
body.player-is-compact .loop-button {
    display: none;
}

body.player-is-compact .player-track {
    display: grid;
    grid-area: track;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
}

body.player-is-compact .track-cover {
    display: block;
    width: 48px;
    border-radius: 13px;
}

body.player-is-compact .player-track-copy {
    display: grid;
    gap: 2px;
}

body.player-is-compact .player-track .eyebrow,
body.player-is-compact .now-playing-badge {
    display: none;
}

body.player-is-compact .now-playing-badge.is-live-room {
    display: inline-flex;
}

body.player-is-compact .player-track h2 {
    font-size: 0.98rem;
}

body.player-is-compact .player-track p {
    display: block;
    font-size: 0.78rem;
}

body.player-is-compact .player-controls {
    grid-area: controls;
    gap: 8px;
}

body.player-is-compact .previous-button {
    display: none;
}

body.player-is-compact .icon-button,
body.player-is-compact .queue-toggle-button,
body.player-is-compact .heart-button,
body.player-is-compact .player-size-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 14px;
}

body.player-is-compact .play-button {
    width: 52px;
    height: 52px;
}

body.player-is-compact .player-tools {
    grid-area: tools;
    gap: 7px;
}

@media (max-width: 1180px) {
    :root {
        --player-height: 176px;
    }

    .global-player {
        bottom: 14px;
        grid-template-columns: minmax(230px, 1fr) auto;
        grid-template-areas:
            "track controls"
            "tools tools"
            "progress progress";
        width: calc(100% - 28px);
        min-height: 0;
        padding: 18px 22px;
        border-radius: 30px;
        gap: 14px 18px;
    }

    .global-player::before {
        border-radius: 29px;
    }

    .global-player::after {
        display: none;
    }

    .player-track {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 14px;
    }

    .track-cover {
        width: 70px;
        border-radius: 17px;
    }

    .player-controls {
        justify-content: end;
        gap: 10px;
    }

    .icon-button {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .global-player .player-controls .icon-button {
        width: 46px;
        height: 46px;
    }

    .play-button,
    .global-player .player-controls .play-button {
        width: 62px;
        height: 62px;
    }

    .player-tools {
        justify-content: center;
        gap: 10px;
    }

    .queue-toggle-button,
    .heart-button,
    .player-size-button {
        width: 46px;
        min-width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .timer-pill {
        min-height: 46px;
        min-width: 132px;
        border-radius: 16px;
    }

    .timer-pill [data-timer-label] {
        font-size: 1rem;
    }

    .volume-control {
        min-width: 132px;
    }
}

@media (max-width: 820px) {
    :root {
        --player-height: 94px;
    }

    body:not(.player-is-compact) .global-player {
        bottom: 8px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "track"
            "controls"
            "tools"
            "progress";
        width: calc(100% - 16px);
        max-height: min(56vh, 520px);
        padding: 14px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body:not(.player-is-compact) .player-track,
    body:not(.player-is-compact) .player-controls,
    body:not(.player-is-compact) .player-tools,
    body:not(.player-is-compact) .player-progress {
        grid-column: auto;
        grid-row: auto;
    }

    body:not(.player-is-compact) .player-controls,
    body:not(.player-is-compact) .player-tools {
        justify-content: center;
    }

    body:not(.player-is-compact) .player-tools {
        flex-wrap: wrap;
    }

    body:not(.player-is-compact) .player-queue-panel,
    body:not(.player-is-compact) .player-save-panel {
        position: static;
        width: 100%;
        max-height: min(34vh, 320px);
    }

    body.player-is-compact {
        --player-height: 84px;
    }

    body.player-is-compact .global-player {
        bottom: 8px;
        width: calc(100% - 16px);
        min-height: 66px;
        padding: 7px 9px;
        border-radius: 20px;
    }

    body.player-is-compact .global-player::before {
        border-radius: 19px;
    }

    body.player-is-compact .player-track {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
    }

    body.player-is-compact .track-cover {
        width: 42px;
    }

    body.player-is-compact .player-track p {
        display: none;
    }

    body.player-is-compact .icon-button,
    body.player-is-compact .queue-toggle-button,
    body.player-is-compact .heart-button,
    body.player-is-compact .player-size-button {
        width: 36px;
        min-width: 36px;
        height: 36px;
    }

    body.player-is-compact .global-player .player-controls .icon-button {
        width: 36px;
        height: 36px;
    }

    body.player-is-compact .play-button,
    body.player-is-compact .global-player .player-controls .play-button {
        width: 46px;
        height: 46px;
    }
}

