:root {
    --primary: #ff2d55;
    --primary-glow: rgba(255, 45, 85, 0.35);
    --secondary: #5856d6;
    --bg-dark: #0a0a0f;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --card-bg: rgba(15, 15, 25, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-main);
    position: relative;
}

/* ── Animated background blobs ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    opacity: 0.15;
    top: -80px;
    left: -80px;
    animation: blob1 14s ease-in-out infinite alternate;
}

body::after {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    opacity: 0.12;
    bottom: -60px;
    right: -60px;
    animation: blob2 16s ease-in-out infinite alternate-reverse;
}

@keyframes blob1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(120px, 80px) scale(1.15); }
    100% { transform: translate(60px, 160px) scale(0.95); }
}

@keyframes blob2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-100px, -60px) scale(1.1); }
    100% { transform: translate(-50px, -120px) scale(0.9); }
}

/* ── Container ── */
.container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

/* ── Player card ── */
.music_player {
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 24px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 350px;
    height: 600px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

/* ── Nav ── */
nav {
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    margin-bottom: 22px;
    width: 90%;
}

.nav-title {
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.nav-btn {
    width: 38px;
    height: 38px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 14px;
    transition: all 0.25s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-2px);
}

.nav-btn i {
    pointer-events: none;
}

.nav-btn.active-shuffle {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(255, 45, 85, 0.1);
}

/* ── Album art ── */
.song-img-container {
    width: 170px;
    height: 170px;
    margin: 0 auto 10px;
    position: relative;
    flex-shrink: 0;
}

.vinyl-ring {
    position: absolute;
    inset: -12px;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    transition: border-color 0.5s;
}

.song-img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.6s ease;
}

.song-img.playing {
    transform: scale(1.04);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 40px var(--primary-glow);
}

.song-img.playing ~ .vinyl-ring {
    border-color: var(--primary-glow);
}

/* ── Song info ── */
.song-info h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 15px;
}

/* ── Progress bar ── */
.progress-area {
    margin-bottom: 15px;
    padding: 0 4px;
}

#progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    outline: none;
}

#progress::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 10px;
}

#progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 8px var(--primary-glow);
    cursor: pointer;
    margin-top: -4.5px;
    transition: transform 0.15s ease;
}

#progress::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#progress::-moz-range-thumb {
    height: 14px;
    width: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 8px var(--primary-glow);
    cursor: pointer;
}

.time-stamps {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Controls ── */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.seek-btn {
    font-size: 16px;
    color: var(--text-dim);
    gap: 3px;
}

.seek-label {
    font-size: 10px;
    font-weight: 600;
}

.skip-btn {
    font-size: 22px;
}

.play-pause-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #e01a4f);
    border-radius: 50%;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 8px 25px var(--primary-glow);
    flex-shrink: 0;
}

.play-pause-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 35px var(--primary-glow);
    color: #fff;
}

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

/* ── Volume ── */
.volume-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
}

.volume-area i {
    font-size: 14px;
    color: var(--text-dim);
    width: 18px;
    text-align: center;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.15s;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#volume-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ── Playlist panel ── */
.playlist-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
    padding: 24px 20px;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    z-index: 100;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.playlist-panel.active {
    transform: translateY(0);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
    min-height: 40px;
    position: relative;
    z-index: 200;
}

.playlist-header h3 {
    font-size: 16px;
    font-weight: 600;
}

#close-playlist {
    z-index: 150;
}

.close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    transition: background 0.2s;
    flex-shrink: 0;
    position: relative;
    z-index: 200;
}

.close-btn:hover {
    background: rgba(255,45,85,0.3);
    border-color: var(--primary);
    color: var(--primary);
}

.close-btn i {
    pointer-events: none;
}

.song-count {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 6px;
}

.playlist-list {
    list-style: none;
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    min-height: 0;
}

/* Scrollbar */
.playlist-list::-webkit-scrollbar {
    width: 4px;
}

.playlist-list::-webkit-scrollbar-track {
    background: transparent;
}

.playlist-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.playlist-item.active {
    background: rgba(255, 45, 85, 0.08);
    border-left: 3px solid var(--primary);
}

.playlist-item-number {
    width: 24px;
    font-size: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
    text-align: center;
}

.playlist-item.active .playlist-item-number {
    color: var(--primary);
}

.playlist-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.playlist-item-info {
    overflow: hidden;
}

.playlist-item-info h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-info p {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 460px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    .music_player {
        border-radius: 22px;
        padding: 22px 18px 20px;
    }

    .song-img-container {
        width: 180px;
        height: 180px;
    }

    .song-info h1 {
        font-size: 18px;
    }

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

    .controls {
        gap: 12px;
    }
}
/* TITLE CONTAINER */
.title-container{

    width: 100%;

    height: 10vh;

    overflow: hidden;

    white-space: nowrap;

    margin-top: 20px;

    position: relative;
}


/* MOVING SONG TITLE */
.title-container h1{

    display: inline-block;

    font-size: 32px;

    animation: marquee 10s linear infinite;

    padding-left: 100%;
}


/* MARQUEE ANIMATION */
@keyframes marquee{

    0%{
        transform: translateX(0%);
    }

    100%{
        transform: translateX(-100%);
    }
}
/* EQ BOX BASE */

.eq-box{

    flex: 1;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;
}

.eq-box label{

    font-size: 12px;

    color: rgba(255,255,255,0.7);
}

.eq-box input{

    width: 100%;

    accent-color: #ff2d55;
}
/* SPEED CONTROL */

#speedControl{

    width: 100%;

    padding: 8px 10px;

    border-radius: 10px;

    border: none;

    outline: none;

    background: rgba(255,255,255,0.08);

    color: white;

    font-size: 13px;

    cursor: pointer;

    backdrop-filter: blur(10px);

    transition: 0.3s ease;
}

#speedControl:hover{

    background: rgba(255,255,255,0.14);
}

#speedControl option{

    background: #111;

    color: white;
}          
/* Reset .equalizer settings */
/* RESET BUTTON */

.reset-container{

    width: 100%;

    display: flex;

    justify-content: center;

    margin-top: 18px;
}

#resetBtn{

    padding: 12px 18px;

    border: none;

    outline: none;

    border-radius: 14px;

    background: linear-gradient(
        135deg,
        #ff2d55,
        #ff4b2b
    );

    color: white;

    font-size: 14px;

    font-weight: 600;

    display: flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;

    transition: all 0.3s ease;

    box-shadow:
        0 8px 20px rgba(255,45,85,0.25);
}

#resetBtn:hover{

    transform: translateY(-3px) scale(1.03);

    box-shadow:
        0 12px 25px rgba(255,45,85,0.35);
}

#resetBtn:active{

    transform: scale(0.96);
}

#resetBtn i{

    font-size: 13px;
}

/* PLAYER CONTAINER RESPONSIVE (No Scrollbar) */
.music_player{
    height: 95vh;
    max-height: 850px;
    width: 100%;
    max-width: 380px;
    min-width: 300px;
    justify-content: space-evenly;
    gap: 0;
    overflow: hidden;
    padding: 3vh 24px;
}

.music_player > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* KEEP IMAGE RESPONSIVE */
.song-img{
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 28vh;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    flex-shrink: 1;
}

/* TITLE FIX */
.title-container{
    width: 100%;
    height: clamp(24px, 4vh, 40px);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.title-container h1{
    font-size: clamp(20px, 3.5vh, 28px);
    line-height: clamp(24px, 4vh, 40px);
    display: inline-block;
    padding-left: 100%;
    animation: marquee 10s linear infinite;
}

/* EQUALIZER GRID */
.equalizer{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1vh 12px;
}

@media (max-width: 380px) {
    .equalizer {
        grid-template-columns: 1fr;
    }
    .eq-box:last-child {
        grid-column: span 1;
    }
}

/* EQ BOX */
.eq-box{
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1vh 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5vh;
}

/* LAST BOX FULL WIDTH */
.eq-box:last-child{
    grid-column: span 2;
}

/* RESET BUTTON ALIGN */
.reset-container{
    margin-top: 0;
}
