:root {
    --bg-color: #141414;
    --text-color: #ffffff;
    --accent-color: #e50914; /* Netflix Red */
    --card-scale: 1.05;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 4%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: background 0.3s;
}

.navbar .logo {
    color: var(--accent-color);
    font-size: 24px;
    font-weight: bold;
}

.navbar nav {
    display: flex;
    gap: 15px;
}

.navbar nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.navbar nav a:hover, .navbar nav a.active {
    color: #b3b3b3;
}

.search-bar{
    display:flex;
    align-items:center;
}

.search-bar form{
    display:flex;
    align-items:center;
    background:#1a1a1a;
    border:1px solid rgba(255,255,255,.12);
    border-radius:30px;
    padding:10px 16px;
    min-width:300px;
    transition:.3s;
}

.search-bar form:hover{
    border-color:rgba(255,255,255,.25);
}

.search-bar i{
    color:#999;
    margin-right:10px;
}

.search-bar input{
    background:none;
    border:none;
    outline:none;
    color:#fff;
    width:240px;
    font-size:14px;
}

.search-bar input::placeholder{
    color:#888;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
    position: relative;
}
.logo a{
    color:var(--accent-color);
    text-decoration:none;
    font-weight:bold;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.hero-content {
    max-width: 600px;
    z-index: 10;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #e6e6e6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.hero-btn {
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.hero-btn:hover {
    background-color: #f40612;
}

/* Carousel Section */
.carousel-container {
    padding: 40px 4% 30px; /* Changed from 0 to 40px, removed negative margin */
    position: relative;
    margin-top: 0; /* Changed from -120px to 0 */
    z-index: 50;
}


.carousel-title {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Parent Slider Container */
.carousel-parent {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px 0;
    width: 100%;
    /* Enables smooth native momentum scrolling on iOS and Android */
    -webkit-overflow-scrolling: touch; 
}

/* Completely hide ugly desktop scrollbars */
.carousel-track::-webkit-scrollbar {
    display: none; 
}
.carousel-track {
    scrollbar-width: none; 
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 15px;
    bottom: 15px;
    width: 45px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: rgba(229, 9, 20, 0.8); /* Red highlight on hover */
    font-size: 24px;
}

.prev-btn, .prev-btn-recent { left: -20px; border-radius: 0 4px 4px 0; }
.next-btn, .next-btn-recent { right: -20px; border-radius: 4px 0 0 4px; }

/* Movie Cards */
.card {
    min-width: 180px;
    height: 260px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.card:hover {
    transform: scale(var(--card-scale));
    z-index: 20;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.95) 80%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 11px;
    color: #cccccc;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS (MEDIA QUERIES)
   ========================================================================== */

/* Tablet Screens (800px and down) */
@media (max-width: 800px) {
    .navbar {
        padding: 15px 4%;
    }
    .hero-title {
        font-size: 36px;
    }
    .search-bar input {
        width: 140px;
    }
    .search-bar input:focus {
        width: 160px;
    }
}

/* Mobile Screens (600px and down) */
@media (max-width: 600px) {
    /* Stack Navbar Layout elements cleanly */
    .navbar {
        flex-direction: column;
        gap: 12px;
        background: rgba(20, 20, 20, 0.95); /* Solid header backdrop for readability */
        padding: 15px 20px;
        position: fixed /* Un-fix header so hero content doesn't collide */
    }

    .navbar nav {
        width: 100%;
        justify-content: center;
        order: 3; /* Move links below search bar */
    }

    .search-bar {
        width: 100%;
        justify-content: center;
        order: 2;
    }

    .search-bar input, .search-bar input:focus {
        width: 100%; /* Make search bar take full width */
    }

    /* Adjust Hero Header spaces */
    .hero {
        height: 60vh;
        margin-top: 0;
    }

    .carousel-container {
        margin-top: -40px; /* Bring row categories up gracefully */
        padding-bottom: 15px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Truncate description text on ultra tiny phones */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hide arrow clickers completely on touch phones since swiping is much easier */
    .nav-btn {
        display: none !important;
    }

    .carousel-track {
        gap: 10px;
        padding: 5px 0 15px 0;
    }

    .card {
        min-width: 135px; /* Perfect dual or triple card sizing on touch grids */
        height: 200px;
    }
    
    /* Make card information persistent on mobile touchscreens since there is no "hover" state */
    .card-overlay {
        opacity: 1;
        padding: 8px;
        background: linear-gradient(transparent, rgba(0,0,0,0.85) 60%);
    }

    .card-title {
        font-size: 12px;
    }
    
    .card:hover {
        transform: none; /* Disable card grow animations on phone tap screens */
    }
}
/* ==========================================================================
   HERO CAROUSEL OVERRIDES
   ========================================================================== */
.hero {
    overflow: hidden;
    padding: 0;
}
.hero-content {
    position: relative;
    padding-bottom: 40px;
}
#heroTrack .carousel-slide-card {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.hero .nav-btn {
    top: 0;
    bottom: 0;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}
/* ==========================================================================
   NAVIGATION CATEGORY DROPDOWN STYLES
   ========================================================================== */
.dropdown-menu-parent {
    position: relative;
    display: inline-block;
}

.dropdown-trigger-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.dropdown-content-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 0;
    margin-top: 10px;
    z-index: 200;
}

/* Dropdown link items */
.dropdown-content-panel a {
    color: #ffffff !important;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px !important;
    font-weight: 500;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

/* Hover effects inside dropdown menu */
.dropdown-content-panel a:hover {
    background-color: var(--accent-color);
    color: #ffffff !important;
}

/* Show the dropdown menu when hovering over the parent wrapper container */
.dropdown-menu-parent:hover .dropdown-content-panel {
    display: block;
}

/* Mobile Responsive adjustment to ensure links don't get squished */
@media (max-width: 600px) {
    .dropdown-content-panel {
        position: static;
        transform: none;
        width: 100%;
        background-color: #222;
        box-shadow: none;
        border: none;
        margin-top: 5px;
    }
    .dropdown-menu-parent:hover .dropdown-content-panel {
        display: flex;
        flex-direction: column;
    }
}
/* Pagination buttons hover shifts styling rules declarations sets */
#pagination-controls button:not(:disabled):hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
}

.footer-notice {
    max-width: 850px;
    margin: 0 auto 25px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-notice i {
    color: #e50914;
    font-size: 18px;
    margin-top: 2px;
}

.footer-notice p {
    margin: 0;
    color: #999;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}
@media (max-width: 768px) {

    .footer-notice {
        padding: 14px;
        gap: 10px;
    }

    .footer-notice p {
        font-size: 12px;
        line-height: 1.6;
    }

    .footer-notice i {
        font-size: 16px;
    }
}