/* -------------------------------------------------
   GLOBAL RESET + BASICS
-------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, sans-serif;
}

body {
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 20px; }

/* -------------------------------------------------
   HEADER
-------------------------------------------------- */
.header {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 2000;
    background: #000;
    transition: 0.2s ease;
}

.header-blur {
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(12px);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-center { flex: 1; }

.logo {
    width: 32px;
    height: 32px;
}

.logo.small {
    width: 26px;
    height: 26px;
}

.home-icon {
    width: 26px;
    height: 26px;
}

/* ICON BUTTONS */
.icon-btn {
    background: #181818;
    border-radius: 999px;
    border: none;
    width: 32px;
    height: 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.nav-btn { background: #101010; }

/* Search bar */
.search {
    width: 100%;
    padding: 10px 16px;
    background: #1f1f1f;
    border-radius: 999px;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

/* BUTTONS */
.premium-btn {
    padding: 7px 16px;
    border-radius: 999px;
    border: none;
    background: #1db954;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.ghost-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
}

.solid-btn {
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    border: none;
    color: #000;
    font-size: 14px;
    cursor: pointer;
}
.solid-btn.small { padding: 4px 10px; font-size: 12px; }

.logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
}

.premium-badge {
    font-size: 12px;
    color: #1db954;
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 3px;
    width: 32px;
    height: 32px;
    padding: 6px;
}
.hamburger span {
    flex: 1;
    background: #fff;
    border-radius: 999px;
}

/* -------------------------------------------------
   MAIN LAYOUT
-------------------------------------------------- */
.layout {
    display: flex;
    gap: 10px;
    padding: 10px;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: #121212;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.your {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
}

.add {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.scroll {
    background: #181818;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
}

.playlist-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 13px;
}

.spacer { height: 16px; }

.agreement {
    font-size: 11px;
    color: #b3b3b3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.agreement a {
    color: #b3b3b3;
    text-decoration: none;
}

.language button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #181818;
    border-radius: 999px;
    border: 1px solid #555;
    padding: 5px 12px;
    font-size: 13px;
    color: #fff;
}
.language img { width: 18px; }

/* -------------------------------------------------
   CONTENT
-------------------------------------------------- */
.content {
    flex: 1;
    background: #121212;
    border-radius: 12px;
    padding: 18px;
}

.section { margin-bottom: 30px; }
.section h2 { margin-bottom: 16px; }

.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

/* -------------------------------------------------
   SONG CARD + HOVER PLAY + MORE BUTTON
-------------------------------------------------- */
.song-card {
    width: 160px;
    background: #181818;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    transform: scale(1.05);
    background: #242424;
}

/* Thumbnail */
.song-thumb {
    width: 100%;
    height: 150px;
    position: relative;
}

.song-cover {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    transition: 0.25s;
}

.song-card:hover .song-cover {
    filter: brightness(0.7);
}

/* PLAY BUTTON ON HOVER */
.hover-play-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1db954;
    color: white;
    font-size: 22px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s ease;
    cursor: pointer;
    z-index: 15;
}

.song-card:hover .hover-play-btn {
    opacity: 1;
    transform: translateY(0px);
}

.hover-play-btn:hover {
    background: #1ed760;
}

/* MORE (⋮) BUTTON TOP RIGHT */
.more-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: 0.2s ease;
    z-index: 20;
}

.song-card:hover .more-btn {
    opacity: 1;
}

/* MORE MENU */
.more-menu {
    position: absolute;
    top: 40px;
    right: 6px;
    width: 160px;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 30;
}

.more-menu p {
    margin: 0;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    transition: 0.15s;
}

.more-menu p:hover {
    background: #333;
}

/* SONG TEXT */
.song-card p { margin-top: 6px; text-align: center; }
.song-card .small { font-size: 12px; color: #b3b3b3; }

/* -------------------------------------------------
   MINI PLAYER
-------------------------------------------------- */
.mini-player {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    background: #181818;
    border-top: 1px solid #333;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 3000;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.player-cover {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
}

.info h4 { font-size: 14px; }
.info p { font-size: 12px; color: #b3b3b3; }

.controls-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* MODERN ROUND PLAYER BUTTONS */
.controls-main button,
.controls-side button,
.fs-controls button {
    background: #222;
    border-radius: 50%;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.controls-main button:hover,
.controls-side button:hover,
.fs-controls button:hover {
    background: #303030;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(255,255,255,0.08);
}

/* PRIMARY PLAY BUTTON (mini + fullscreen) */
#playBtn,
#fsPlayBtn {
    background: #1db954;
    color: #000;
    font-size: 22px;
    width: 46px;
    height: 46px;
}

#playBtn:hover,
#fsPlayBtn:hover {
    background: #1ed760;
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(29,185,84,0.5);
}

#seekBar { flex: 1; }

.controls-side {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
}

/* MINI PLAYER STATES (for animations from JS) */
.mini-player.playing {
    box-shadow: 0 -4px 25px rgba(29,185,84,0.2);
}

.mini-player.seeking {
    border-top-color: #1db954;
}

.mini-player.seek-focus #seekBar {
    box-shadow: 0 0 10px rgba(29,185,84,0.45);
}

/* -------------------------------------------------
   SEEK BARS (mini + fullscreen)
-------------------------------------------------- */

/* base style */
#seekBar,
#fsSeekBar {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: #404040;
    outline: none;
    cursor: pointer;
}

/* WebKit track */
#seekBar::-webkit-slider-runnable-track,
#fsSeekBar::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: #404040;
}

/* WebKit thumb */
#seekBar::-webkit-slider-thumb,
#fsSeekBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1db954;
    margin-top: -4px;
}

/* Firefox */
#seekBar::-moz-range-track,
#fsSeekBar::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #404040;
}

#seekBar::-moz-range-thumb,
#fsSeekBar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1db954;
    border: none;
}

/* hover glow */
#seekBar:hover,
#fsSeekBar:hover {
    box-shadow: 0 0 8px rgba(255,255,255,0.35);
}

/* -------------------------------------------------
   FULLSCREEN PLAYER
-------------------------------------------------- */
.fullscreen-player {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #333, #000);
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    z-index: 4000;
    transition: background 0.25s ease;
}

.close-fs {
    position: absolute;
    top: 16px;
    right: 16px;
}

.fullscreen-cover {
    width: 320px;
    height: 320px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.fs-title {
    margin-top: 18px;
    font-size: 22px;
}

.fs-artist {
    color: #b3b3b3;
    margin-bottom: 18px;
    font-size: 14px;
}

.fs-seek { width: 80%; }

.fs-controls {
    margin-top: 16px;
    display: flex;
    gap: 18px;
}

/* -------------------------------------------------
   MOBILE MENU
-------------------------------------------------- */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 3500;
}

.mobile-menu.open { display: block; }

.mobile-menu-inner {
    width: 260px;
    height: 100%;
    background: #121212;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-link {
    background: none;
    border: none;
    text-align: left;
    color: #fff;
    font-size: 15px;
    padding: 8px 0;
    cursor: pointer;
}

/* -------------------------------------------------
   POPUP (Playlist)
-------------------------------------------------- */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3600;
}

.popup-content {
    background: #181818;
    padding: 22px;
    border-radius: 12px;
    width: 280px;
    text-align: center;
}

.popup-content input {
    width: 100%;
    margin-top: 12px;
    padding: 9px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: #333;
    color: #fff;
}

.popup-content button {
    margin-top: 12px;
    width: 100%;
    padding: 9px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

#createPlaylistBtn { background: #1db954; color: #000; }
.close-btn { background: #444; color: #fff; }

/* -------------------------------------------------
   MINI PLAYER TIMER ROW
-------------------------------------------------- */
.time-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #b3b3b3;
    padding: 0 4px;
    margin-top: -4px;
}

/* -------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

/* TABLET */
@media (max-width: 992px) {
    .sidebar { width: 210px; }
    .mini-player { left: 220px; }
}

/* MOBILE */
@media (max-width: 768px) {

    .layout {
        flex-direction: column;
        padding-bottom: 120px;
    }

    .sidebar { display: none; }

    .mini-player {
        left: 0;
        flex-wrap: wrap;
    }

    #seekBar { width: 100%; }

    .card-row .song-card { width: 45%; }

    .hamburger { display: flex; }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
    .card-row .song-card { width: 100%; }

    .mini-player {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
/* Favourite Heart Button */
.fav-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    color: #bbb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
    opacity: 0;
    z-index: 12;
}

.song-card:hover .fav-btn {
    opacity: 1;
}

.fav-btn.active {
    color: #ee1d40;
    text-shadow: 0 0 12px rgba(255,60,90,0.8);
}

/* POP animation */
.fav-btn.pop {
    transform: scale(1.4);
    transition: transform 0.15s ease;
}

/* Glow effect */
.fav-btn.active {
    filter: drop-shadow(0 0 6px rgba(255,0,80,0.9));
}
.suggest-box {
    position: absolute;
    top: 60px;
    width: 100%;
    background: #181818;
    border-radius: 8px;
    padding: 10px;
    display: none;
    z-index: 100;
}

.suggest-item {
    padding: 10px;
    color: white;
    cursor: pointer;
    border-bottom: 1px solid #222;
}

.suggest-item:hover {
    background: #282828;
}
