
.music-player-section {
    padding: var(--section-padding);
    color: var(--text-primary);
}

.music-player-container {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.player-wrapper {
    --audio-energy: 0;
    --audio-bass: 0;
    background: rgba(9, 12, 20, 0.94);
    border-radius: var(--border-radius);
    padding: 0;
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--blur);
    border: 1px solid rgba(233, 185, 73, 0.28);
    box-shadow: var(--shadow-3d);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.player-wrapper::after {
    content: '';
    position: absolute;
    inset: -25% -8%;
    pointer-events: none;
    z-index: 0;
    opacity: calc(0.22 + (var(--audio-energy) * 0.35));
    transform: translate3d(0, 0, 0);
    background:
        radial-gradient(circle at 14% 22%, rgba(247, 216, 136, calc(0.1 + (var(--audio-energy) * 0.16))) 0%, rgba(247, 216, 136, 0) 42%),
        radial-gradient(circle at 84% 74%, rgba(233, 185, 73, calc(0.12 + (var(--audio-bass) * 0.2))) 0%, rgba(233, 185, 73, 0) 48%);
    transition: opacity 0.35s ease;
}

.player-wrapper > * {
    position: relative;
    z-index: 1;
}

.player-wrapper:hover {
    border-color: rgba(233, 185, 73, 0.45);
    box-shadow: var(--shadow-lg);
}

.player-wrapper.is-playing {
    border-color: rgba(233, 185, 73, calc(0.42 + (var(--audio-energy) * 0.38)));
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.36),
        0 0 calc(20px + (var(--audio-energy) * 28px)) rgba(233, 185, 73, calc(0.16 + (var(--audio-energy) * 0.22)));
}

.player-wrapper.is-playing::after {
    animation: player-audio-drift 5.2s ease-in-out infinite alternate;
}

.player-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold, #e9b949), transparent);
    animation: loading 1.5s infinite;
    z-index: 10;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes player-audio-drift {
    from { transform: translate3d(-1.6%, 0.8%, 0); }
    to { transform: translate3d(2.1%, -1.2%, 0); }
}

.visual-display {
    width: 100%;
    height: 132px;
    background:
        radial-gradient(circle at 50% 62%, rgba(130, 95, 24, calc(0.14 + (var(--audio-energy) * 0.16))) 0%, rgba(18, 14, 7, 0.78) 45%, rgba(10, 8, 3, 0.96) 100%),
        linear-gradient(170deg, rgba(12, 10, 4, 0.98) 0%, rgba(8, 7, 2, 0.96) 100%);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.95rem;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(233, 185, 73, 0.26);
    transition: var(--transition-smooth);
    isolation: isolate;
}

html.rc-light .visual-display {
    background:
        radial-gradient(circle at 50% 62%, rgba(233, 185, 73, calc(0.10 + (var(--audio-energy) * 0.12))) 0%, rgba(226, 232, 242, 0.85) 45%, rgba(238, 242, 248, 0.98) 100%),
        linear-gradient(170deg, rgba(244, 247, 251, 0.98) 0%, rgba(228, 234, 243, 0.96) 100%);
    border-color: rgba(161, 98, 7, 0.3);
}

.visual-display::before {
    content: '';
    position: absolute;
    inset: -24%;
    pointer-events: none;
    z-index: 0;
    opacity: calc(0.3 + (var(--audio-energy) * 0.45));
    background:
        radial-gradient(circle at 20% 18%, rgba(247, 216, 136, 0.34) 0%, rgba(247, 216, 136, 0) 36%),
        radial-gradient(circle at 78% 84%, rgba(233, 185, 73, 0.32) 0%, rgba(233, 185, 73, 0) 42%);
    transform: translate3d(0, 0, 0);
    transition: opacity 0.3s ease;
}

.visual-display::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(247, 216, 136, 0.12) 0%, rgba(247, 216, 136, 0) 38%),
        linear-gradient(0deg, rgba(233, 185, 73, 0.2) 0%, rgba(233, 185, 73, 0) 34%);
}

.visual-display:hover {
    border-color: rgba(233, 185, 73, 0.45);
}

.visual-display.mode-video::before,
.visual-display.mode-youtube::before {
    opacity: 0.22;
}

.visual-display.is-playing::before {
    animation: visual-audio-drift 4.3s ease-in-out infinite alternate;
}

@keyframes visual-audio-drift {
    from { transform: translate3d(-2.5%, 1.4%, 0) scale(1); }
    to { transform: translate3d(2.5%, -1.2%, 0) scale(1.03); }
}

.youtube-player-container,
.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--border-radius-sm) - 2px);
    z-index: 3;
}

.youtube-player-container {
    background: #000;
    overflow: hidden;
}

.audio-visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    z-index: 2;
    background: radial-gradient(circle at center, rgba(120, 90, 18, 0.14) 0%, rgba(10, 8, 3, 0.62) 100%);
}

.audio-visualizer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(247, 216, 136, 0.04) 0px,
            rgba(247, 216, 136, 0.04) 1px,
            transparent 1px,
            transparent 24px
        ),
        linear-gradient(180deg, rgba(110, 82, 22, 0.2) 0%, rgba(18, 14, 7, 0.55) 100%);
}

.audio-visualizer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22%;
    height: 1px;
    pointer-events: none;
    z-index: 4;
    background: rgba(247, 216, 136, calc(0.14 + (var(--audio-energy) * 0.28)));
    box-shadow: 0 0 14px rgba(247, 216, 136, 0.2);
}

#spectrogram {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    opacity: 0.95;
    mix-blend-mode: screen;
}

.player-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.track-info {
    flex: 1;
}

.track-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--accent-gold, #e9b949);
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    text-shadow: 0 0 18px rgba(233, 185, 73, 0.28);
}

.track-artist {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.media-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(233, 185, 73, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.time-display {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font-secondary);
    font-variant-numeric: tabular-nums;
}

.time-separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.progress-container {
    margin: 0.85rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.progress-bar:hover {
    background: rgba(233, 185, 73, 0.2);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(233, 185, 73, 0.1) 0%, rgba(233, 185, 73, 0.05) 100%);
    border-radius: 3px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-warm);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 0 0 12px rgba(233, 185, 73, 0.35);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--accent-gold, #e9b949);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(233, 185, 73, 0.5);
    opacity: 0;
    transition: var(--transition-fast);
}

.progress-bar:hover .progress-fill::after,
.player-wrapper.is-playing .progress-fill::after {
    opacity: 1;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-bottom: 1rem;
}

.control-btn {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: none;
    transform: translateZ(0);
    box-shadow: none;
    padding: 0;
}

.control-btn:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.control-btn.is-pressed {
    transform: scale(0.93);
    box-shadow: none;
}

.control-btn.is-flash {
    animation: none;
}

@keyframes control-flash {
    from { transform: none; }
    to { transform: none; }
}

.play-pause-btn {
    width: 56px;
    height: 56px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.play-pause-btn:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.player-wrapper.is-playing .play-pause-btn {
    box-shadow: none;
    transform: none;
}

.control-btn-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: none;
    transform: translateZ(0);
    transition: transform 0.1s ease, filter 0.1s ease;
}

.control-btn:hover .control-btn-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 6px rgba(233, 185, 73, 0.4));
}

.control-btn.is-pressed .control-btn-img {
    transform: scale(0.9);
    filter: brightness(0.84) contrast(0.94) saturate(0.9);
}

.control-btn-play {
    width: 42px;
    height: 42px;
}

.play-pause-btn.is-playing .control-btn-play {
    filter: none;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 1rem;
    min-width: 118px;
}

.mute-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(233, 185, 73, 0.4);
    background:
        radial-gradient(circle at 30% 28%, rgba(252, 239, 210, 0.18) 0%, rgba(252, 239, 210, 0) 40%),
        radial-gradient(circle at 68% 74%, rgba(30, 24, 12, 0.78) 0%, rgba(14, 11, 5, 0.96) 70%);
    color: rgba(247, 216, 136, 0.9);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.16),
        inset 0 -4px 6px rgba(0, 0, 0, 0.4),
        0 5px 10px rgba(0, 0, 0, 0.32);
    transition: transform 0.16s ease, box-shadow 0.16s ease, color 0.2s ease, border-color 0.2s ease;
}

.mute-btn:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(233, 185, 73, 0.6);
    color: rgba(248, 219, 140, 1);
}

.mute-btn:active {
    transform: translateY(1px) scale(0.96);
}

.mute-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(233, 185, 73, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.16),
        inset 0 -4px 6px rgba(0, 0, 0, 0.4);
}

.mute-btn.is-muted {
    color: rgba(232, 122, 92, 0.95);
    border-color: rgba(232, 122, 92, 0.5);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -4px 6px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(232, 122, 92, 0.18);
}

.volume-control.is-muted .volume-knob,
.volume-control.is-muted .volume-value {
    opacity: 0.45;
}

.volume-knob {
    --knob-angle: 54deg;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(233, 185, 73, 0.4);
    background:
        radial-gradient(circle at 28% 28%, rgba(252, 239, 210, 0.34) 0%, rgba(252, 239, 210, 0) 32%),
        radial-gradient(circle at 68% 74%, rgba(30, 24, 12, 0.78) 0%, rgba(14, 11, 5, 0.96) 70%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.45),
        0 7px 14px rgba(0, 0, 0, 0.36);
    position: relative;
    cursor: pointer;
    touch-action: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    transform: translateZ(0);
    outline: none;
}

.volume-knob:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.24),
        inset 0 -6px 8px rgba(0, 0, 0, 0.45),
        0 11px 16px rgba(0, 0, 0, 0.4);
}

.volume-knob:focus-visible {
    box-shadow:
        0 0 0 2px rgba(233, 185, 73, 0.7),
        inset 0 2px 3px rgba(255, 255, 255, 0.24),
        inset 0 -6px 8px rgba(0, 0, 0, 0.45),
        0 11px 16px rgba(0, 0, 0, 0.4);
}

.volume-knob.is-grabbing {
    cursor: grabbing;
    transform: translateY(1px) scale(0.98);
}

.volume-knob::after {
    content: '';
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(248, 225, 170, 0.32) 0%, rgba(124, 100, 50, 0.18) 35%, rgba(30, 24, 10, 0.68) 100%);
    border: 1px solid rgba(233, 185, 73, 0.32);
}

.volume-knob-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 19px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 235, 180, 0.98) 0%, rgba(233, 185, 73, 0.96) 100%);
    transform-origin: 50% calc(100% - 2px);
    transform: translate(-50%, -50%) rotate(var(--knob-angle)) translateY(-14px);
    box-shadow: 0 0 7px rgba(233, 185, 73, 0.52);
}

.volume-value {
    min-width: 40px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(247, 216, 136, 0.9);
    text-shadow: 0 0 10px rgba(233, 185, 73, 0.3);
}

.volume-slider-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.playlist {
    border-top: 1px solid var(--border-color);
    padding-top: 0.9rem;
}

.playlist h3 {
    font-size: 0.78rem;
    margin-bottom: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.playlist-items {
    max-height: 224px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 185, 73, 0.3) transparent;
}

.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(233, 185, 73, 0.3);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 185, 73, 0.6);
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.28rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
    position: relative;
}

.playlist-item:hover {
    background: rgba(233, 185, 73, 0.09);
    border-color: rgba(233, 185, 73, 0.25);
}

.playlist-item.active {
    background: rgba(233, 185, 73, 0.1);
    border-color: var(--accent-gold, #e9b949);
    box-shadow: var(--shadow-sm);
}

.playlist-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 235, 180, 0.95) 0%, rgba(233, 185, 73, 0.9) 100%);
    box-shadow: 0 0 8px rgba(233, 185, 73, 0.55);
}

.player-wrapper.is-playing .playlist-item.active {
    border-color: rgba(247, 216, 136, 0.72);
    box-shadow: 0 10px 20px rgba(184, 134, 11, 0.28);
}

.playlist-item.active .song-name {
    color: var(--accent-gold, #e9b949);
}

.play-indicator {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.playlist-item.active .play-indicator {
    color: var(--accent-gold, #e9b949);
}

.song-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-right: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 42px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.media-type-indicator {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius-sm);
    background: var(--border-color);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.media-type-indicator.video {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.media-type-indicator.audio {
    background: rgba(233, 185, 73, 0.2);
    color: var(--accent-gold, #e9b949);
    border: 1px solid rgba(233, 185, 73, 0.3);
}

@media (max-width: 768px) {
    .music-player-container {
        margin: 0;
        padding: 0 12px;
    }

    .player-wrapper {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .visual-display {
        height: 180px;
        margin-bottom: 1.25rem;
        border-radius: 8px;
    }

    .player-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .track-info {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0 12px;
    }

    .track-title {
        font-size: 1.15rem;
        width: 100%;
    }

    .track-artist {
        font-size: 0.85rem;
    }

    .media-type {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    .time-display {
        font-size: 0.85rem;
    }

    .progress-bar {
        height: 8px;
        border-radius: 4px;
    }

    .progress-fill {
        border-radius: 4px;
    }

    .progress-fill::after {
        width: 14px;
        height: 14px;
        top: -3px;
        right: -3px;
        opacity: 1;
    }

    .progress-container {
        margin: 1rem 0 1.25rem;
    }

    .player-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .control-btn {
        width: 52px;
        height: 52px;
    }

    .play-pause-btn {
        width: 56px;
        height: 56px;
    }

    .control-btn-img {
        width: 36px;
        height: 36px;
    }

    .control-btn-play {
        width: 40px;
        height: 40px;
    }

    .sp-transport {
        flex-wrap: wrap;
    }

    .volume-control {
        margin-left: 0;
        margin-top: 0;
        justify-content: center;
        width: 100%;
        gap: 0.75rem;
        min-width: unset;
    }

    .volume-knob {
        width: 48px;
        height: 48px;
    }

    .volume-knob-indicator {
        height: 16px;
    }

    .mute-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .volume-value {
        font-size: 11px;
        min-width: 36px;
    }

    .playlist {
        padding-top: 1.25rem;
    }

    .playlist h3 {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }

    .playlist-item {
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.4rem;
        border-radius: 8px;
    }

    .playlist-item:hover {
        transform: translateX(4px);
    }

    .play-indicator {
        width: 24px;
        margin-right: 0.7rem;
        font-size: 0.85rem;
    }

    .song-name {
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }

    .song-duration {
        font-size: 0.8rem;
        min-width: 38px;
    }

    .media-type-indicator {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        margin-left: 0.35rem;
    }
}

@media (max-width: 480px) {
    .music-player-container {
        padding: 0 8px;
    }

    .player-wrapper {
        padding: 1.1rem;
        border-radius: 10px;
    }

    .visual-display {
        height: 150px;
        border-radius: 6px;
        margin-bottom: 1rem;
    }

    .track-title {
        font-size: 1rem;
    }

    .track-artist {
        font-size: 0.8rem;
    }

    .time-display {
        font-size: 0.8rem;
    }

    .time-separator {
        margin: 0 0.3rem;
    }

    .progress-container {
        margin: 0.75rem 0 1rem;
    }

    .control-btn {
        width: 46px;
        height: 46px;
    }

    .play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .control-btn-img {
        width: 30px;
        height: 30px;
    }

    .control-btn-play {
        width: 34px;
        height: 34px;
    }

    .volume-knob {
        width: 42px;
        height: 42px;
    }

    .volume-knob-indicator {
        height: 14px;
    }

    .mute-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .volume-value {
        font-size: 10px;
    }

    .playlist h3 {
        font-size: 0.95rem;
    }

    .playlist-items {
        max-height: 220px;
    }

    .playlist-item {
        padding: 0.65rem 0.75rem;
    }

    .song-name {
        font-size: 0.82rem;
    }

    .play-indicator {
        width: 20px;
        margin-right: 0.6rem;
        font-size: 0.8rem;
    }

    .song-duration {
        font-size: 0.75rem;
        min-width: 34px;
    }

    .media-type-indicator {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player-wrapper.is-playing::after,
    .visual-display.is-playing::before,
    .control-btn.is-flash {
        animation: none !important;
    }
    .player-reveal-icon { animation: none !important; }
    .player-reveal-btn::before { animation: none !important; }
}

.player-reveal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 1.4rem 2rem;
    background: rgba(6, 10, 18, 0.86);
    border: 1px solid rgba(233, 185, 73, 0.3);
    border-radius: var(--border-radius);
    color: var(--accent-gold, #e9b949);
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--blur);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease;
}

.player-reveal-btn::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(233, 185, 73, 0.12) 25%, transparent 50%);
    animation: reveal-border-sweep 4s linear infinite;
    z-index: 0;
}

.player-reveal-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(6, 10, 18, 0.92);
    border-radius: calc(var(--border-radius) - 1px);
    z-index: 0;
}

.player-reveal-btn > * {
    position: relative;
    z-index: 1;
}

.player-reveal-btn:hover {
    border-color: rgba(233, 185, 73, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233, 185, 73, 0.12), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.player-reveal-btn:active {
    transform: translateY(0) scale(0.98);
}

@keyframes reveal-border-sweep {
    to { transform: rotate(360deg); }
}

.player-reveal-icon {
    font-size: 1.5rem;
    animation: reveal-icon-pulse 2.5s ease-in-out infinite;
}

@keyframes reveal-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 1; }
}

.player-reveal-btn.is-hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border-width: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

.player-wrapper.player-collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    transform: translateY(-20px);
    pointer-events: none;
    margin-top: 0;
    transition: none;
}

.player-wrapper.player-collapsed.player-closing {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                transform 0.4s ease,
                padding 0.4s ease,
                border-color 0.3s ease,
                margin 0.4s ease;
}

.player-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
}

.player-close-btn:hover {
    color: var(--accent-gold-light);
    background: rgba(233, 185, 73, 0.12);
    border-color: rgba(233, 185, 73, 0.3);
}

.player-wrapper.player-revealed {
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-color: rgba(233, 185, 73, 0.28);
    transform: translateY(0);
    pointer-events: all;
    margin-top: 1rem;
    transition: max-height 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0, 0, 0.2, 1) 0.05s,
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                padding 0.4s ease,
                border-color 0.5s ease 0.15s,
                margin 0.4s ease;
}

@media (max-width: 768px) {
    .player-reveal-btn {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    .player-wrapper.player-revealed {
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 480px) {
    .player-reveal-btn {
        padding: 1rem;
        font-size: 0.9rem;
        gap: 0.75rem;
    }
    .player-wrapper.player-revealed {
        padding-top: 0;
        padding-bottom: 0;
    }
}

.sp-hero {
    position: relative;
    height: 152px;
    overflow: hidden;
    flex-shrink: 0;
}
.sp-hero .visual-display {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
}
.sp-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 7, 12, 0.2) 0%, rgba(5, 7, 12, 0) 42%, rgba(5, 7, 12, 0.55) 72%, rgba(5, 7, 12, 0.94) 100%);
}
.sp-hero-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sp-eyebrow {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-gold-light);
}
.sp-hero-info .track-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: var(--font-primary);
    letter-spacing: 0.01em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-sub {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sp-sub .track-artist {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}
.sp-sub .media-type {
    font-size: 0.58rem;
    padding: 2px 8px;
    background: var(--gradient-warm);
    color: #10141d;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sp-transport {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.sp-transport .player-controls {
    margin: 0;
    gap: 6px;
    flex-shrink: 0;
}
.sp-transport .progress-container {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}
.sp-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}
.sp-transport .volume-control {
    flex-shrink: 0;
}
.player-wrapper .playlist {
    border-top: none;
    padding: 12px 12px 14px;
}

html.rc-light .player-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%);
    border-color: rgba(233, 185, 73, 0.32);
}
html.rc-light .playlist-item {
    background: rgba(20, 24, 40, 0.03);
}
html.rc-light .player-reveal-btn,
html.rc-light .player-reveal-btn::after {
    background: linear-gradient(180deg, #ffffff 0%, #f1f4f9 100%);
}
html.rc-light .volume-value {
    color: var(--accent-gold-dark);
    text-shadow: none;
}
html.rc-light .mute-btn {
    color: var(--accent-gold-dark);
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 68% 74%, rgba(226, 205, 162, 0.7) 0%, rgba(196, 168, 108, 0.9) 70%);
}
html.rc-light .volume-knob {
    background:
        radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 34%),
        radial-gradient(circle at 68% 74%, rgba(226, 205, 162, 0.7) 0%, rgba(196, 168, 108, 0.9) 70%);
}
html.rc-light .volume-knob::after {
    background: radial-gradient(circle at 40% 35%, rgba(255, 246, 222, 0.95) 0%, rgba(214, 188, 130, 0.55) 35%, rgba(184, 154, 96, 0.5) 100%);
}
html.rc-light .volume-knob-indicator {
    background: linear-gradient(180deg, #a9791a 0%, #7a5600 100%);
    box-shadow: 0 0 5px rgba(122, 86, 0, 0.4);
}
html.rc-light .sp-eyebrow {
    color: #f7d888;
}
html.rc-light .sp-sub .media-type {
    color: #fff;
}

.music-cols {
    max-width: 760px;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .music-cols {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 40px;
        align-items: stretch;
        max-width: 1120px;
    }
    .music-player-container {
        max-width: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    .music-player-section .player-reveal-btn {
        display: none;
    }
    .music-player-section .player-close-btn {
        display: none;
    }
    .music-player-section .player-wrapper.player-revealed {
        margin-top: 0;
        flex: 1 0 auto;
    }
}
