* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: black;
    color: white;
    font-family: 'Oswald', sans-serif;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* ===== SIDEBAR  ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 75px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 2px solid #ffd966;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    transition: width 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(204, 255, 0, 0.2);
}

.sidebar:hover {
    width: 250px;
    box-shadow: 0 0 20px #ffd966;
}

/* Logo item (menu) */
.menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 10px;
    color: white;
    text-decoration: none;
    transition: 0.5s;
    font-size: 10px;
    font-family: 'Orbitron', sans-serif;
}

.menu a img {
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.menu a:hover {
    background: white;
    color: black;
}

.menu a:hover img {
    filter: brightness(0);
    transform: scale(1.2);
}

.menu span {
    height: 25px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.5s ease;
    font-size: 10px;
    font-family: 'Orbitron', sans-serif;
}

.sidebar:hover .menu span {
    opacity: 1;
}

.menu span h1 {
    transition: opacity 0.5s ease;
    font-size: 18px;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
}

/* Menu items (menu1) */
.menu1 {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu1 a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 22px;
    color: white;
    text-decoration: none;
    transition: 0.5s;
}

.menu1 a img {
    min-width: 25px;
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.menu1 a:hover {
    background: #ffd966;
    color: black;
}

.menu1 a.no-hover:hover {
    background: transparent !important;
    color: #ffd966;
    cursor: default;
}

.menu1 a.no-hover:hover img {
    filter: brightness(0) invert(1) !important;
    transform: none !important;
}

.menu1 a.no-hover {
    padding: 2px 22px !important;
    min-height: 6px;


}

.menu1 a:hover span p {
    color: black;
}

.menu1 a:hover img {
    filter: brightness(0);
    transform: scale(1.2);
}

.menu1 span {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.5s ease;
}

.sidebar:hover .menu1 span {
    opacity: 1;
}

/* Underline animation for menu text */
.munutext {
    color: white;
    font-size: 15px;
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 0;
}

.munutext:hover {
    color: black;
}

.munutext::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: black;
    transition: width 0.5s ease;
}

.menu1 a:hover .munutext::after {
    width: 100%;
}


.main {
    margin-left: 75px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: black;
}

.top,
.down {
    background: #ffd966;
    color: black;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    z-index: 5;

}

.top h1 {
    font-size: 30px;
    font-family: 'Orbitron', sans-serif;
}

.down h1 {
    font-size: 24px;
    font-family: 'Oswald', sans-serif;
}

.grid {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 25px;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 1;
}
.grid::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0px;
    width: 100%;
    height: 100vh;
    background-image: url("Itx-blackground.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    z-index: -1;
}

.grid::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Playlist container */
.playlist-grid {
    width: 100%;
    max-width: 1600px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin: 0 auto;
    padding: 0;
}

.playlist-card {
    background: linear-gradient(145deg, #0c0c0c, #050505);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 20px 35px -15px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    height: fit-content;   /* 🔥 add */
}

.playlist-card:hover {
    transform: translateY(-20px);
    border-color: rgba(255, 215, 0, 0.75);
    box-shadow: 0 25px 45px -12px rgba(255, 215, 0, 1), 0 0 0 1px rgba(255, 215, 0, 1);
}

.embed-wrapper {
    width: 100%;
    line-height: 0;
}

.embed-wrapper iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
}

.playlist-header {
    padding: 1rem 1.2rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.playlist-title {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: #ffeaac;
    display: flex;
    align-items: center;
}

.genre-badge {
    background: rgba(255, 215, 0, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffd966;
    font-family: 'Orbitron', monospace;
}

.playlist-desc {
    padding: 0 1.2rem 1rem;
    font-size: 0.75rem;
    color: #999;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Track count indicator */
.track-info {
    padding: 0.7rem 1.2rem;
    font-size: 0.7rem;
    color: #ffd966;
    background: rgba(255, 215, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 6px;
    left: 4px;
    font-size: 14px;
    color: #ffd966;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 6px;
    border-radius: 6px;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0 0 10px black;
}

.back-btn {
    display: none;
    margin: 20px auto;
    padding: 8px 15px;
    width: fit-content;
    text-align: center;
    background: #ffd966;
    color: black;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

iframe {
    transition: opacity 0.3s;
}

::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}
@media (max-width: 1100px) {
    .playlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .playlist-card {
        border-radius: 20px;
    }

    .embed-wrapper iframe {
        height: 600px;      /* 6-7 tracks visible */
        min-height: 600px;
    }


    .playlist-header {
        padding: 0.8rem 1rem 0.3rem;
    }

    .playlist-desc {
        padding: 0 1rem 0.8rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 75px;
    }

    .main {
        margin-left: 75px;
        overflow-y: auto;
    }

    .top {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .down {
        position: sticky;
        bottom: 0;
        z-index: 100;
    }

    .top h1 {
        font-size: 22px;
        font-family: 'Orbitron', sans-serif;
    }

    .down h1 {
        font-size: 14px;
        font-family: 'Oswald', sans-serif;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 8px;
        padding: 8px;
        min-height: auto;
        overflow-y: visible;
    }

    .grid {
        padding: 1px;
        overflow-y: visible;
    }

    .playlist-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .playlist-card {
        overflow: hidden;
        border-radius: 18px;
    }

    .embed-wrapper iframe {
        height: 500px;
        min-height: 500px;
    }

    .playlist-grid {
        gap: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        transition: 0.4s;
        border-right: none;
        box-shadow: none;

    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .sidebar:hover {
        width: 100%;
        box-shadow: 0 0 20px #ccff00;


    }
    .sidebar.active .menu span,
    .sidebar.active .menu1 span {
        opacity: 1 !important;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* horizontal center */
        justify-content: flex-start;
        text-align: center;
        border-right: 2px solid #000000;
    }

    .menu,
    .menu1 {
        width: 100%;
    }

    .menu a,
    .menu1 a {
        justify-content: flex-start;
        width: 100%;
        padding: 6px 10px;
        border-radius: 8px;
        justify-content: center;
        width: 80%;
        margin: 1px auto;
        border-radius: 10px;
    }

    .menu a:hover {
        background: rgb(255, 0, 0);
    }
    .sidebar.active .menu a {
        background: white;
        color: black;
    }

    .sidebar.active .menu a img {
        filter: brightness(0);
    }


    .back-btn {
        display: block;
    }
    .sidebar.active~.mobile-menu-btn {
        display: none;
    }

    .sidebar {
        overflow-y: auto;
        overflow-x: hidden;
    }


    .back-btn {
        display: block;
        margin: 15px 10px;
        padding: 10px;
        width: calc(100% - 20px);
        /* perfect fit */
        text-align: center;
        background: #ffd966;
        color: black;
        border-radius: 10px;
        font-weight: bold;
        cursor: pointer;
    }


    .sidebar {
        overflow-y: auto;
        overflow-x: hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }
}