/* ============================================================
   GLOBAL RESET + MOBILE OPTIMIZATION
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: "Inter", Arial, sans-serif;
}

body {
    background: #000 url('../Images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
    color: #fff;
}

/* Hide scrollbars globally */
body::-webkit-scrollbar,
.movie-grid::-webkit-scrollbar {
    display: none;
}

/* Prevent weird bounce on iOS */
html, body {
    overscroll-behavior: none;
}


/* ============================================================
   TOPBAR (Logo Left + Search Right) — FIXED FOR YOUR HTML
   ============================================================ */
.topbar {
    width: 100%;
    height: 60px;
    background: rgba(10, 10, 10, 0.88);
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo left / search right */
    padding: 0 18px;
    position: fixed;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

/* LOGO — CENTER VERTICALLY */
.topbar .logo {
    display: flex;
    align-items: center;
}

.topbar .logo img {
    width: 50px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* SEARCH ICON — RIGHT SIDE */
.topbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    cursor: pointer;
}



/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding: 15px;
    padding-top: 80px; /* space for topbar */
    padding-bottom: 120px; /* space for floating nav */
}


/* ============================================================
   CATEGORY SECTIONS
   ============================================================ */
.category {
    margin-bottom: 28px;
}

.category h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 0 6px #000;
}


/* ============================================================
   CAROUSEL (NO BUTTONS ON MOBILE!)
   ============================================================ */
.carousel-container {
    width: 100%;
}

.movie-grid {
    display: flex;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 6px;
}


/* ============================================================
   MOVIE CARD
   ============================================================ */
.movie-card {
    width: 130px;
    flex: 0 0 130px;
    cursor: pointer;
    transition: transform .15s ease;
}

.movie-card:active {
    transform: scale(.94);
}

.movie-card img {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 8px rgba(0,0,0,.7);
}

.movie-card h3 {
    font-size: 14px;
    text-align: center;
    margin-top: 6px;
    line-height: 1.2;
    text-shadow: 0 0 4px #000;
}


/* ============================================================
   BOTTOM FLOATING NAV (3 ICONS)
   ============================================================ */
.bottom-nav {
    width: 100%;
    height: 70px;
    background: rgba(15, 15, 15, 0.9);
    position: fixed;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: 12px;
    z-index: 300;
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* nav icons */
.bottom-nav img {
    width: 34px;
    height: 34px;
    opacity: 0.9;
    transition: 0.2s ease;
}

.bottom-nav img:active {
    transform: scale(.9);
    opacity: 1;
}

.bottom-nav .center-icon {
    width: 60px;
    height: 60px;
    margin-top: -25px;
    border-radius: 50%;
}


/* ============================================================
   RANDOMIZER PAGE
   ============================================================ */
.randomizer-wrapper {
    padding: 100px 20px 40px;
    color: white;
    text-align: center;
}

#refresh {
    padding: 12px 30px;
    background: #222;
    border-radius: 12px;
    border: 2px solid #444;
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
}

.random-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.random-card {
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    overflow: hidden;
    padding-bottom: 10px;
}

.random-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.random-card h3 {
    font-size: 16px;
    margin-top: 6px;
}


/* ============================================================
   WATCHLIST FLOAT BUTTON (MOVIE/SHOW PAGE)
   ============================================================ */
.watchlist-btn {
    position: fixed;
    bottom: 100px;
    right: 16px;
    padding: 12px 18px;
    background: #6E65E8;
    border-radius: 40px;
    display: flex;
    align-items: center;
    z-index: 350;
    box-shadow: 0 0 12px rgba(110,101,232,.8);
}


/* ============================================================
   EPISODE SELECTORS
   ============================================================ */
#seasonSelect,
#episodeSelect {
    width: 90%;
    padding: 12px;
    background: #1a1a1a;
    color: white;
    border-radius: 10px;
    margin: 8px auto;
    font-size: 16px;
}

.ep-controls {
    text-align: center;
    margin-top: 12px;
}


/* ============================================================
   SEARCH PAGE INPUT
   ============================================================ */
.search-input {
    width: 94%;
    margin: 90px auto 20px;
    padding: 14px;
    border-radius: 12px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    font-size: 18px;
}


/* ============================================================
   RESPONSIVE FIXES FOR IPHONE
   ============================================================ */

@media (max-width: 430px) {
    .movie-card {
        width: 120px;
        flex: 0 0 120px;
    }
    .movie-card img {
        height: 185px;
    }
}

@media (max-width: 380px) {
    .movie-card {
        width: 110px;
        flex: 0 0 110px;
    }
    .movie-card img {
        height: 170px;
    }
}
