:root {
    --a: 0;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'roboto', sans-serif;
}

body {
    background-color: black;
    color: black;
}

.logo {
    gap: 5px;
    padding-left: 0px;
    cursor: pointer;
    transition: all 0.2s ease;

}

.logo:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.hamburger {
    display: none;
}

.hamburgercontainer {
    justify-content: center;
    align-items: center;
    gap: 14px;
    display: flex;
}

.left {
    width: 25vw;
    padding: 10px;

}

.right {
    width: 75vw;
    margin: 16px 0;
    position: relative;
}




.home ul li {
    width: 100%;
    list-style: none;
    display: flex;
    gap: 15px;
    padding-top: 14px;
    font-weight: bold;

}

.navbtn {
    border: none;
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.navbtn img {
    width: 16px;
    height: 16px;
}

.navbtn:hover {
    color: #1fdf64;
    transform: translateX(2px);
}

.top-controls {
    margin: 0 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-wrap {
    display: flex;
    gap: 10px;
}

.search-wrap input {
    flex: 1;
    border-radius: 20px;
    border: 1px solid #555;
    background-color: #1a1a1a;
    color: #fff;
    padding: 10px 12px;
}

.library-actions {
    padding: 0 12px 12px;
}

.playlist-actions {
    margin: 0;
    padding: 4px 0 6px;
    display: flex;
    justify-content: flex-start;
    position: relative;
    z-index: 3;
}

.actionbtn {
    border: none;
    border-radius: 16px;
    background: #1fdf64;
    color: #111;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.actionbtn.secondary {
    background: #333;
    color: #fff;
}

.actionbtn.small {
    padding: 6px 10px;
    font-size: 12px;
}

.actionbtn.danger {
    background: #c53030;
    color: #fff;
}

.actionbtn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.actionbtn:active,
.toggle-btn:active,
.songbuttons img:active,
.card:active {
    transform: scale(0.98);
}

.list-actions,
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.active-playlist {
    outline: 2px solid #1fdf64;
    box-shadow: 0 0 0 2px rgba(31, 223, 100, 0.2);
}

.toggle-btn {
    border: none;
    border-radius: 14px;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.25s ease;
}

.toggle-btn.active {
    background: #1fdf64;
    color: #111;
}

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.auth-gate {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #111 0%, #050505 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    z-index: 30;
}

.auth-panel {
    width: min(92vw, 400px);
    background: #1f1f1f;
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.gate-panel {
    width: min(92vw, 460px);
}

.auth-subtitle {
    margin: 6px 0 14px;
    color: #b3b3b3;
}

.auth-panel form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-panel input {
    border: 1px solid #444;
    border-radius: 8px;
    background: #111;
    color: #fff;
    padding: 8px;
}

.playlist-preview-wrap {
    margin-top: 8px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #101010;
    padding: 8px;
    display: flex;
    justify-content: center;
}

.playlist-preview-wrap img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.auth-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.hidden {
    display: none !important;
}

.heading {
    display: flex;
    gap: 15px;
    padding-top: 14px;
    padding: 23px 14px;
    font-size: 13px;
    font-weight: bold;
    align-items: center
}

.heading img {
    width: 30px;
}

.library {
    min-height: 80vh;
    position: relative;
}

.footer {
    display: flex;
    font-size: 10px;
    color: grey;
    gap: 13px;
    position: absolute;
    bottom: 0;
    padding: 10px;
}

.footer a {
    color: grey;

}

.header {
    display: flex;
    justify-content: space-between;
    background-color: rgb(34, 34, 34);

}

.close {
    display: none;
}

.header>* {
    padding: 20px;
}

.spotifyplaylist {
    padding: 16px;
    padding-bottom: 190px;
}

.spotifyplaylist h1 {
    padding: 16px;
}

.feedback {
    min-height: 20px;
    margin: 0 16px 8px;
    color: #b3b3b3;
    font-size: 13px;
}

.feedback.error {
    color: #ff8a8a;
}

.feedback.loading {
    color: #ffe066;
}

.cardcontainer {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 30px 18px;
    max-height: 60vh;
    overflow-y: auto;

}

.card {
    width: 200px;
    padding: 10px;
    border-radius: 5px;
    background-color: #252525;
    position: relative;
    transition: all .25s ease;


}

.card:hover {
    background-color: #353535;
    cursor: pointer;
    --a: 1;
    transform: translateY(-2px);
}

.card>* {
    padding-top: 10px;


}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.play {
    width: 28px;
    height: 28px;
    background-color: #1fdf64;
    border-radius: 50%;

    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 88px;
    right: 17px;
    opacity: var(--a);
    transition: all 1s ease-out;
}



.buttons>* {
    margin: 0 12px;
}

.signupbtn {
    background-color: rgb(34, 34, 34);
    ;
    color: rgb(156, 148, 148);
    font-weight: bold;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s ease;

}

.signupbtn:hover {
    color: white;
}

.loginbtn {
    background-color: white;
    border-radius: 21px;
    color: black;
    font-size: 16px;
    padding: 10px;
    width: 79px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.25s ease;
}

.loginbtn:hover {
    filter: brightness(0.95);
}

.playnow {
    display: flex;
    justify-content: center;
    align-items: center;
}

.playnow span {
    font-size: 15px;
    width: 64px;
    padding: 12px;

}

.playbar {
    position: fixed;
    bottom: 30px;
    background: #dad5d5;
    border-radius: 10px;
    width: 70vw;
    padding: 12px;
    filter: invert(1);
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.songbuttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.songlist .info {
    font-size: 13px;
    width: 344px;
}

.info .div {
    word-break: break-all;
}

.songlist {
    height: 544px;
    overflow: auto;
    margin-bottom: 44px;
}

.songlist ul {
    padding: 0 12px;
}

.songlist ul li {
    list-style-type: decimal;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    padding: 12px 0;
    border: 1px solid white;
    margin: 12px 0;
    padding: 13px;
    border-radius: 5px;
    transition: all 0.25s ease;
}

.songlist ul li:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #9d9d9d;
}

.songlist ul li.active {
    border-color: #1fdf64;
    background-color: rgba(31, 223, 100, 0.14);
}

.seekbar {
    height: 4px;
    width: 98%;
    background: black;
    position: absolute;
    bottom: 8px;
    border-radius: 10px;
    margin: 6px;
    cursor: pointer;
}

.circle {
    width: 13px;
    height: 13px;
    border-radius: 13px;
    background-color: black;
    position: relative;
    bottom: 6px;
    left: 0%;
    transition: left 0.5s;
}

.songbuttons img {
    cursor: pointer;
    transition: all 0.2s ease;
}

.timevol {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.songinfo {
    color: black;
    padding: 0 12px;
    width: 250px;
}

.songtime {
    color: black;
    padding: 0 12px;
    width: 125px;
}

.volume {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.range input {
    cursor: pointer;
}

.range label {
    color: #fff;
}

input:focus-visible,
button:focus-visible {
    outline: 2px solid #1fdf64;
    outline-offset: 2px;
}

.abovebar {
    display: flex;
    justify-content: space-between;
    margin: 20PX 0;

}

@media (max-width: 1200px) {
    .left {
        background-color: black;
        position: absolute;
        left: -130%;
        transition: all .3s;
        z-index: 1;
        width: 370px;
        padding: 0;
        height: 100vh;
        top: 0;

    }

    .left .close {
        position: absolute;
        right: 31px;
        top: 25px;
        width: 29px;
    }

    .right {
        width: 100vw;
    }

    .playbar {
        width: calc(100vw - 75px);

    }

    .seekbar {
        width: calc(100vw - 85px);
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .card {
        width: 55vw;
    }

    .close {
        display: block;
    }

    .right {
        margin: 0;
    }

    .cardcontainer {
        margin: 0;
        justify-content: center;

    }

    .abovebar {
        flex-direction: column;
        gap: 23px;
        align-items: center;
    }

    .songinfo,
    .songtime {
        width: auto;
    }

    .timevol {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        flex-direction: column;
        gap: 13px;
    }

    .cardcontainer {

        max-width: unset;
        overflow-y: unset;
        margin-bottom: 30vh;


    }

    .playlist-actions {
        justify-content: flex-start;
    }

    .playbar {
        right: 25px;

    }
}

@media (max-width:500px) {
    .card {
        width: 100%;
    }

    .header>* {
        padding: 2px;
    }

    .buttons>* {
        margin: 0 6px;
    }

    .header {
        padding: 7px;
    }

    .spotifyplaylist h1 {
        padding: 4px;
    }

    .spotifyplaylist {
        padding-bottom: 220px;
    }

    .library {
        height: 85vh;
    }

    .left {
        position: fixed;
        top: 0;
        width: 100vw;
    }
}