:root {
    --bg: #0d0d0f;
    --surface: #17171b;
    --surface2: #1e1e24;
    --surface3: #26262e;
    --accent: #c8a97e;
    --accent2: #e8c89a;
    --accent-glow: rgba(200, 169, 126, 0.15);
    --text: #f0ebe3;
    --text-muted: #8a8478;
    --text-dim: #504d47;
    --border: rgba(200, 169, 126, 0.12);
    --border-strong: rgba(200, 169, 126, 0.25);
    --track-h: 4px;
    --thumb-size: 14px;
    }

    .page-bg {
        position: fixed;
        inset: 0;
        background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(200,169,126,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 75% 80%, rgba(138,100,60,0.05) 0%, transparent 50%);
        pointer-events: none;
    }

    .player-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    }

    .player {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: 28px;
    padding: 32px 28px 28px;
    overflow: hidden;
    position: relative;
    }

    .player::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
    }

    /* Album Art */
    .artwork-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--surface2);
    }

    .artwork-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s;
    }

    .artwork-wrap img.changing {
    transform: scale(0.96);
    opacity: 0;
    }

    .artwork-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,13,15,0.6) 0%, transparent 50%);
    pointer-events: none;
    }

    .now-playing-badge {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(13,13,15,0.7);
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--border-strong);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
    }

    .now-playing-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.4s ease-in-out infinite;
    }

    @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
    }

    .paused .dot { animation: none; opacity: 0.3; }

    /* Track info */
    .track-info {
        margin-bottom: 24px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }

    .track-text { flex: 1; }

    .track-title {
        font-size: 20px;
        font-weight: 600;
        color: var(--text);
        line-height: 1.2;
        margin-bottom: 6px;
        transition: opacity 0.3s;
    }

    .track-subtitle {
        font-size: 13px;
        font-weight: 400;
        color: var(--text-muted);
        letter-spacing: 0.02em;
        transition: opacity 0.3s;
    }

    .fav-btn {
        background: none;
        border: 0.5px solid var(--border);
        border-radius: 50%;
        width: 38px; height: 38px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        color: var(--text-dim);
        transition: all 0.2s;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .fav-btn:hover { border-color: var(--accent); color: var(--accent); }
    .fav-btn.active { color: #fff; border-color: green; background: green; }

    .fav-btn svg { width: 16px; height: 16px; }

    /* Progress bar */
    .progress-section { margin-bottom: 24px; }

    .progress-container {
        position: relative;
        height: 28px;
        display: flex;
        align-items: center;
        cursor: pointer;
        touch-action: none;
        margin-bottom: 8px;
        background-color: unset !important;
    }

    .progress-track {
    position: absolute;
    left: 0; right: 0;
    height: var(--track-h);
    background: var(--surface3);
    border-radius: 2px;
    overflow: visible;
    }

    .progress-buffer {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: var(--surface3);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s linear;
    }

    .progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    width: 0%;
    transition: width 0.05s linear;
    }

    .progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: var(--accent2);
    box-shadow: 0 0 0 3px rgba(232,200,154,0.2);
    left: 0%;
    transition: transform 0.15s, box-shadow 0.15s, width 0.15s, height 0.15s;
    pointer-events: none;
    }

    .progress-container:hover .progress-thumb,
    .progress-container.dragging .progress-thumb {
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 0 0 5px rgba(232,200,154,0.15);
    }

    .time-row {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: var(--text-dim);
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.03em;
    }

    /* Controls */
    .controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 28px;
    }

    .ctrl-btn {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: transform 0.15s, color 0.15s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .ctrl-btn:active { transform: scale(0.88); }

    .btn-skip {
        width: 44px; height: 44px;
        color: var(--text-muted);
    }
    .btn-skip:hover { color: var(--text); }
    .btn-skip svg { width: 22px; height: 22px; }

    .btn-seek {
    width: 40px; height: 40px;
    color: var(--text-muted);
    position: relative;
    }
    .btn-seek:hover { color: var(--text); }
    .btn-seek svg { width: 18px; height: 18px; }

    .seek-label {
    position: absolute;
    font-size: 8px;
    font-weight: 600;
    color: inherit;
    letter-spacing: -0.02em;
    bottom: 7px;
    }

    .btn-play {
    width: 64px; height: 64px;
    background: var(--accent);
    border-radius: 50%;
    color: #0d0d0f;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 rgba(200,169,126,0);
    }

    .btn-play:hover {
    box-shadow: 0 0 0 8px rgba(200,169,126,0.12);
    }

    .btn-play:active { transform: scale(0.92); }

    .btn-play svg { width: 26px; height: 26px; }

    .play-icon, .pause-icon { transition: opacity 0.15s; }
    .player.playing .play-icon { display: none; }
    .player:not(.playing) .pause-icon { display: none; }

    /* Volume */
    .volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    }

    .vol-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    padding: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    }
    .vol-btn:hover { color: var(--accent); }
    .vol-btn svg { width: 18px; height: 18px; display: block; }

    .volume-track-wrap {
    flex: 1;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
    }

    .volume-track {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: var(--surface3);
    border-radius: 2px;
    }

    .volume-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    width: 75%;
    }

    .volume-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent2);
    left: 75%;
    pointer-events: none;
    transition: transform 0.15s;
    }

    .volume-track-wrap:hover .volume-thumb { transform: translate(-50%, -50%) scale(1.3); }

    .vol-pct {
    font-size: 11px;
    color: var(--text-dim);
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    }

    /* Playlist dots */
    .playlist-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    }

    .dot-indicator {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--surface3);
    border: 0.5px solid var(--border);
    transition: all 0.25s;
    cursor: pointer;
    }

    .dot-indicator.active {
    width: 18px;
    border-radius: 3px;
    background: var(--accent);
    border-color: var(--accent);
    }

    /* Waveform viz */
    .waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    margin-top: 6px;
    }

    .wave-bar {
    flex: 1;
    border-radius: 1px;
    background: var(--surface3);
    transition: height 0.1s, background 0.3s;
    min-width: 2px;
    }

    .wave-bar.active {
    background: var(--accent);
    opacity: 0.6;
    }

    /* Responsive */
    @media (max-width: 480px) {
        .player { padding: 24px 20px 22px; border-radius: 22px; }
        .track-title { font-size: 17px; }
        .btn-play { width: 58px; height: 58px; }
    }
