/* Fonts Page */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* =================GLOBAL=================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f1014;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

h2 {
    font-size: 20px;
    color: #ffffff;
    letter-spacing: .25px;
}

h2 a {
    color: #ccc;

}

h2 a:hover {
    color: #e70909;
}

main {
    /* font */
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

/* <!-- ================= HEADER ================= --> */
.navbar {
    width: 100%;
    background: #000000;
    padding: 12px 4%;
    position: fixed;
    top: 0;
    z-index: 9999;

}

/* container keeps everything on one row; allow shrink for search */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    /* do NOT allow wrapping so links don't drop below */
    flex-wrap: nowrap;
}

/* logo fixed-size */
.logo {
    font-size: 25px;
    font-weight: 700;
    color: #fff;
    flex: 0 0 auto;
    /* never shrink to zero */
    white-space: nowrap;
}

.logo span {
    color: #e50914;
}

/* NAV LINKS: do not wrap, enable horizontal scroll when needed */
.nav-links {
    list-style: none;
    display: flex;
    gap: 16px;
    align-items: center;
    flex: 0 0 auto;
    /* keep natural width; don't stretch */
    white-space: nowrap;
    /* keep items in one line */
    overflow-x: auto;
    /* allow horizontal scroll if not enough space */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    /* small padding so scroll doesn't cut text */
}

/* hide native scrollbar but keep scrollable */
.nav-links::-webkit-scrollbar {
    height: 6px;
    display: none;
}

.nav-links {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* individual links */
.nav-links a {
    display: inline-block;
    color: #fff;
    font-size: 15px;
    padding: 6px 4px;
    text-decoration: none;

    /* font */
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.nav-links a:hover {
    color: #0c70ce;
    transform: scale(1.1);

}

/* make sure the hamburger/icon (if present) is shown at end */
.nav-links li img {
    display: block;
    height: 20px;
    width: auto;
}

/* Sidebar Setup */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    /* Shuru mein screen se bahar */
    width: 260px;
    height: 100vh;
    background: #0a0a0a;
    z-index: 10000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.8);
}

.sidebar.active {
    right: 0;
    /* Click par andar aayega */
}

.sidebar-header {
    padding: 25px 20px;
    background: #e50914;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
}

#closeMenu {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    /* Sab ek ke niche ek */
    padding: 20px 0;
}

.sidebar-content a {
    color: #eee;
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid #1a1a1a;
    transition: 0.3s;
}

.sidebar-content a:hover {
    background: #1a1a1a;
    color: #e50914;
    padding-left: 35px;
}

/* Background Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(3px);
}

.menu-overlay.active {
    display: block;
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */
/* tablet-ish: shrink search, smaller gaps */
@media (max-width:900px) {

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 14px;
        padding: 6px 6px;
    }

    .logo {
        font-size: 20px;
    }
}

/* mobile narrow: make search tiny but present, ensure links remain visible (scrollable) */
@media (max-width:480px) {

    .navbar {
        height: 61px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 15px;
        padding: 4px 1px;
        margin: 1px 0px;
    }

    .logo {
        font-size: 23px;
        margin: 1px -4px;
    }

    ul .op {
        display: none;
    }
}

/* extra safety: force show nav-links if something else hides them */
@media (max-width:900px) {
    .nav-links {
        display: flex !important;
    }
}


/* Search Page Specific CSS */
.search-wrapper {
    padding: 100px 5% 40px 5%;
    text-align: center;
    background: #0cc544d8;
    min-height: 92.9vh;
    background: transparent !important;
    position: relative;
}

.search-bar-container {
    position: relative;
    max-width: 700px;
    margin: 101px auto 50px auto;
}

#search-input {
    width: 100%;
    padding: 15px 25px;
    padding-left: 55px;
    border-radius: 50px;
    border: 2px solid #333;
    background: #111;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: 0.3s;
}

#search-input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.search-icon-inside {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 65px;
    margin-top: 90px;
}

.search-card {
    width: 225px;
    transition: 0.3s;
    text-align: left;
}

.search-card img {
    width: 225px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #222;
}

.search-card:hover {
    transform: translateY(-5px);
}

.search-card h3 {
    font-size: 0.9rem;
    margin-top: 10px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-results {
    color: #666;
    margin-top: 50px;
    font-size: 1.2rem;
}

/* Background setup */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Ye wrapper ke piche rahega, par wrapper ab transparent hai */
    margin: 0;
    padding: 0;
    background-color: #000;
    /* Loader ki tarah kaam karega jab tak image na aaye */
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.6;
    /* 🔥 Thoda sa dark rakha hai taaki search results saaf dikhen */
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .search-card img {
        width: 145px;
    }

    .search-card {
        padding: 0px 0px 0px 15px;
        width: 180px;
        transition: 0.3s;
        text-align: left;
    }

    .search-wrapper {
        height: 83.9vh;
    }

    .search-bar-container {
        position: relative;
        max-width: 700px;
        margin: 101px 15px 50px 15px;
    }
}

/* Solo Leveling Episode Page jaisa exact background */
.premium-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Isse upar aur neeche Red aayega aur beech mein Black */
    background: linear-gradient(180deg,
            #000000 28%,
            /* Upar ka Red */
            #000000 28%,
            /* Beech ka Black (35% se 65% tak faila hua) */
            #9b0000 96%,
            #8b0000 105%
            /* Neeche ka Red */
        );
    background-attachment: fixed;
}

/* Isse woh "Glow" wala asar aayega jo tere screenshot mein hai */
.premium-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Halka sa radial glow taaki posters chamkein */
    background: radial-gradient(circle at center, rgba(155, 0, 0, 0.2) 0%, transparent 80%);
    pointer-events: none;
}

/* Search Wrapper adjustments */
.search-wrapper {
    /* min-height: 100vh; */
    width: 100%;
    position: relative;
    padding-top: 60px;
}