:root {
    --primary-color: #E50914;
    /* Netflix Red / FlixMax Red */
    --background-dark: #141414;
    --background-black: #000000;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --header-height: 68px;
    --transition-speed: 0.3s;
    --content-padding: 5%;
    /* Consistent padding */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--content-padding);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0));
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

#navbar.scrolled {
    background-color: var(--background-black);
}

.logo .brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.7);
}

.logo .brand-text i {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    /* Increased gap for better look */
    justify-content: center;
    flex-grow: 1;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Transparent border initially */
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 4px;
    /* Slightly rounded */
    transition: all 0.3s ease;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    margin-left: 10px;
    outline: none;
    width: 0;
    /* Expanded on hover/click if desired, or fixed width */
    width: 200px;
    /* Fixed for now for simplicity */
    font-size: 0.9rem;
}

.search-box i {
    font-size: 1.2rem;
    cursor: pointer;
}

.icon-link i {
    font-size: 1.4rem;
    color: white;
}

.profile-menu img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
}

/* Hero Section */
#hero {
    position: relative;
    height: 75vh;
    /* Reduced from 90vh */
    width: 100%;
    overflow: hidden;
    /* Hide overflow for slider */
    display: block;
    /* Remove flex, using absolute slides */
    padding-left: 0;
    /* Padding handled inside slides */
}

/* Slider Track */
.hero-slider-track {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Individual Slide */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    visibility: hidden;
    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    /* Centering content vertically */
    align-items: center;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
    /* Added right padding for consistency */
    /* Align content */
    z-index: 0;
}

.hero-slide.active {
    visibility: visible;
    opacity: 1;
    z-index: 1;
}

/* Gradients attached to the slide itself so they are BEHIND the content but IN FRONT of the background image */
.hero-slide::after {
    /* Bottom gradient */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #141414 0%, rgba(20, 20, 20, 0.5) 50%, rgba(20, 20, 20, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-slide::before {
    /* Left gradient */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    /* Extended slightly */
    height: 100%;
    background: linear-gradient(90deg, #141414 0%, rgba(20, 20, 20, 0) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    /* Above overlays */
    max-width: 600px;
    color: white;
    margin-top: 50px;
}

/* Hero Nav Controls */
.hero-nav-actions {
    position: absolute;
    bottom: 20%;
    right: var(--content-padding);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.hero-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.hero-nav-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: black;
}


.hero-logo-img {
    max-width: 400px;
    /* Limit logo width */
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.1;
    font-family: 'Inter', sans-serif;
    /* Or a more display font */
}

/* Unique font effect for title from image */
.hero-title-logo {
    /* If we have an image logo, usage would be here. For text: */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Pills */
.hero-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.pill {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 20px;
    /* Pill shape */
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-pill {
    background: #333;
    /* Darker for rating */
    color: #ffd700;
}

.rating-pill i {
    color: #ffd700;
}

.match-score {
    color: #46d369;
    /* Netflix match score green */
    font-weight: 700;
}

.hero-desc {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    max-width: 650px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    border: none;
    border-radius: 6px;
    padding: 0.8rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-transform: capitalize;
    text-decoration: none;
    /* Removed underline */
}

.btn-white {
    background: white;
    color: black;
    font-weight: 700;
}

.btn-white:hover {
    background: #eee;
}

/* Large Button for Hero */
.btn-large {
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-glass {
    background: rgba(109, 109, 110, 0.7);
    color: white;
    border: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn-glass:hover {
    background: rgba(100, 100, 100, 0.5);
}

/* Rows / Sliders */
.row-section {
    padding: 20px 0;
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
}

/* Provider / Series Section */
.provider-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: var(--content-padding);
    /* Match right padding */
    margin-bottom: 20px;
}

.provider-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: var(--content-padding);
}

.red-bar {
    width: 6px;
    height: 40px;
    background-color: var(--primary-color);
    display: inline-block;
    border-radius: 2px;
}

.red-text {
    color: var(--primary-color);
}

.provider-tabs {
    display: flex;
    gap: 25px;
}

.provider-tab {
    background: none;
    border: none;
    color: #888;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
    padding-bottom: 5px;
}

.provider-tab:hover,
.provider-tab.active {
    color: white;
}

.provider-tab.active {
    border-bottom: 2px solid var(--primary-color);
}

/* Update section title padding to be generic if needed, or keep specific */
.section-title {
    /* ... previous styles ... */
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    /* More space */
    padding-left: var(--content-padding);
    color: #e5e5e5;
    display: flex;
    align-items: center;
    /* Center align items */
    gap: 15px;
}

/* "TOP 10" Text */
.section-title .outline-red {
    font-family: 'Anton', sans-serif;
    font-size: 6rem;
    /* Much Bigger */
    color: transparent;
    -webkit-text-stroke: 2px var(--primary-color);
    line-height: 0.8;
    letter-spacing: 2px;
}

.section-title .thin-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    /* Bigger */
    letter-spacing: 4px;
    /* More spacing */
    color: white;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-left: 10px;
}


.slider-container {
    position: relative;
    width: 100%;
}

.slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 var(--content-padding);
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox hide */
}

.slider::-webkit-scrollbar {
    display: none;
    /* Chrome hide */
}

.movie-card {
    flex: 0 0 auto;
    width: 200px;
    /* Poster width */
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.movie-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 20;
}

/* Top 10 Styling specifically */
.movie-card.top-10-card {
    width: 260px;
    /* Wider to accommodate number */
    display: flex;
    align-items: flex-end;
    /* Align bottom to match reference */
    position: relative;
    overflow: visible;
    /* Allow number to stick out */
    padding-left: 50px;
    /* Push image right */
    margin-right: 20px;
    /* Extra spacing between items */
}

.rank-number {
    position: absolute;
    left: -10px;
    /* Stick out to left */
    bottom: -15px;
    /* Slightly cut off bottom like modern designs */
    font-size: 10rem;
    font-weight: 900;
    color: #141414;
    /* Dark fill matching background to look "transparent" or just dark */
    -webkit-text-stroke: 2px #595959;
    font-family: 'Anton', sans-serif;
    z-index: 0;
    line-height: 1;
}

/* Active/Hover state for Top 10? */
.movie-card.top-10-card:hover .rank-number {
    -webkit-text-stroke: 2px var(--primary-color);
    /* Turn red on hover */
    color: #141414;
}

.movie-card.top-10-card img {
    width: 160px;
    /* Fixed width for poster */
    z-index: 1;
    /* Above number */
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.movie-card.top-10-card:hover img {
    transform: scale(1.05);
    /* Zoom poster */
}

.handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--content-padding);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-container:hover .handle {
    opacity: 1;
}

.left-handle {
    left: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.right-handle {
    right: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* Mobile */
@media (max-width: 768px) {
    #hero {
        height: 60vh;
        /* Aggressively reduced for mobile */
        min-height: 400px;
        /* Ensure it doesn't get too small on tiny screens */
    }

    /* Smaller Scrollbar for Mobile */
    ::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .section-title .outline-red {
        font-size: 4rem;
        line-height: 1;
    }

    .section-title .thin-text {
        margin-left: 0;
        font-size: 1.2rem;
        margin-top: 5px;
    }

    .provider-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-right: 0;
        /* Let tabs scroll */
    }

    .provider-title {
        width: 100%;
        margin-bottom: 5px;
    }

    .provider-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 15px;
        padding-left: var(--content-padding);
        padding-right: var(--content-padding);
        margin-left: 0;
        /* Align with padding */
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        margin-bottom: 0px;
        flex-wrap: nowrap;
        gap: 20px;
    }

    /* Ensure tabs don't shrink */
    .provider-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Navbar Adjustments */
    #navbar {
        padding: 10px 15px 0 15px;
        /* Added top padding */
        height: auto;
        /* Let it expand if needed */
        min-height: 70px;
        align-items: center;
    }

    .logo .brand-text {
        font-size: 1.4rem;
    }

    .nav-links {
        display: none;
        /* Hide desktop links on mobile for simplicity, or we need a hamburger */
        /* For now, let's hide to prevent clutter as per image showing overlap */
    }

    /* Hero Adjustments */
    .hero-content {
        margin-top: 30px;
        /* Pull up slightly or standard */
        max-width: 100%;
        padding-right: 15px;
        /* Ensure text doesn't hit edge */
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-logo-img {
        max-width: 250px;
        /* Much smaller mobile logo */
        margin-bottom: 10px;
    }

    .hero-desc {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        max-width: 100%;
    }

    .hero-meta {
        font-size: 0.8rem;
        margin-bottom: 15px;
        gap: 8px;
    }

    .pill {
        padding: 4px 10px;
    }

    .hero-buttons {
        gap: 10px;
        margin-top: 20px;
        flex-wrap: wrap;
        /* Allow wrapping if needed */
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        flex: 1;
        /* Stretch buttons */
        justify-content: center;
    }

    .hero-nav-actions {
        display: none;
        /* Hide arrows on mobile to reduce clutter */
    }

    .movie-card {
        width: 130px;
        /* Slightly smaller */
    }

    .movie-card.top-10-card {
        width: 180px;
        margin-right: 15px;
        flex-direction: row;
        /* Ensure row layout or keep relative? Reference showed visual overlap */
        /* Let's try to keep them visible. */
        overflow: visible;
        padding-left: 35px;
        /* Reduce padding */
    }

    .rank-number {
        font-size: 7rem;
        bottom: -10px;
        left: -15px;
        z-index: 10;
        color: #141414;
        /* ensure contrast or outline */
        text-shadow: 2px 2px 0px #000;
    }

    .movie-card.top-10-card img {
        width: 120px;
    }

    .hero-nav-actions {
        bottom: 10%;
    }
}

/* Footer */
footer {
    background-color: #000;
    padding: 3rem 5%;
    margin-top: 3rem;
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-left {
    max-width: 400px;
}

.footer-left h3 {
    font-family: 'Anton', sans-serif;
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.contact-email {
    color: var(--text-white);
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #111;
    padding-top: 1.5rem;
    text-align: center;
    color: #444;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        margin: 0 auto;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile Menu Modal */
.mobile-menu-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-modal.open {
    display: flex;
    /* Use flex to center */
    opacity: 1;
}

.mobile-menu-content {
    background-color: #141414;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.mobile-menu-modal.open .mobile-menu-content {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.mobile-menu-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

#close-menu-btn {
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
}

#close-menu-btn:hover {
    color: white;
}

.menu-section h3 {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    border: 1px solid #333;
    transition: all 0.3s;
}

.menu-item:hover .menu-icon {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

/* Icon Colors (Gradient borders or fills would be nice, but keeping simple for now) */
.icon-movie {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

.icon-tv {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

.icon-anime {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

.icon-channels {
    color: #448aff;
    background: rgba(68, 138, 255, 0.1);
}

.icon-4k {
    color: #ba68c8;
    background: rgba(186, 104, 200, 0.1);
}

.icon-party {
    color: #ffd740;
    background: rgba(255, 215, 64, 0.1);
}


.menu-item span {
    font-size: 0.8rem;
    color: #ddd;
    font-weight: 500;
}

/* Utility to toggle desktop/mobile icons */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    /* Adjust icon size if needed */
    #mobile-menu-btn {
        font-size: 1.8rem;
        cursor: pointer;
    }
}

.icon-home {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.icon-genre {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

/* Brand Logo Image */
.brand-logo {
    height: 40px;
    /* Adjust to fit header height */
    width: auto;
    object-fit: contain;
    display: block;
}

/* Footer Logo */
.footer-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    display: block;
}