/* ===== RESET & BASE ===== */
* {
    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 white;
    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 white;
}

/* 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: white;
    color: black;
}

.menu1 a.no-hover:hover {
    background: transparent !important;
    color: white;
    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: white;
    color: black;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top h1 {
    font-size: 30px;
    font-family: 'Orbitron', sans-serif;
}

.down h1 {
    font-size: 24px;
    font-family: 'Oswald', sans-serif;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 🔥 5 columns */
    gap: 2px;
    padding: 10px;
    overflow-y: auto;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE & Edge */
}

/* 🔥 Chrome, Safari */
.grid::-webkit-scrollbar {
    display: none;
}
/* iframe fix */
.grid iframe {
    width: 100%;
    height: 352px;
    border: none;
    border-radius: 12px;
}

/* sidebar open thay tyare overlay visible */
.sidebar.active~.overlay {
    opacity: 1;
    visibility: visible;
}

/* BACK BUTTON STYLE */
.back-btn {
    display: none;
    margin: 20px auto;
    padding: 8px 15px;
    width: fit-content;
    /* 🔥 main fix (auto size) */
    text-align: center;
    background: white;
    color: black;
    border-radius: 8px;
    /* thodu rounded look */
    font-weight: bold;
    cursor: pointer;
}


/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 6px;
    left: 4px;
    font-size: 14px;
    color: white;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 6px;
    border-radius: 6px;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0 0 10px black;
}

/* ===== MOBILE OVERRIDES (max-width:768px) ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 75px;
        transform: translateX(-110%);
        width: 100%;
        transition: 0.5s;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        overflow-y: auto;
        overflow-x: hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;

    }

    .sidebar:hover {
        width: 100%;
    }

    /* 🔥 sidebar open thay tyare text dekhaay */
    .sidebar.active .menu span,
    .sidebar.active .menu1 span {
        opacity: 1 !important;
    }

    .main {
        overflow-y: auto;
        margin-left: 0;
    }

    .top {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .down {
        position: sticky;
        bottom: 0;
        z-index: 100;
    }

    .down h1 {
        font-size: 16px;
    }


    .mobile-menu-btn {
        display: block;
    }


    .sidebar.active {
        transform: translateX(0);
    }

    /* 🔥 sidebar open thay tyare text dekhaay */
    .sidebar.active .menu span,
    .sidebar.active .menu1 span {
        opacity: 1 !important;
    }

    .menu,
    .menu1 {
        width: 100%;
    }

    .menu a,
    .menu1 a {
        justify-content: flex-start;
        width: 100%;
        padding: 12px 20px;
        border-radius: 8px;
        justify-content: center;
        width: 80%;
        margin: 1px auto;
        border-radius: 10px;
    }

    .menu a:hover {
        background: white;
    }

    .sidebar.active .menu a {
        background: white;
        color: black;
    }

    .sidebar.active .menu a img {
        filter: brightness(0);
    }


    .back-btn {
        display: block;
    }

    /* ❌ menu button hide when sidebar open */
    .sidebar.active~.mobile-menu-btn {
        display: none;
    }


    .back-btn {
        display: block;
        margin: 15px 10px;
        padding: 10px;
        width: calc(100% - 20px);
        text-align: center;
        background: white;
        color: black;
        border-radius: 10px;
        font-weight: bold;
        cursor: pointer;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }
}