.global-player {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(300px, 360px) minmax(380px, 0.95fr);
    grid-template-rows: auto auto;
    gap: 14px clamp(12px, 1.2vw, 22px);
    align-items: center;
    width: min(1540px, calc(100% - 48px));
    min-height: 138px;
    padding: 20px 28px 22px;
    transform: translateX(-50%);
    border: 1px solid rgba(88, 213, 246, 0.78);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(6, 11, 28, 0.9), rgba(4, 7, 19, 0.96)),
        radial-gradient(circle at 12% 12%, rgba(88, 213, 246, 0.16), transparent 34%),
        radial-gradient(circle at 92% 88%, rgba(179, 64, 255, 0.18), transparent 34%);
    box-shadow:
        0 0 0 1px rgba(179, 64, 255, 0.28),
        0 0 26px rgba(88, 213, 246, 0.28),
        0 0 42px rgba(179, 64, 255, 0.26),
        0 26px 82px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(22px);
}

.global-player::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 17px;
    background:
        linear-gradient(90deg, rgba(88, 213, 246, 0.1), transparent 32%, rgba(123, 110, 246, 0.1)),
        rgba(3, 6, 17, 0.54);
}

.player-track {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-width: 0;
}

.player-track-link {
    color: inherit;
    text-decoration: none;
}

.player-track-link:not(.is-disabled) {
    cursor: pointer;
}

.player-track-link.is-disabled {
    pointer-events: none;
}

.player-track-link:focus-visible {
    outline: 2px solid var(--neon-primary, var(--cyan));
    outline-offset: 5px;
    border-radius: 16px;
}

.player-track-link:not(.is-disabled):hover .track-cover {
    border-color: var(--neon-primary, var(--cyan));
}

.track-cover {
    width: 98px;
    aspect-ratio: 1;
    border: 1px solid rgba(88, 213, 246, 0.42);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(5, 7, 13, 0.04), rgba(5, 7, 13, 0.42)),
        url("../images/background.webp") center / cover;
    box-shadow:
        inset 0 0 24px rgba(88, 213, 246, 0.16),
        0 0 26px rgba(88, 213, 246, 0.14);
}

.player-track-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.player-track h2 {
    overflow: hidden;
    margin: 0;
    font-size: clamp(1rem, 1.45vw, 1.34rem);
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-track p {
    overflow: hidden;
    margin: 0;
    color: var(--cyan);
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-playing-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    padding: 0 11px;
    border: 1px solid rgba(123, 110, 246, 0.48);
    border-radius: 9px;
    background: rgba(40, 31, 93, 0.45);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 760;
    box-shadow: inset 0 0 16px rgba(88, 213, 246, 0.08);
}

.now-playing-badge span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(88, 213, 246, 0.88);
}

.now-playing-badge.is-live-room {
    border-color: rgb(var(--neon-secondary-rgb) / 0.58);
    background:
        linear-gradient(135deg, var(--neon-soft), var(--neon-secondary-soft)),
        rgba(47, 29, 86, 0.72);
    color: #fff;
    box-shadow:
        inset 0 0 16px rgb(var(--neon-primary-rgb) / 0.12),
        0 0 22px rgb(var(--neon-secondary-rgb) / 0.2);
}

.now-playing-badge.is-live-room span {
    background: var(--neon-secondary);
    box-shadow: 0 0 14px rgb(var(--neon-secondary-rgb) / 0.88);
    animation: live-room-pulse 1.5s ease-in-out infinite;
}

@keyframes live-room-pulse {
    0%,
    100% {
        opacity: 0.72;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

.icon-button,
.queue-toggle-button,
.timer-pill {
    border: 1px solid rgba(167, 184, 218, 0.16);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.icon-button:hover:not(:disabled),
.queue-toggle-button:hover,
.timer-pill:hover {
    border-color: rgba(88, 213, 246, 0.42);
    background: rgba(88, 213, 246, 0.1);
    transform: translateY(-1px);
}

.player-controls {
    min-width: 0;
    justify-content: center;
    gap: clamp(8px, 0.9vw, 14px);
}

.play-button {
    width: 70px;
    height: 70px;
    border-color: rgba(123, 110, 246, 0.76);
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(88, 213, 246, 0.1) 38%, rgba(123, 110, 246, 0.22));
    box-shadow:
        inset 0 0 24px rgba(255, 255, 255, 0.08),
        0 0 0 5px rgba(88, 213, 246, 0.14),
        0 0 28px rgba(88, 213, 246, 0.42),
        0 0 44px rgba(179, 64, 255, 0.38);
}

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

.play-symbol {
    display: block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid var(--text);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.42));
}

.is-playing .play-symbol {
    width: 22px;
    height: 28px;
    margin-left: 0;
    border: 0;
    background: linear-gradient(90deg, var(--text) 0 34%, transparent 34% 66%, var(--text) 66% 100%);
    border-radius: 2px;
}

.previous-button span,
.next-button span {
    display: block;
    width: 15px;
    height: 15px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.previous-button span {
    transform: rotate(-45deg);
}

.next-button span {
    transform: rotate(135deg);
}

.loop-button img {
    width: 24px;
    height: 14px;
    opacity: 0.78;
    transition:
        opacity 160ms ease,
        filter 160ms ease,
        transform 160ms ease;
}

.loop-button.is-active {
    border-color: rgba(88, 213, 246, 0.42);
    background: rgba(88, 213, 246, 0.08);
    color: var(--cyan);
    box-shadow: inset 0 0 18px rgba(88, 213, 246, 0.08);
}

.loop-button.is-active img {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(88, 213, 246, 0.48));
}

.loop-button:hover:not(:disabled) img {
    transform: scale(1.04);
}

.player-tools {
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: end;
    gap: 8px;
    padding-left: 0;
    border-left: 0;
}

.queue-toggle-button,
.timer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 760;
}

.queue-toggle-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
}

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

.queue-toggle-button.is-active {
    border-color: rgba(123, 110, 246, 0.58);
    background: rgba(123, 110, 246, 0.14);
    box-shadow: 0 0 18px rgba(123, 110, 246, 0.18);
}

.queue-icon {
    display: grid;
    gap: 4px;
    width: 18px;
}

.queue-icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -5px 0 0 -1px currentColor;
}

.taste-mix-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
}

.taste-mix-icon span {
    position: absolute;
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 12px rgba(var(--neon-primary-rgb), 0.54);
}

.taste-mix-icon span:nth-child(1) {
    transform: translate(-7px, 5px);
}

.taste-mix-icon span:nth-child(2) {
    width: 7px;
    height: 7px;
    transform: translate(0, -6px);
}

.taste-mix-icon span:nth-child(3) {
    transform: translate(8px, 4px);
}

.taste-mix-button.is-active,
.taste-mix-button:hover:not(:disabled) {
    border-color: rgba(var(--neon-primary-rgb), 0.52);
    background: var(--neon-soft);
    box-shadow: 0 0 20px rgba(var(--neon-primary-rgb), 0.18);
}

.taste-mix-button span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taste-mix-button:disabled {
    cursor: wait;
}

.volume-control {
    display: grid;
    grid-template-columns: auto minmax(82px, 126px);
    align-items: center;
    gap: 10px;
    min-width: 132px;
}

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

.volume-icon {
    width: 22px;
    height: 22px;
    color: var(--text);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.volume-control input {
    min-height: 32px;
    padding: 0;
    accent-color: var(--violet);
}

.timer-pill {
    min-width: 88px;
    padding: 0 13px;
}

.timer-pill img {
    display: none;
    width: 24px;
    height: 12px;
}

.timer-pill.is-active {
    border-color: rgba(88, 213, 246, 0.46);
    background: rgba(88, 213, 246, 0.1);
}

.timer-pill.is-infinity img {
    display: block;
}

.player-size-button {
    position: relative;
    flex: 0 0 auto;
    color: var(--cyan);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(88, 213, 246, 0.16), transparent 62%),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 0 14px rgba(88, 213, 246, 0.06),
        0 0 0 rgba(88, 213, 246, 0);
}

.player-size-button:hover:not(:disabled),
.player-size-button:focus-visible {
    border-color: rgba(88, 213, 246, 0.5);
    background:
        radial-gradient(circle at 50% 30%, rgba(88, 213, 246, 0.24), transparent 64%),
        rgba(88, 213, 246, 0.1);
    box-shadow:
        inset 0 0 16px rgba(88, 213, 246, 0.08),
        0 0 18px rgba(88, 213, 246, 0.16);
}

.player-size-button span {
    position: relative;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    overflow: hidden;
    color: var(--cyan);
    font-size: 0;
    line-height: 1;
}

.player-size-button span::before,
.player-size-button span::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 11px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 10px rgba(88, 213, 246, 0.66);
    transform-origin: center;
    transition:
        transform 160ms ease,
        top 160ms ease,
        background-color 160ms ease;
}

.player-size-button span::before {
    left: 1px;
    transform: rotate(42deg);
}

.player-size-button span::after {
    right: 1px;
    transform: rotate(-42deg);
}

body.player-is-compact .player-size-button span::before,
body.player-is-compact .player-size-button span::after {
    top: 7px;
}

body.player-is-compact .player-size-button span::before {
    transform: rotate(-42deg);
}

body.player-is-compact .player-size-button span::after {
    transform: rotate(42deg);
}

.player-progress {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 14px;
    align-items: center;
    color: rgba(240, 243, 251, 0.82);
    font-size: 0.9rem;
}

.progress-rail {
    height: 7px;
    overflow: visible;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.progress-rail span {
    position: relative;
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), #6b8cff 58%, var(--violet));
    box-shadow:
        0 0 18px rgba(88, 213, 246, 0.34),
        0 0 22px rgba(123, 110, 246, 0.24);
}

.progress-rail span::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: #f7f5ff;
    box-shadow:
        0 0 0 4px rgba(123, 110, 246, 0.28),
        0 0 20px rgba(123, 110, 246, 0.78);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.progress-rail:hover span::after {
    transform: translateY(-50%) scale(1.08);
    box-shadow:
        0 0 0 5px rgba(123, 110, 246, 0.3),
        0 0 24px rgba(123, 110, 246, 0.86);
}

.player-seek-locked .progress-rail {
    cursor: default;
}

.player-seek-locked .progress-rail:hover span::after {
    transform: translateY(-50%);
    box-shadow:
        0 0 0 4px rgba(123, 110, 246, 0.28),
        0 0 20px rgba(123, 110, 246, 0.78);
}

.player-notice {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    padding: 9px 12px;
    border: 1px solid rgba(231, 169, 95, 0.36);
    border-radius: var(--radius);
    background: rgba(231, 169, 95, 0.1);
    color: var(--text);
    font-size: 0.9rem;
}

.player-notice a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.player-queue-panel,
.player-save-panel {
    position: absolute;
    right: 22px;
    bottom: calc(100% + 14px);
    width: min(430px, calc(100vw - 32px));
    max-height: min(420px, calc(100vh - var(--player-height) - 70px));
    padding: 16px;
    border: 1px solid var(--neon-line);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(11, 17, 35, 0.98), rgba(5, 8, 22, 0.98)),
        rgba(6, 10, 24, 0.98);
    box-shadow:
        0 0 28px var(--neon-glow),
        0 24px 70px rgba(0, 0, 0, 0.62);
    overflow: hidden;
}

.player-save-panel {
    right: 176px;
    width: min(360px, calc(100vw - 32px));
}

.player-favorite-panel {
    right: 126px;
    width: min(390px, calc(100vw - 32px));
}

.player-queue-panel[hidden],
.player-save-panel[hidden] {
    display: none;
}

.player-queue-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.player-queue-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.queue-close-button {
    width: 34px;
    height: 34px;
}

.queue-close-button span,
.queue-close-button span::after {
    display: block;
    width: 15px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.queue-close-button span {
    transform: rotate(45deg);
}

.queue-close-button span::after {
    content: "";
    transform: rotate(90deg);
}

.player-queue-list {
    display: grid;
    gap: 8px;
    max-height: 318px;
    overflow-y: auto;
    padding-right: 4px;
}

.player-queue-item {
    display: grid;
    grid-template-columns: auto 40px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 11px;
    border: 1px solid rgba(167, 184, 218, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    text-align: left;
}

.player-queue-item:hover,
.player-queue-item:focus-visible,
.player-queue-item.is-active {
    border-color: var(--neon-line);
    background: var(--neon-soft);
}

.player-queue-number,
.player-queue-duration {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.player-queue-art {
    width: 40px;
}

.player-queue-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.player-queue-copy strong,
.player-queue-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-queue-copy small {
    color: var(--muted);
}

.player-queue-empty {
    margin: 0;
}

.heart-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(214, 111, 150, 0.28);
    border-radius: 12px;
    background: rgba(214, 111, 150, 0.08);
    color: var(--text);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.heart-button:hover:not(:disabled),
.heart-button.is-active {
    border-color: rgba(214, 111, 150, 0.58);
    background: rgba(214, 111, 150, 0.14);
    box-shadow: 0 0 20px rgba(214, 111, 150, 0.18);
    transform: translateY(-1px);
}

.heart-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.heart-button span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
}

.heart-button span::before {
    content: "\2665";
    color: currentColor;
    font-size: 1.08rem;
    line-height: 1;
    text-shadow: 0 0 14px rgba(214, 111, 150, 0.44);
}

.taste-dislike-button {
    border-color: rgba(167, 184, 218, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.taste-dislike-button span {
    position: relative;
}

.taste-dislike-button span::before,
.taste-dislike-button span::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 14px rgba(167, 184, 218, 0.28);
}

.taste-dislike-button span::before {
    left: 2px;
    top: 8px;
    width: 14px;
    height: 3px;
    transform: rotate(-18deg);
}

.taste-dislike-button span::after {
    right: 2px;
    top: 3px;
    width: 5px;
    height: 5px;
}

.taste-dislike-button:hover:not(:disabled),
.taste-dislike-button.is-active {
    border-color: rgba(255, 112, 202, 0.48);
    background: rgba(255, 112, 202, 0.1);
    box-shadow: 0 0 18px rgba(255, 112, 202, 0.14);
}

.player-save-form {
    display: grid;
    gap: 12px;
}

.player-save-form label {
    display: grid;
    gap: 7px;
}

.player-save-form label span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.player-save-form select,
.player-save-form input[type="text"] {
    min-height: 42px;
    border-color: rgba(167, 184, 218, 0.18);
    background-color: rgba(255, 255, 255, 0.06);
}

[data-player-save-feedback][data-state="success"],
[data-player-favorite-feedback][data-state="success"] {
    color: var(--mint);
}

[data-player-save-feedback][data-state="pending"],
[data-player-favorite-feedback][data-state="pending"] {
    color: var(--cyan);
}

[data-player-save-feedback][data-state="error"],
[data-player-favorite-feedback][data-state="error"] {
    color: #ff9ab7;
}

.favorite-list-picker {
    display: grid;
    gap: 8px;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 4px;
}

.favorite-list-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 10px;
    border: 1px solid rgba(167, 184, 218, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
}

.favorite-list-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-primary);
}

.favorite-list-option > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.favorite-list-option strong,
.favorite-list-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorite-list-option strong {
    color: var(--text);
    font-size: 0.92rem;
}

.favorite-list-option small {
    color: var(--muted);
    font-size: 0.76rem;
}

.favorite-list-option.is-full {
    border-color: rgba(231, 169, 95, 0.22);
    background: rgba(231, 169, 95, 0.07);
}

@keyframes rainBreathe {
    0%,
    100% {
        opacity: calc(var(--scene-rain-opacity) * 0.48 + var(--audio-level) * 0.035);
    }
    50% {
        opacity: calc(var(--scene-rain-opacity) * 0.68 + var(--audio-level) * 0.055);
    }
}

@keyframes cityBreathe {
    0%,
    100% {
        opacity: 0.48;
    }
    50% {
        opacity: 0.68;
    }
}

@keyframes homeWindowGlowA {
    0%,
    100% {
        opacity: 0.16;
        filter: blur(0.45px) saturate(1) brightness(0.96);
    }
    50% {
        opacity: 0.24;
        filter: blur(0.34px) saturate(1.08) brightness(1.05);
    }
}

@keyframes homeWindowGlowB {
    0%,
    100% {
        opacity: 0.12;
        filter: blur(0.5px) saturate(0.98) brightness(0.94);
    }
    54% {
        opacity: 0.2;
        filter: blur(0.38px) saturate(1.05) brightness(1.03);
    }
}

@keyframes homeWindowGlowC {
    0%,
    100% {
        opacity: 0.08;
        filter: blur(0.55px) saturate(0.96) brightness(0.92);
    }
    46% {
        opacity: 0.15;
        filter: blur(0.42px) saturate(1.04) brightness(1.02);
    }
}

