/* ====== Base Styles ====== */
:root {
    --spotify-green: #1DB954;  /* From your icon */
    --spotify-dark: #000000;   /* Black background */
    --spotify-gray: #121212;   /* Dark gray for sections */
    --spotify-light-gray: #1f1f1f;
    --spotify-text-gray: #B3B3B3;
}


body {
    background-color: black;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

/* ====== Navigation ====== */
nav {
    margin: 5px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-left ul,
.nav-right ul {
    list-style: none;
    display: flex;
    padding: 5px;
    margin: 0;
}

.nav-left ul {
    gap: 40px;
}

.nav-left ul li {
    width: 30px;
    cursor: pointer;
}

.nav-right ul {
    gap: 20px;
    font-weight: 700;
    font-size: 16px;
    color: var(--spotify-text-gray);
}

.nav-right ul li a {
    color: inherit;
    text-decoration: none;
}

.icon {
    width: 25px;
    height: 25px;
}

/* ====== Search ====== */
.search {
    margin: 10px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 150px;
    border-radius: 50px;
    background-color: var(--spotify-gray);
    font-weight: 400;
    font-size: 16px;
    min-width: 120px;
    transition: gap 0.3s ease;
}

.search-txt {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.search-brow {
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

/* ====== Buttons ====== */
.login-btn {
    margin: 10px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    border-radius: 50px;
    background-color: white;
    font-weight: 700;
    font-size: 16px;
    color: black;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 44px;
    /* Touch-friendly */
}

.login-btn:hover {
    background-color: var(--spotify-text-gray);
}

/* ====== Layout ====== */
.container {
    display: flex;
}

.body-left {
    margin: 5px;
    border-radius: 10px;
    width: 25vw;
    background-color: var(--spotify-dark);
}

.body-right {
    margin: 5px;
    padding: 10px 40px;
    border-radius: 10px;
    width: 75vw;
    background-color: var(--spotify-gray);
    position: relative;
}

/* ====== Sidebar ====== */
.library {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-weight: 700;
    font-size: 16px;
}

.add {
    font-size: xx-large;
    cursor: pointer;
}

.playlist,
.podcast {
    background-color: var(--spotify-light-gray);
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
}

.playlist p,
.podcast p {
    font-weight: 400;
    font-size: 14px;
}

.btn-white {
    margin: 10px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    border-radius: 50px;
    background-color: white;
    font-weight: 700;
    font-size: 14px;
    color: black;
    cursor: pointer;
    transition: transform 0.2s ease;
    min-height: 44px;
    /* Touch-friendly */
}

.btn-white:hover {
    transform: scale(1.05);
}

/* ====== Footer Links ====== */
.policy {
    font-weight: 400;
    font-size: 11px;
    color: var(--spotify-text-gray);
}

.policy ul {
    padding: 15px;
    padding-bottom: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.policy ul li {
    padding: 5px;
}

.policy ul li a {
    text-decoration: none;
    color: inherit;
}

.cookies {
    font-weight: 400;
    font-size: 12px;
}

.cookies a {
    text-decoration: none;
    color: inherit;
    padding: 15px;
}

.lang {
    padding: 15px;
}

.lang-btn {
    background: transparent;
    color: inherit;
    border: 1px solid white;
    padding: 5px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ====== Cards ====== */
.card-container {
    margin: 30px;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card {
    width: 200px;
    padding-top: 10px;
    border-radius: 10px;
    position: relative;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.02);
}

.card img {
    width: 100%;
    object-fit: contain;
}

.play {
    position: absolute;
    right: 5px;
    bottom: 135px;
}

/* ====== Utility ====== */
.invert {
    filter: invert(1);
}
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--spotify-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--spotify-light-gray);
    z-index: 100;
    box-sizing: border-box;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    max-width: 250px;
    overflow: hidden;
}

.song-info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    overflow: hidden;
}

.song-title,
.song-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    background: var(--spotify-green);
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.control-btn:hover {
    transform: scale(1.15);
    background: #1ed760; /* slightly brighter green */
}


.progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

input[type="range"] {
    accent-color: var(--spotify-green);
}


.player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px; /* fixed so volume doesn't jump */
}

/* ====== Responsive Player ====== */
@media (max-width: 768px) {
    .song-artist {
        display: none;
    }
    .player-left img {
        width: 40px;
        height: 40px;
    }
    .volume-bar {
        width: 60px;
    }
}



/* ====== Scrollbar ====== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--spotify-dark);
}

::-webkit-scrollbar-thumb {
    background-color: #535353;
    border-radius: 10px;
    border: 2px solid var(--spotify-dark);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--spotify-green);
}

/* ====== Responsive ====== */
@media (max-width: 1215px) {
    .search {
        gap: 50px;
    }

    .body-left {

        width: 300px;
    }

    .body-right {
        width: 65vw;
    }
}

@media (max-width: 1120px) {
    .search {
        gap: 5px;
    }
}

@media (max-width: 1070px) {
    .search span {
        display: inline-block;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 950px) {
    .search span {
        display: none;
    }

    .search-brow {
        display: none;
    }
}

@media(max-width:900px) {
    .nav-right ul li:nth-child(-n+4) {
        display: none;
    }


    .body-right {
        width: 600px;
    }
}

@media (max-width: 768px) {
    .search {
        gap: 20px;
    }
}
    

