/* css/style.css - Ultra Premium Cyber-Cinematic v3 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #050505;
    --bg-gradient: radial-gradient(circle at top center, #1a0b0b 0%, #050505 60%);
    --card-bg: #111;
    --text-color: #ffffff;
    --text-muted: #a3a3a3;
    --primary-color: #e50914;
    /* Netflix Red */
    --primary-glow: rgba(229, 9, 20, 0.6);
    --secondary-color: #46d369;
    /* Success Green for badges */
    --nav-bg: rgba(5, 5, 5, 0.85);
    --border-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy 3D feel */
    --container-width: 1400px;
    --neon-glow: 0 0 20px var(--primary-glow);
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--border-radius);
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    /* Larger buttons */
    background: linear-gradient(90deg, var(--primary-color), #b00610);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: 0.6s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.7);
}

.btn:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 60px 0 30px;
    padding-left: 20px;
    border-left: 5px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

/* Header & Glassmorphism */
header {
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

.logo span {
    color: white;
}

.nav-links {
    display: flex;
    gap: 15px;
    /* Reduced gap from 25px */
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    color: #ccc;
    padding: 5px 8px;
    /* Added padding for better click area */
    transition: all 0.3s ease;
    white-space: nowrap;
    /* Prevent wrapping */
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    text-shadow: 0 0 10px white;
}

/* Dropdown Menu */
.dropdown-trigger {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    border-radius: 8px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dropdown-trigger:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
}

.dropdown-menu li a {
    display: block;
    padding: 10px;
    border-radius: 5px;
    color: #bbb;
}

.dropdown-menu li a:hover {
    background: var(--primary-color);
    color: white;
}


.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 25px;
    border-radius: 50px;
    color: white;
    width: 250px;
    transition: var(--transition);
}

.search-input:focus {
    width: 350px;
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    outline: none;
}

.search-form .btn {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    padding: 0;
}

/* HERO SLIDER (3D & Parallax) */
.hero-slider-container {
    height: 85vh;
    width: 100%;
    position: relative;
    margin-bottom: 40px;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    /* Fade out bottom */
}

.heroSwiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #050505 0%, rgba(5, 5, 5, 0.8) 40%, rgba(5, 5, 5, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding-left: 20px;
    perspective: 1000px;
    /* For 3D text */
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform-style: preserve-3d;
    transform: translateZ(50px);
    /* Pop out */
    color: #fff;
}

.hero-meta {
    font-size: 1.3rem;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    color: #ddd;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.hero-desc {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 35px;
    max-width: 700px;
    line-height: 1.5;
    text-shadow: 0 2px 4px black;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn-lg {
    padding: 18px 45px;
    font-size: 1.1rem;
    border-radius: 10px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* GENRE PILLS (Neon Capsules) */
.genre-pills-container {
    position: sticky;
    top: 75px;
    z-index: 900;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), transparent);
    pointer-events: none;
    /* Let clicks pass through gaps */
}

.genre-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    pointer-events: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.genre-scroll::-webkit-scrollbar {
    display: none;
}

.genre-pill {
    padding: 10px 20px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.genre-pill:hover,
.genre-pill.active {
    background: white;
    color: black;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
    border-color: white;
}

.genre-pill.glow {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.genre-pill.glow:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 25px var(--primary-color);
}

/* ROBOT SECTION (Holographic Card) */
.robot-banner {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
}

.robot-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.15) 0%, transparent 60%);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.robot-content {
    position: relative;
    z-index: 2;
}

.robot-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.robot-actions {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.robot-mood-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.robot-mood-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 0 20px var(--primary-color);
}

/* MOVIE CARDS (The Star Show) */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Bigger cards */
    gap: 30px;
    padding: 20px 0;
}

.movie-card {
    position: relative;
    border-radius: 16px;
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Smart Badges */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.badge-quality,
.badge-lang {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.badge-quality {
    background: var(--primary-color);
    color: white;
}

.badge-quality.uhd {
    background: #b20710;
    box-shadow: 0 0 10px #b20710;
}

.badge-lang {
    background: rgba(255, 255, 255, 0.9);
    color: black;
}

/* Card Hover Effects */
.movie-card:hover {
    z-index: 100;
}

.movie-card:hover .movie-poster {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 9, 20, 0.4);
}

.movie-info {
    padding-top: 15px;
    transition: 0.3s;
}

.movie-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: white;
}

.movie-meta {
    opacity: 0.7;
    font-size: 0.9rem;
}

.card-hover-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 11;
}

.movie-card:hover .card-hover-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1.1);
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.2);
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        /* More space for content */
    }

    .hero-title {
        font-size: 2rem;
        /* Better fit */
    }

    .hero-slider-container {
        height: 60vh;
        /* Not full height on mobile */
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Fix Genre Pills Overflow */
    .genre-pills-container {
        top: 60px;
        /* Adjust for mobile header */
        padding: 10px 0;
    }

    .genre-scroll {
        padding-bottom: 0;
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
        /* Fade effect */
    }

    /* 2 col mobile */
    .robot-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }

    .section-title {
        font-size: 1.3rem;
        margin: 30px 0 15px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        padding-left: 20px;
        transform: none;
        display: none;
    }

    .dropdown-trigger:hover .dropdown-menu {
        display: block;
    }

    /* Sidebar Mobile Logic */
    .sidebar-mobile-toggle {
        display: block !important;
        width: 100%;
        margin-top: 20px;
        /* Space from header */
        margin-bottom: 20px;
        background: #222;
        border: 1px solid #333;
        color: white;
        padding: 15px;
        border-radius: 8px;
        font-weight: bold;
        text-align: center;
        cursor: pointer;
        position: relative;
        z-index: 100;
        /* Ensure clickable */
        -webkit-tap-highlight-color: transparent;
        /* Fix touch highlight */
    }

    .sidebar-mobile-toggle:active {
        transform: scale(0.98);
    }

    .sidebar-mobile-toggle i {
        margin-right: 10px;
        color: var(--primary-color);
    }

    .sidebar {
        display: none;
        /* Hidden by default on mobile */
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 10001;
        /* Above EVERYTHING */
        overflow-y: auto;
        padding: 20px;
        padding-top: 60px;
        /* Space for close btn */
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        display: block;
        animation: slideIn 0.3s ease-out;
    }

    @keyframes slideIn {
        from {
            transform: translateX(-100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .sidebar-close-btn {
        display: block !important;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: #222;
        border-radius: 50%;
        border: 1px solid #333;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 10002;
    }
}

/* Mega Menu Styles */
.mega-menu {
    min-width: 500px !important;
    padding: 20px !important;
}

.mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.mega-grid a {
    font-size: 0.9rem !important;
    padding: 5px !important;
    color: #bbb !important;
    transition: 0.2s;
    border-radius: 4px;
}

.mega-grid a:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Responsive Mega Menu */
@media (max-width: 768px) {
    .mega-menu {
        min-width: 100% !important;
    }

    .mega-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer & Player (Keeping existing useful styles) */
footer {
    background: #080808;
    padding: 60px 0;
    border-top: 1px solid #222;
    margin-top: 80px;
    text-align: center;
}

.player-wrapper {
    max-width: 1200px;
    margin: -80px auto 40px;
    border-radius: 12px;
    overflow: hidden;
    background: black;
    box-shadow: 0 20px 50px black;
    position: relative;
    z-index: 50;
}

.player-tabs {
    background: #111;
    padding: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.player-tab {
    background: #222;
    color: #aaa;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.player-tab.active {
    background: var(--primary-color);
    color: white;
}

/* ROBOT & SCI-FI UI */
.robot-interface-wrapper {
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
    min-height: 100vh;
    border-top: 1px solid #333;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.neon-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    letter-spacing: 5px;
}

.dashboard-header p {
    color: #888;
    font-size: 1.1rem;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* Cockpit Panel */
.cockpit-panel {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 100px rgba(229, 9, 20, 0.05);
    position: relative;
    overflow: hidden;
}

.cockpit-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scanline 3s infinite linear;
}

.cockpit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.full-width {
    grid-column: 1 / -1;
}

.control-label {
    display: block;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Mood Cards */
.mood-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.mood-card input {
    display: none;
}

.mood-inner {
    background: #1a1a20;
    border: 1px solid #333;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.mood-card .emoji {
    font-size: 2rem;
    margin-bottom: 5px;
    display: block;
}

.mood-card .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #aaa;
}

.mood-card input:checked+.mood-inner {
    background: rgba(229, 9, 20, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
    transform: translateY(-5px);
}

.mood-card input:checked+.mood-inner .name {
    color: white;
}

/* HUD Inputs */
.hud-select {
    width: 100%;
    background: #111;
    border: 1px solid #444;
    color: white;
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

.hud-select:focus {
    border-color: var(--primary-color);
}

.range-wrapper {
    background: #1a1a20;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #333;
}

.range-wrapper span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    justify-content: space-between;
}

.hud-range {
    width: 100%;
    accent-color: var(--primary-color);
}

/* Submit Button */
.hud-submit-btn {
    width: 100%;
    background: linear-gradient(45deg, #e50914, #b20710);
    border: none;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

.hud-submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.6);
}

/* AI Overlay */
.ai-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.ai-scanner {
    text-align: center;
}

.ai-circle {
    width: 100px;
    height: 100px;
    border: 5px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s infinite linear;
}

.ai-text {
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
    animation: blink 0.5s infinite;
}

.ai-code {
    font-family: monospace;
    color: var(--primary-color);
    text-align: left;
    background: #111;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    width: 300px;
}

.ai-code span {
    display: block;
    margin-bottom: 5px;
    opacity: 0;
    animation: typeIn 0.2s forwards;
}

.ai-code span:nth-child(1) {
    animation-delay: 0.2s;
}

.ai-code span:nth-child(2) {
    animation-delay: 0.8s;
}

.ai-code span:nth-child(3) {
    animation-delay: 1.5s;
}

.ai-code span:nth-child(4) {
    animation-delay: 2.2s;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

@keyframes scanline {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes typeIn {
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .cockpit-grid {
        grid-template-columns: 1fr;
    }

    .neon-title {
        font-size: 2rem;
    }
}

/* SIDEBAR & LAYOUT SYSTEM */
.page-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Default hidden on desktop */
.sidebar-mobile-toggle,
.sidebar-close-btn {
    display: none;
}

/* ... rest of sidebar css ... */

.main-content {
    flex: 1;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #111;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #222;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-widget-mini form {
    display: flex;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
}

.search-widget-mini input {
    background: transparent;
    border: none;
    color: white;
    padding: 12px;
    width: 100%;
    outline: none;
}

.search-widget-mini button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 0.95rem;
    padding: 5px 0;
    transition: 0.2s;
}

.category-list a:hover {
    color: white;
    transform: translateX(5px);
}

.cat-dot {
    width: 8px;
    height: 8px;
    background: #444;
    border-radius: 50%;
}

.category-list a:hover .cat-dot {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 0.85rem;
    background: #222;
    color: #aaa;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #333;
    transition: 0.2s;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.year-tag {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 8px 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.year-tag:hover {
    background: white;
    color: black;
}

/* Comments Widget */
.recent-comments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #777;
}

.comment-content {
    flex: 1;
}

.comment-user {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.comment-movie {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

.comment-content p {
    color: #ddd;
    line-height: 1.3;
    font-style: italic;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .page-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

/* =========================================
   CHE-STYLE ULTIMATE FOOTER
   ========================================= */
.che-footer {
    background: #020202;
    padding: 80px 0 30px;
    margin-top: 100px;
    position: relative;
    border-top: 1px solid #111;
    overflow: hidden;
    font-size: 0.9rem;
    text-align: left;
    /* FORCE LEFT ALIGNMENT */
}

/* Background Particle/Star Effect Simulator */
.che-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    background-position: 0 0, 20px 20px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1.2fr;
    /* Balanced Columns */
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    z-index: 1;
}

/* Brand Column */
.footer-logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.footer-logo-text span {
    background: linear-gradient(to right, var(--primary-color), #ff4b5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-desc {
    color: #888;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 90%;
}

/* Stats Box */
.footer-stats {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    /* Left align stats */
}

.stat-box {
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 80px;
    transition: 0.3s;
}

.stat-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.2);
}

.stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    /* Reference uses purple, we use white/red */
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
}

/* Columns */
.footer-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6c757d;
    /* Muted uppercase header like reference */
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.footer-nav {
    padding-left: 0;
    /* Remove default list padding */
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.footer-nav a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-nav i {
    color: var(--primary-color);
    font-size: 0.8rem;
    width: 20px;
    text-align: center;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.newsletter-form input {
    background: #111;
    border: 1px solid #222;
    padding: 12px 15px;
    border-radius: 8px;
    color: white;
    width: 100%;
    outline: none;
    transition: 0.3s;
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
}

.newsletter-form button {
    background: linear-gradient(45deg, var(--primary-color), #b20710);
    border: none;
    width: 50px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

/* Social Grid */
.social-grid {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.social-grid a {
    width: 40px;
    height: 40px;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: 0.3s;
}

.social-grid a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #555;
    font-size: 0.85rem;
}

.footer-bottom-links a:hover {
    color: white;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .brand-col {
        grid-column: 1 / -1;
        text-align: center;
        /* Center only on mobile */
    }

    .footer-desc {
        margin: 0 auto 30px;
    }

    .footer-stats {
        justify-content: center;
    }

    .footer-heading {
        text-align: center;
    }

    .footer-nav a {
        justify-content: center;
    }

    .social-grid {
        justify-content: center;
    }

    .che-footer {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
        padding: 12px;
    }

    .social-grid {
        justify-content: center;
    }

    .footer-nav a {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}