:root {
    --bg-color: #050505;
    --card-bg: #121212;
    --text-color: #ffffff;
    --accent-color: #e50914;
    --accent-hover: #ff0f1e;
    --secondary-text: #a3a3a3;
    --header-bg: rgba(5, 5, 5, 0.75);
    --card-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
}

@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
}

.container {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 50px;
}

/* ================= NEW HEADER DESIGN ================= */
.main-header {
    background-color: #050505;
    height: var(--header-height);
    position: relative;
    z-index: 2000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header-container {
    max-width: 2000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand .new-logo {
    text-decoration: none;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent-color);
}

/* Desktop Nav */
.desktop-nav {
    margin-left: 40px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
}

.nav-link:hover {
    color: white;
}

.nav-link i {
    font-size: 10px;
    opacity: 0.7;
}

/* Dropdowns */
.has-dropdown {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    min-width: 220px;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-grid a {
    color: var(--secondary-text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.menu-grid a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent-color);
}

/* Search Box */
.header-search {
    flex: 0 0 300px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px 10px 40px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-text);
    font-size: 14px;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
    width: 50px;
    height: 75px;
    border-radius: 4px;
    object-fit: cover;
}

.search-result-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.search-result-info p {
    font-size: 12px;
    color: var(--secondary-text);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 20px 0 0;
    background: var(--bg-color);
}

/* Movie Section Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.movie-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.movie-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.movie-card:hover .poster-wrapper img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 15px 15px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0.9;
    transition: var(--transition);
}

.rating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #ffcc00;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #007bff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    line-height: 1.1;
    text-align: center;
}

@media (max-width: 480px) {
    .quality-badge {
        top: 10px;
        right: 10px;
        padding: 2px 5px;
        font-size: 8px;
    }
}

.dual-audio-badge {
    position: absolute;
    top: 40px;
    right: 12px;
    background: #ffc107;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    line-height: 1.1;
    text-align: center;
}

@media (max-width: 480px) {
    .dual-audio-badge {
        top: 35px;
        right: 10px;
        padding: 2px 5px;
        font-size: 7px;
    }
}

.movie-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    font-size: 12px;
    color: var(--secondary-text);
    font-weight: 600;
}

/* Section Header */
.movie-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.view-all {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.main-footer {
    padding: 20px 0;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.copyright {
    font-size: 14px;
    color: var(--secondary-text);
    font-weight: 500;
}

.copyright a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Filter Styles */
.filter-select {
    padding: 10px 20px;
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    border: 1px solid #333;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 35px;
}

.filter-select:hover {
    border-color: var(--accent-color);
}

.filter-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
}

.category-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .container { padding: 0 30px; }
    .movie-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Menu Trigger (Hamburger) */
.menu-trigger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.menu-trigger:hover {
    color: var(--accent-color);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #080808; /* Solid, deep dark background for maximum opacity */
    z-index: 5000;
    padding: 30px;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 20px 0 60px rgba(0,0,0,1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

@media (max-width: 480px) {
    .mobile-drawer {
        width: 85%;
        left: -85%;
    }
}

.mobile-drawer.active {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.drawer-close:hover {
    background: var(--accent-color);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-nav-link, .mobile-drop-btn {
    color: #efefef;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-nav-link:hover, .mobile-drop-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent-color);
}

.mobile-drop-btn {
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.mobile-drop-content {
    display: none;
    padding-left: 15px;
    flex-direction: column;
    gap: 5px;
    margin: 5px 0 15px;
}

.mobile-drop-content a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: var(--transition);
}

.mobile-drop-content a:hover {
    background: rgba(255,255,255,0.03);
    color: white;
}

.mobile-dropdown.active .mobile-drop-content {
    display: flex;
}

.mobile-dropdown.active .mobile-drop-btn {
    color: var(--accent-color);
    background: rgba(229, 9, 20, 0.05);
}

.mobile-dropdown.active .mobile-drop-btn i {
    transform: rotate(90deg);
}

/* Mobile Search in Drawer */
.mobile-search-wrapper {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-search-wrapper .search-box {
    position: relative;
    width: 100%;
}

.mobile-search-wrapper .search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px 12px 40px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.mobile-search-wrapper .search-box input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-search-wrapper .search-dropdown {
    width: 100%;
    position: relative;
    top: 10px;
    left: 0;
    right: 0;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85); /* Darker overlay for focus */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 4500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 992px) {
    .movie-grid { grid-template-columns: repeat(4, 1fr); }
    
    .header-container {
        display: grid;
        grid-template-columns: 50px 1fr 50px;
        align-items: center;
        justify-items: center;
    }

    .menu-trigger {
        display: block;
        grid-column: 1;
    }

    .header-brand {
        grid-column: 2;
        text-align: center;
    }

    .desktop-only-search {
        display: none !important;
    }

    .desktop-nav { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .section-header h2 { font-size: 24px; }
    .hero { min-height: 60vh; }
    .category-header {
        margin-bottom: 25px;
        gap: 10px;
    }
    .category-title {
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }
    .filter-select {
        padding: 8px 15px;
        font-size: 13px;
        background-position: calc(100% - 8px) center;
        padding-right: 30px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .section-header h2 { font-size: 20px; }
    .category-title { font-size: 18px; }
    .movie-title { font-size: 14px; }
    .hero { min-height: 50vh; }
    
    .rating-badge {
        top: 12px;
        left: 10px;
        padding: 3px 8px;
        font-size: 10px;
        line-height: 1.2;
    }
    
    .quality-badge {
        top: 11px;
        right: 10px;
        padding: 2px 5px;
        font-size: 8px;
        line-height: 1.1;
    }
}

@media (min-width: 1400px) {
    .movie-grid { grid-template-columns: repeat(6, 1fr); }
}

/* 
 * Fresh Rewrite: Latest Releases Slider
 * Ensures exact match with standard movie card sections 
 */
.latest-releases-section {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.latest-swiper {
    width: 100%;
    padding-bottom: 35px; /* Space for pagination */
    margin: 0;
}

.latest-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    /* Reset any potential side-effects from previous attempts */
    transform: none !important;
    opacity: 1 !important;
}

.latest-swiper .movie-card {
    width: 100%;
    margin: 0;
}

/* Slider Controls Styling */
.latest-swiper .swiper-pagination-bullet {
    background: #666;
    opacity: 0.6;
}

.latest-swiper .swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}

.latest-swiper .swiper-button-next,
.latest-swiper .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.latest-swiper .swiper-button-next:hover,
.latest-swiper .swiper-button-prev:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.latest-swiper .swiper-button-next:after,
.latest-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: 800;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .latest-swiper .swiper-button-next,
    .latest-swiper .swiper-button-prev {
        display: none;
    }
}
