/* ===========================
   1. Reset
=========================== */

*,
*::before,
*::after{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

html{

    width:100%;

    height:100%;

    scroll-behavior:smooth;

}

body{

    min-height:100vh;

    -webkit-font-smoothing:antialiased;

    -moz-osx-font-smoothing:grayscale;

}

img,
picture,
video,
canvas,
svg{

    display:block;

    max-width:100%;

}

input,
button,
textarea,
select{

    font:inherit;

}

button{

    border:none;

    background:none;

    cursor:pointer;

}

a{

    color:inherit;

    text-decoration:none;

}

ul,
ol{

    list-style:none;

}

/* ===========================
   2. Body
=========================== */

body{

    min-height:100vh;

    font-family:"Poppins",sans-serif;

    background:
    linear-gradient(
        135deg,
        #4d2cff,
        #141414,
        #040404
    );

    color:#fff;

    margin:0;

    overflow-x:hidden;
    overflow-y:auto;

    line-height:1.5;

    text-rendering:optimizeLegibility;

    -webkit-font-smoothing:antialiased;

    -moz-osx-font-smoothing:grayscale;

    -webkit-tap-highlight-color:transparent;

}
/* ===========================
   3. Background
=========================== */

.background{

    position:fixed;

    inset:0;

    z-index:-1;

    background-size:cover;

    background-position:center;

    background-repeat:no-repeat;

    background-attachment:fixed;

    opacity:1;

    transition:
        opacity 1s ease;

}
/* ===========================
   Background Overlay
=========================== */

.background::after{

    content:"";

    position:absolute;

    inset:0;

    background:
    linear-gradient(
        rgba(0,0,0,.25),
        rgba(0,0,0,.50)
    );

    backdrop-filter:none;

    -webkit-backdrop-filter:none;

    pointer-events:none;

}


/* ===========================
   High Performance Mode
=========================== */

.background.high-performance::after{

    backdrop-filter:blur(5px);

    -webkit-backdrop-filter:blur(5px);

}

/* ===========================
   Hiệu ứng môi trường theo sự kiện
   (tuyết, lá rơi, hoa, đom đóm, dơi...)
=========================== */

#eventEffects{

    position:fixed;

    inset:0;

    z-index:-1;

    pointer-events:none;

}

/* ===========================
   Hiệu ứng sóng âm nhạc
=========================== */

#soundWave{

    display:block;

    width:100%;

    height:56px;

    margin:14px 0 6px;

    border-radius:12px;

    background:rgba(255,255,255,.04);

    border:1px solid rgba(255,255,255,.06);

}

/* ===========================
   4. Layout
=========================== */

.container{

    display:flex;

    width:100%;

    min-height:100vh;

    overflow:visible;

}

.main{

    flex:1;

    display:flex;

    flex-direction:column;

    min-width:0;

    padding:35px;

    overflow:visible;

}
/* ===========================
   5. Sidebar
=========================== */

.sidebar{

    width:260px;

    flex-shrink:0;

    display:flex;

    flex-direction:column;

    background:
    rgba(255,255,255,.05);

    backdrop-filter:blur(20px);

    -webkit-backdrop-filter:blur(20px);

    border-right:

    1px solid rgba(255,255,255,.08);

    padding:30px;

}


/* ===========================
   Sidebar Navigation
=========================== */

.sidebar nav{

    flex:1;

}


.sidebar ul{

    list-style:none;

}


.sidebar li{

    display:flex;

    align-items:center;

    gap:12px;

    padding:14px 16px;

    margin-bottom:12px;

    border-radius:14px;

    cursor:pointer;

    transition:.3s ease;

}


.sidebar li:hover{

    background:#7c5cff;

    transform:translateX(5px);

}


.sidebar li.active{

    background:#7c5cff;

}
/* ===========================
   6. Logo
=========================== */

.logo{

    display:flex;

    align-items:center;

    gap:12px;

    margin-bottom:40px;

}


/* Logo Image */

.logo img{

    width:56px;

    height:56px;

    object-fit:contain;

    flex-shrink:0;

}


/* Logo Text */

.logo-text{

    display:flex;

    flex-direction:column;

}


/* Title */

.logo-text h2{

    font-size:24px;

    font-weight:700;

    line-height:1.2;

}


/* Subtitle */

.logo-text span{

    color:#9e8cff;

    font-size:14px;

}
/* ===========================
   7. Navbar
=========================== */

.navbar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    margin-bottom:35px;

}


/* ===========================
   Search Box
=========================== */

.search-box{

    width:420px;

    max-width:100%;

}


.search-box input{

    width:100%;

    padding:15px 20px;

    border:none;

    outline:none;

    border-radius:40px;

    background:#222;

    color:#fff;

    font-size:15px;

    transition:.3s ease;

}


.search-box input::placeholder{

    color:#aaa;

}


.search-box input:focus{

    background:#303030;

    box-shadow:

    0 0 20px rgba(124,92,255,.4);

}


/* ===========================
   User
=========================== */

.user{

    display:flex;

    align-items:center;

    gap:10px;

}


.avatar{

    width:45px;

    height:45px;

    border-radius:50%;

    background:#7c5cff;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:20px;

    flex-shrink:0;

}


.user span{

    font-weight:600;

}
/* ===========================
   8. Player
=========================== */

.player{

    flex:1;

    display:flex;

    justify-content:center;

    align-items:center;

    gap:80px;

}


/* ===========================
   Album Cover
=========================== */

.cover{

    width:380px;

    aspect-ratio:1 / 1;

    border-radius:30px;

    overflow:hidden;

    flex-shrink:0;

    box-shadow:

    0 25px 60px rgba(0,0,0,.5);

}


.cover img{

    width:100%;

    height:100%;

    display:block;

    object-fit:cover;

    transition:.5s ease;

}


.cover:hover img{

    transform:scale(1.08);

}


/* ===========================
   Song Info
=========================== */

.info{

    max-width:500px;

}


.info h1{

    font-size:52px;

    font-weight:700;

    margin-bottom:15px;

    line-height:1.2;

}


.info p{

    font-size:22px;

    color:#bdbdbd;

}
/* ===========================
   9. Scrollbar
=========================== */

::-webkit-scrollbar{

    width:8px;

    height:8px;

}


::-webkit-scrollbar-track{

    background:rgba(255,255,255,.05);

}


::-webkit-scrollbar-thumb{

    background:#7c5cff;

    border-radius:10px;

}


::-webkit-scrollbar-thumb:hover{

    background:#9e8cff;

}

/* ===========================
   Player Controls
=========================== */

.controls{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:20px;

    margin-top:35px;

}


/* Button */

.controls button{

    width:60px;

    height:60px;

    display:flex;

    justify-content:center;

    align-items:center;

    border:none;

    border-radius:50%;

    background:rgba(124,92,255,.85);

    color:#fff;

    font-size:24px;

    cursor:pointer;

    transition:.3s ease;

    box-shadow:
    0 10px 25px rgba(0,0,0,.35);

}


/* Hover */

.controls button:hover{

    transform:scale(1.1);

    background:#9e8cff;

}


/* Click */

.controls button:active{

    transform:scale(.95);

}


/* Play Button */

#playBtn{

    width:75px;

    height:75px;

    font-size:32px;

    background:#7c5cff;

}


/* Previous / Next */

#prevBtn,
#nextBtn{

    font-size:26px;

}


/* Mobile friendly */

.controls button{

    user-select:none;

    -webkit-tap-highlight-color:transparent;

}
.progress-container{

    width:100%;

    max-width:500px;

    display:flex;

    align-items:center;

    gap:10px;

    margin-top:25px;

}


#progress{

    flex:1;

}


.volume-box{

    margin-top:20px;

    display:flex;

    align-items:center;

    gap:10px;

}


#volume{

    width:150px;

}

/* ===========================
   Responsive Mobile / Tablet
=========================== */

@media(max-width:900px){


    body{

        overflow-y:auto;

    }



    .container{

        min-height:auto;

    }



    .main{

        overflow:visible;

    }



    .player{

        flex-direction:column;

        gap:30px;

    }



    .cover{

        width:80vw;

    }



    /* ===========================
       Compact Sidebar
    =========================== */


    .sidebar{

        width:80px;

        padding:20px 10px;

    }



    /* Ẩn chữ Axiom Melodic */

    .logo-text{

        display:none !important;

    }



    .logo{

        justify-content:center;

    }



    /* Ẩn chữ menu */

    .sidebar li span{

        display:none !important;

    }



    /* Chỉ giữ icon */

    .sidebar li{

        justify-content:center;

        gap:0;

        padding:14px;

    }



}
/* ===========================
   10. Playlist
=========================== */

.playlist{

    margin-top:40px;

}

.playlist h2{

    font-size:22px;

    margin-bottom:16px;

}

.playlist ul{

    list-style:none;

    display:flex;

    flex-direction:column;

    gap:8px;

}

.playlist li{

    display:flex;

    align-items:center;

    gap:14px;

    padding:10px 14px;

    border-radius:12px;

    cursor:pointer;

    transition:background .2s ease;

}

.playlist li:hover{

    background:rgba(255,255,255,.06);

}

.playlist li.active-song{

    background:rgba(124,92,255,.18);

}

.playlist li img{

    width:48px;

    height:48px;

    border-radius:8px;

    object-fit:cover;

    flex-shrink:0;

}

.playlist li div{

    flex:1;

    min-width:0;

}

.playlist li h3{

    font-size:15px;

    font-weight:500;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.playlist li p{

    font-size:13px;

    color:#bdbdbd;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.playlist li .fav-btn{

    background:none;

    border:none;

    font-size:18px;

    cursor:pointer;

    flex-shrink:0;

    opacity:.7;

    transition:opacity .2s ease, transform .2s ease;

}

.playlist li .fav-btn:hover{

    opacity:1;

    transform:scale(1.15);

}

.playlist li .fav-btn.active{

    opacity:1;

}

.playlist li.empty-state{

    justify-content:center;

    color:#bdbdbd;

    cursor:default;

    padding:30px 14px;

}

.playlist li.empty-state:hover{

    background:none;

}

/* ===========================
   11. View Counter
=========================== */

.view-counter{

    display:flex;

    align-items:center;

    gap:6px;

    font-size:14px;

    color:#bdbdbd;

    background:rgba(255,255,255,.05);

    padding:8px 14px;

    border-radius:20px;

}

.view-counter span{

    color:#fff;

    font-weight:600;

}
