/**
 * CinemaHub Master Stylesheet
 * Complete 3-Theme Modes Engine (Dark, Light, System)
 * Form Contrast & Autofill Fixes, Sleek Typography & Responsive Layout
 */

/* ==========================================================================
   1. THEME VARIABLES (Dark Mode Default)
   ========================================================================== */
:root,
[data-bs-theme="dark"] {
    --theme-mode: dark;
    --bg-dark: #0a0c12;
    --bg-surface: #121622;
    --bg-card: #161b28;
    --bg-card-hover: #1e2436;
    --bg-input: #0f131f;
    --input-group-bg: #141926;
    --input-border: #2c364e;
    --input-focus-border: #e50914;
    --border-color: #242c3f;
    --border-subtle: #1c2333;
    
    --primary: #e50914;
    --primary-hover: #f40612;
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.25);
    --gold: #ffb703;
    
    --text-main: #f8fafc;
    --text-heading: #ffffff;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --label-color: #cbd5e1;
    
    --nav-bg: rgba(14, 17, 26, 0.94);
    --nav-border: #242c3f;
    --footer-bg: #0d1017;
    
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --modal-bg: #161b28;
    --dropdown-bg: #151a27;
    --dropdown-hover: rgba(255, 255, 255, 0.07);
    --ticker-bg: linear-gradient(90deg, #161b28 0%, #1e1124 100%);
}

/* ==========================================================================
   2. LIGHT THEME VARIABLES
   ========================================================================== */
[data-bs-theme="light"] {
    --theme-mode: light;
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    --input-group-bg: #f8fafc;
    --input-border: #cbd5e1;
    --input-focus-border: #e50914;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    --primary: #e50914;
    --primary-hover: #c7000b;
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.2);
    --gold: #b45309;
    
    --text-main: #0f172a;
    --text-heading: #090d16;
    --text-muted: #475569;
    --text-subtle: #64748b;
    --label-color: #0f172a;
    
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-border: #e2e8f0;
    --footer-bg: #ffffff;
    
    --card-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    --modal-bg: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-hover: #f1f5f9;
    --ticker-bg: linear-gradient(90deg, #ffffff 0%, #f1f5f9 100%);
}

/* ==========================================================================
   3. GLOBAL BASE STYLES
   ========================================================================== */
html {
    font-size: 13.5px;
    -webkit-text-size-adjust: 100%;
}

@media (min-width: 1200px) {
    html {
        font-size: 14px;
    }
}

/* Constrain ultra-wide stretching on large monitors */
.container-fluid.px-lg-5,
main > .container-fluid {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    .container-fluid.px-lg-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--accent);
}

/* ==========================================================================
   4. CARDS & CONTAINERS (Theme-Aware)
   ========================================================================== */
.card,
.bg-card,
.stat-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Auth Card Specific Styling */
.auth-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow) !important;
    border-radius: 16px;
}

.auth-card h1, .auth-card h2, .auth-card h3, .auth-card h4 {
    color: var(--text-heading) !important;
}

/* ==========================================================================
   5. FORM VISIBILITY & BROWSER AUTOFILL STYLING
   ========================================================================== */
.form-label,
label {
    color: var(--label-color) !important;
    font-weight: 500;
    font-size: 0.84rem;
    margin-bottom: 0.35rem;
    display: inline-block;
}

/* Inputs, selects, and textareas */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 8px;
    padding: 0.52rem 0.85rem;
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.18) !important;
    outline: none;
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--text-subtle) !important;
    opacity: 0.8;
}

/* Input Group Text (Icons & Prefixes) */
.input-group-text {
    background-color: var(--input-group-bg) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--input-border) !important;
    font-size: 0.88rem;
}

.input-group .input-group-text:first-child {
    border-right: none !important;
}

.input-group .form-control:not(:first-child) {
    border-left: none !important;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary) !important;
}

/* CRUCIAL FIX: Browser Autofill Override (-webkit-autofill)
   Eliminates Chrome/Edge blue/black/yellow broken patch */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    caret-color: var(--text-main) !important;
    border: 1px solid var(--input-border) !important;
    font-family: inherit !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* ==========================================================================
   6. NAVBAR & PROPORTIONS (Sleek, Not "Bada Bada")
   ========================================================================== */
.cinema-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.navbar-cinema {
    background: transparent;
    padding: 0.35rem 0;
    position: relative;
    border-bottom: none;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-heading) !important;
    padding: 0;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}

.brand-logo-emblem {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #e50914 0%, #b81d24 50%, #831010 100%);
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.navbar-brand:hover .brand-logo-emblem {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.brand-logo-emblem i {
    margin-left: 2px;
}

.brand-logo-text {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #ffffff;
    line-height: 1;
    display: flex;
    align-items: center;
}

[data-bs-theme="light"] .brand-logo-text {
    color: #111827;
}

.brand-logo-hub {
    color: #e50914;
    background: linear-gradient(135deg, #ff3848 0%, #e50914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    margin-left: 1px;
}

.brand-logo-sub {
    font-size: 0.54rem;
    letter-spacing: 1.6px;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1;
}

.brand-logo-badge {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    background: rgba(229, 9, 20, 0.15);
    color: #ff4757;
    border: 1px solid rgba(229, 9, 20, 0.35);
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 5px;
    text-transform: uppercase;
}

.navbar-nav {
    gap: 2px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.84rem;
    padding: 0.35rem 0.65rem !important;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.nav-link i {
    font-size: 0.8rem;
    opacity: 0.85;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-heading) !important;
    background: rgba(229, 9, 20, 0.08);
}

/* Header Search Input */
.cinema-header-search {
    background: transparent;
}

.cinema-header-search .nav-search-input {
    background: var(--bg-input, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.12));
    color: var(--text-main);
    font-size: 0.85rem;
}

.cinema-header-search .nav-search-input:focus {
    border-color: #e50914;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.22);
    background: var(--bg-card);
}

.nav-search-form {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.nav-search-form .input-group {
    flex-wrap: nowrap !important;
    display: flex !important;
}

/* Horizontal Scrollable Categories Navigation Bar ("logo ke niche scroll") */
.cinema-nav-scroll-bar {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

[data-bs-theme="light"] .cinema-nav-scroll-bar {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.08);
}

.cinema-nav-scroll-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.cinema-nav-scroll-inner {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cinema-nav-scroll-inner::-webkit-scrollbar {
    display: none;
}

.cinema-nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-bs-theme="light"] .cinema-nav-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #4b5563;
}

.cinema-nav-pill:hover {
    color: #ffffff;
    background: rgba(229, 9, 20, 0.15);
    border-color: rgba(229, 9, 20, 0.35);
}

[data-bs-theme="light"] .cinema-nav-pill:hover {
    color: #e50914;
    background: rgba(229, 9, 20, 0.08);
}

.cinema-nav-pill.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #e50914 0%, #b81d24 100%) !important;
    border-color: #e50914 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
}

.nav-search-input {
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
    font-size: 0.82rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.nav-search-form .btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Theme Toggle Button & Dropdown */
.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50% !important;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: transform 0.22s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-theme-toggle:hover,
.btn-theme-toggle:active {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-main);
    transform: scale(1.08); /* Gentle subtle zoom only - NO rotation, NO shaking */
}

.btn-theme-toggle::after {
    display: none !important;
}

/* Floating Theme Toast Indicator (~0.30s feedback on mode cycle) */
.theme-toast-badge {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    white-space: nowrap;
    z-index: 1060;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: 20px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transform-origin: center right;
    animation: toastSimpleZoom 0.18s ease forwards;
}

[data-bs-theme="light"] .theme-toast-badge {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

@keyframes toastSimpleZoom {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.theme-dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow) !important;
    border-radius: 10px;
}

.theme-dropdown-menu .dropdown-item {
    color: var(--text-main) !important;
    font-size: 0.84rem;
    border-radius: 6px;
    margin: 1px 4px;
    width: calc(100% - 8px);
    transition: background 0.15s ease;
}

.theme-dropdown-menu .dropdown-item:hover,
.theme-dropdown-menu .dropdown-item.active {
    background: var(--dropdown-hover) !important;
    color: var(--primary) !important;
}

/* ==========================================================================
   7. TICKER (Theme-Aware)
   ========================================================================== */
.cinema-ticker-wrap {
    background: var(--ticker-bg);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 36px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.ticker-heading {
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 0.85rem;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-anim 28s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 1.8rem;
    font-size: 0.82rem;
    color: var(--text-main);
}

@keyframes ticker-anim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   8. HERO SLIDER & INDEX PAGE PROPORTIONS
   ========================================================================== */
.hero-slider-section {
    position: relative;
    margin-bottom: 2rem;
    background: #000;
}

.hero-slide {
    position: relative;
    height: 370px;
    min-height: 330px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0b0f19;
}

/* Ambient colored glow: Fills entire slide with soft color atmospheric matching */
.hero-backdrop-ambient {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center 25%;
    filter: blur(45px) brightness(0.2) saturate(1.4);
    z-index: 1;
    transform: scale(1.15);
    pointer-events: none;
}

/* Main Artwork on Desktop: Reduced by ~30% (from 58% down to 42% width), top 5% shifted */
.hero-backdrop-artwork {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 42%;
    background-size: cover;
    background-position: center 5%;
    z-index: 2;
    pointer-events: none;
}

/* Seamless Left Gradient: Melts artwork smoothly into dark text section */
.hero-fade-left {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0b0f19 0%, #0b0f19 55%, rgba(11, 15, 25, 0.85) 68%, rgba(11, 15, 25, 0.15) 85%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

/* Seamless Bottom Gradient */
.hero-fade-bottom {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0b0f19 0%, rgba(11, 15, 25, 0.5) 25%, transparent 55%);
    z-index: 3;
    pointer-events: none;
}

/* Foreground Caption */
.hero-caption-wrap {
    position: relative;
    z-index: 4;
    max-width: 580px;
}

.hero-title {
    font-size: clamp(1.35rem, 2.3vw, 2.1rem);
    line-height: 1.2;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(0.82rem, 1.1vw, 1rem);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    max-width: 500px;
    margin-bottom: 1.2rem;
}

/* Tablet Media Breakpoint (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    .hero-slide {
        height: 340px;
        min-height: 310px;
    }
    .hero-backdrop-artwork {
        width: 48%;
        background-position: center 5%;
    }
    .hero-fade-left {
        background: linear-gradient(90deg, #0b0f19 0%, #0b0f19 48%, rgba(11, 15, 25, 0.85) 64%, rgba(11, 15, 25, 0.2) 80%, transparent 100%);
    }
    .hero-caption-wrap {
        max-width: 500px;
    }
}

/* Mobile View: 5% shifted down (faces clear) + bottom gradient */
@media (max-width: 768px) {
    .hero-slide {
        height: 320px;
        min-height: 290px;
        align-items: flex-end;
        padding-bottom: 1.8rem;
    }
    .hero-backdrop-artwork {
        width: 100%;
        background-position: center 5% !important;
    }
    .hero-fade-left {
        background: linear-gradient(0deg, #0b0f19 0%, rgba(11, 15, 25, 0.92) 50%, rgba(11, 15, 25, 0.35) 75%, transparent 100%);
    }
    .hero-caption-wrap {
        max-width: 100%;
    }
    .hero-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    .hero-subtitle {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.78rem !important;
        margin-bottom: 0.75rem !important;
    }
    .btn-cinema {
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .hero-slide {
        height: 300px;
        min-height: 280px;
        padding-bottom: 1.4rem;
    }
    .hero-backdrop-artwork {
        background-position: center 5% !important;
    }
}

/* ==========================================================================
   ANIMATED CINEMA 'Z' LOGO EMBLEM
   ========================================================================== */
.z-animated-emblem {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(145deg, #1f0407 0%, #0d0102 100%);
    border: 1.5px solid rgba(229, 9, 20, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(229, 9, 20, 0.55), inset 0 0 10px rgba(229, 9, 20, 0.35);
    animation: z-neon-pulse 2.8s ease-in-out infinite;
    cursor: pointer;
    flex-shrink: 0;
}

/* Diagonal Laser / Shimmer light sweep across the emblem */
.z-animated-emblem::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.7),
        rgba(255, 80, 80, 0.85),
        transparent
    );
    transform: rotate(25deg);
    animation: z-light-sweep 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 2;
    pointer-events: none;
}

/* Vector 'Z' Icon with breathing neon glow */
.z-icon-svg {
    width: 22px;
    height: 22px;
    z-index: 3;
    filter: drop-shadow(0 0 4px rgba(255, 30, 30, 0.8));
    animation: z-subtle-glow 2.8s ease-in-out infinite alternate;
}

@keyframes z-neon-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(229, 9, 20, 0.45), inset 0 0 8px rgba(229, 9, 20, 0.3);
        border-color: rgba(229, 9, 20, 0.75);
    }
    50% {
        box-shadow: 0 0 22px rgba(229, 9, 20, 0.95), 0 0 35px rgba(229, 9, 20, 0.45), inset 0 0 14px rgba(229, 9, 20, 0.6);
        border-color: #ff2535;
    }
}

@keyframes z-light-sweep {
    0% { left: -120%; }
    30% { left: 160%; }
    100% { left: 160%; }
}

@keyframes z-subtle-glow {
    0% {
        filter: drop-shadow(0 0 3px rgba(255, 50, 50, 0.8));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 8px rgba(255, 80, 80, 1)) drop-shadow(0 0 14px rgba(229, 9, 20, 0.7));
        transform: scale(1.05);
    }
}

.hero-carousel-btn {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    transition: all 0.25s ease;
    z-index: 5;
    background: transparent;
    border: none;
}

.hero-carousel-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.hero-carousel-btn.carousel-control-prev {
    left: 18px;
}

.hero-carousel-btn.carousel-control-next {
    right: 18px;
}

.hero-carousel-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
    transition: all 0.2s ease;
}

.hero-carousel-arrow:hover {
    background: rgba(229, 9, 20, 0.9);
    border-color: #e50914;
    color: #ffffff;
}

.hero-slider-section .carousel-indicators [data-bs-target] {
    width: 22px;
    height: 4px;
    border-radius: 4px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.35);
    margin: 0 4px;
    transition: all 0.3s ease;
}

.hero-slider-section .carousel-indicators .active {
    width: 32px;
    background-color: #e50914;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,12,18,0.95) 0%, rgba(10,12,18,0.7) 40%, rgba(0,0,0,0.15) 75%),
                linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 65%);
}

.hero-caption {
    position: relative;
    z-index: 2;
    max-width: 580px;
}

.hero-caption h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff !important;
}

.hero-caption p {
    font-size: 0.96rem;
    color: #e2e8f0 !important;
}

.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   9. MOVIE & PRODUCT CARDS (Theme-Aware)
   ========================================================================== */
.movie-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--card-shadow);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25), 0 0 15px var(--accent-glow);
    border-color: var(--accent);
}

.movie-card-thumb {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0e121a;
}

.movie-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover .movie-card-thumb img {
    transform: scale(1.05);
}

.movie-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 3;
}

.movie-badges .badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.movie-rating-badge {
    position: absolute;
    bottom: 6px !important;
    right: 6px !important;
    top: auto !important;
    height: auto !important;
    max-height: 24px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.38rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(255, 183, 3, 0.3);
    z-index: 3;
}

/* ==========================================================================
   CINEMA COVER POSTER RED BORDER & GLOW EFFECT
   ========================================================================== */
.cinema-cover-poster {
    border: 3px solid #e50914 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(229, 9, 20, 0.45), 0 0 15px rgba(229, 9, 20, 0.35) !important;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    background: #000;
}

.cinema-cover-poster:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 40px rgba(229, 9, 20, 0.65), 0 0 25px rgba(229, 9, 20, 0.5) !important;
    border-color: #ff222f !important;
}

.cinema-cover-poster img {
    border-radius: 10px;
    display: block;
    width: 100%;
}

.movie-card-body {
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--text-heading);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-card-title {
    color: var(--primary);
}

.movie-card-meta {
    font-size: 0.70rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0.35rem;
}

.movie-card-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border-subtle);
}

.price-text {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--accent);
}

.price-free {
    color: #10b981;
    font-weight: 700;
    font-size: 0.74rem;
}

/* ==========================================================================
   10. BUTTONS & UI CONTROLS
   ========================================================================== */
.btn-cinema {
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 1.15rem;
    border: none;
    transition: all 0.2s ease;
}

.btn-cinema:hover {
    background: var(--primary-hover);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.35);
}

.btn-cinema-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.45rem 1.15rem;
    transition: all 0.2s ease;
}

.btn-cinema-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-heading);
}

/* ==========================================================================
   11. FOOTER (Theme-Aware)
   ========================================================================== */
.cinema-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 2.5rem 0 1.5rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.visitor-badge {
    background: rgba(125, 125, 125, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
}

/* ==========================================================================
   12. SECTION HEADERS & ACCENTS
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-left: 3.5px solid var(--primary);
    padding-left: 0.75rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-heading);
}

/* ==========================================================================
   13. LIGHT THEME OVERRIDES (High-Contrast Readability)
   ========================================================================== */

/* 1. Hero Slider Section - PURE WHITE HIGH CONTRAST (Never turn dark) */
.hero-slider-section,
.hero-slide,
.hero-caption {
    color: #ffffff !important;
}
.hero-caption h1,
.hero-caption .hero-title,
.hero-slide .hero-title,
[data-bs-theme="light"] .hero-caption h1,
[data-bs-theme="light"] .hero-caption .hero-title,
[data-bs-theme="light"] .hero-slide .hero-title,
[data-bs-theme="light"] .hero-slide h1,
[data-bs-theme="light"] .hero-slide .text-white {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9) !important;
}
.hero-caption p,
.hero-caption .hero-desc,
.hero-slide .hero-desc,
[data-bs-theme="light"] .hero-caption p,
[data-bs-theme="light"] .hero-caption .hero-desc,
[data-bs-theme="light"] .hero-slide .hero-desc,
[data-bs-theme="light"] .hero-slide p,
[data-bs-theme="light"] .hero-slide .text-light {
    color: #f8fafc !important;
    opacity: 0.95 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85) !important;
}
.hero-slide .btn-cinema-outline,
[data-bs-theme="light"] .hero-slide .btn-cinema-outline {
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(6px);
}
.hero-slide .btn-cinema-outline:hover,
[data-bs-theme="light"] .hero-slide .btn-cinema-outline:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}
.hero-badge,
[data-bs-theme="light"] .hero-badge {
    color: #ffffff !important;
}

/* 2. Festival Offer Banner - Vibrant Ruby Red with Crisp White Text */
.cinema-festival-banner {
    background: linear-gradient(135deg, #e50914 0%, #b81d24 50%, #4a0d13 100%) !important;
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.28) !important;
    color: #ffffff !important;
}
.cinema-festival-banner .festival-title,
.cinema-festival-banner h5,
[data-bs-theme="light"] .cinema-festival-banner .festival-title,
[data-bs-theme="light"] .cinema-festival-banner h5 {
    color: #ffffff !important;
}
.cinema-festival-banner .festival-desc,
.cinema-festival-banner p,
[data-bs-theme="light"] .cinema-festival-banner .festival-desc,
[data-bs-theme="light"] .cinema-festival-banner p {
    color: #ffe4e6 !important;
}

/* 3. Global Text Overrides for Light Mode */
[data-bs-theme="light"] .text-white:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.hero-badge):not(.hero-slide *):not(.hero-caption *):not(.cinema-festival-banner *):not(.countdown-box *):not(.theme-toast-badge *):not(.movie-badges *):not(.movie-rating-badge *) {
    color: #0f172a !important;
}

[data-bs-theme="light"] .text-light:not(.hero-slide *):not(.hero-caption *):not(.cinema-festival-banner *):not(.countdown-box *):not(.btn *):not(.badge *) {
    color: #334155 !important;
}

[data-bs-theme="light"] .text-muted:not(.hero-slide *):not(.hero-caption *):not(.cinema-festival-banner *) {
    color: #475569 !important;
}

/* 4. Headings & Titles in Light Mode */
[data-bs-theme="light"] h1:not(.hero-slide *):not(.cinema-festival-banner *),
[data-bs-theme="light"] h2:not(.hero-slide *):not(.cinema-festival-banner *),
[data-bs-theme="light"] h3:not(.hero-slide *):not(.cinema-festival-banner *),
[data-bs-theme="light"] h4:not(.hero-slide *):not(.cinema-festival-banner *),
[data-bs-theme="light"] h5:not(.hero-slide *):not(.cinema-festival-banner *):not(.festival-title),
[data-bs-theme="light"] h6:not(.hero-slide *):not(.cinema-festival-banner *) {
    color: #0f172a !important;
}

[data-bs-theme="light"] .section-title {
    color: #090d16 !important;
}

[data-bs-theme="light"] .movie-card-title a {
    color: #0f172a !important;
}
[data-bs-theme="light"] .movie-card-title a:hover {
    color: #e50914 !important;
}
[data-bs-theme="light"] .movie-card-meta {
    color: #475569 !important;
}
[data-bs-theme="light"] .price-text {
    color: #b45309 !important;
    font-weight: 700;
}
[data-bs-theme="light"] .price-free {
    color: #059669 !important;
    font-weight: 700;
}

/* 5. Buttons & Controls in Light Mode */
[data-bs-theme="light"] .btn-cinema-outline:not(.hero-slide *) {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}
[data-bs-theme="light"] .btn-cinema-outline:not(.hero-slide *):hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* 6. Form Controls in Light Mode */
[data-bs-theme="light"] .form-label {
    color: #0f172a !important;
    font-weight: 600;
}
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    border-color: #e50914 !important;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15) !important;
}
[data-bs-theme="light"] .form-control::placeholder {
    color: #64748b !important;
    opacity: 1;
}

/* 7. Category Pills in Light Mode */
[data-bs-theme="light"] .cinema-nav-scroll-bar {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
[data-bs-theme="light"] .cinema-nav-pill {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b !important;
    font-weight: 600;
}
[data-bs-theme="light"] .cinema-nav-pill:hover {
    color: #e50914 !important;
    background: #fee2e2;
    border-color: #fca5a5;
}
[data-bs-theme="light"] .cinema-nav-pill.active {
    background: #e50914 !important;
    border-color: #e50914 !important;
    color: #ffffff !important;
}

/* 8. Breadcrumbs in Light Mode */
[data-bs-theme="light"] .breadcrumb-item {
    color: #475569;
}
[data-bs-theme="light"] .breadcrumb-item a {
    color: #475569;
}
[data-bs-theme="light"] .breadcrumb-item a:hover {
    color: #e50914;
}
[data-bs-theme="light"] .breadcrumb-item.active {
    color: #0f172a !important;
    font-weight: 600;
}

/* 9. Cards & Containers in Light Mode */
[data-bs-theme="light"] .bg-dark:not(.badge):not(.hero-slide *):not(.cinema-festival-banner *):not(.countdown-box *):not(.theme-toast-badge *) {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

[data-bs-theme="light"] .border-secondary {
    border-color: #e2e8f0 !important;
}

[data-bs-theme="light"] .table-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .table-dark th {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
}

[data-bs-theme="light"] .table-dark td {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #f1f5f9 !important;
}

[data-bs-theme="light"] .modal-content {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-bs-theme="light"] .search-dropdown-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

[data-bs-theme="light"] .search-dropdown-item:hover {
    background: #f1f5f9;
}

[data-bs-theme="light"] .admin-filter-bar {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* 10. Footer in Light Mode */
[data-bs-theme="light"] .cinema-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0;
}
[data-bs-theme="light"] .cinema-footer .footer-title {
    color: #0f172a !important;
    font-weight: 700;
}
[data-bs-theme="light"] .cinema-footer .footer-links a {
    color: #475569 !important;
}
[data-bs-theme="light"] .cinema-footer .footer-links a:hover {
    color: #e50914 !important;
}
[data-bs-theme="light"] .cinema-footer .text-muted {
    color: #475569 !important;
}
[data-bs-theme="light"] .visitor-badge {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ==========================================================================
   14. LIVE SEARCH DROPDOWN
   ========================================================================== */
.search-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
}

.search-dropdown-item {
    background: transparent;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-dropdown-item:hover,
.search-dropdown-item.selected {
    background: var(--dropdown-hover);
}

/* ==========================================================================
   15. CINEMA HTML5 PLAYER (Preserves Cinema Dark Backdrop)
   ========================================================================== */
.cinema-player-wrapper {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.cinema-player-wrapper.theater-mode {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-height: 82vh;
    border-radius: 0;
}

.cinema-player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #08080a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cinema-player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.9);
    color: #fff;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.6);
    transition: transform 0.2s ease, opacity 0.3s ease;
    z-index: 10;
}

.player-big-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ff1e2b;
}

.player-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    padding: 12px 18px 8px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cinema-player-wrapper.controls-hidden .player-controls-bar {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.player-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.15s ease;
}

.player-progress-bar:hover {
    height: 8px;
}

.player-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.45);
    border-radius: 4px;
}

.player-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.player-ctrl-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.player-ctrl-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.player-volume-slider {
    width: 80px;
    height: 5px;
    accent-color: var(--primary);
    cursor: pointer;
}

.player-time-display {
    font-size: 0.82rem;
    font-family: monospace;
    color: #ddd;
    margin-left: 6px;
}

.player-speed-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

/* Locked Player Screen */
.player-locked-screen {
    position: relative;
    width: 100%;
    min-height: 380px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0e12;
    padding: 1.5rem 1rem;
    border-radius: 16px;
}

.player-locked-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) brightness(0.3);
}

.player-locked-card {
    position: relative;
    z-index: 5;
    background: rgba(18, 18, 24, 0.88);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 2rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .player-locked-screen {
        aspect-ratio: auto;
        min-height: 350px;
        padding: 1.25rem 0.75rem;
    }
    .player-locked-card {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }
}

/* ==========================================================================
   17. HIGH-CONTRAST FLASH ALERTS (Dark & Light Modes)
   ========================================================================== */
.alert {
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 0.85rem 1.15rem !important;
    border-width: 1.5px !important;
}

/* Dark Mode Alerts (Crystal-Clear White Text on Rich Deep Badges) */
:root .alert-danger,
[data-bs-theme="dark"] .alert-danger {
    background-color: #3b1219 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}
:root .alert-danger .fas,
[data-bs-theme="dark"] .alert-danger .fas {
    color: #f87171 !important;
}

:root .alert-success,
[data-bs-theme="dark"] .alert-success {
    background-color: #0d2e1b !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}
:root .alert-success .fas,
[data-bs-theme="dark"] .alert-success .fas {
    color: #34d399 !important;
}

:root .alert-warning,
[data-bs-theme="dark"] .alert-warning {
    background-color: #3d2605 !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}
:root .alert-warning .fas,
[data-bs-theme="dark"] .alert-warning .fas {
    color: #fbbf24 !important;
}

:root .alert-info,
[data-bs-theme="dark"] .alert-info {
    background-color: #0c2c47 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
}
:root .alert-info .fas,
[data-bs-theme="dark"] .alert-info .fas {
    color: #38bdf8 !important;
}

:root .alert .btn-close,
[data-bs-theme="dark"] .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

/* Light Mode Alerts */
[data-bs-theme="light"] .alert-danger {
    background-color: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #991b1b !important;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.08);
}
[data-bs-theme="light"] .alert-danger .fas {
    color: #dc2626 !important;
}

[data-bs-theme="light"] .alert-success {
    background-color: #f0fdf4 !important;
    border-color: #4ade80 !important;
    color: #166534 !important;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.08);
}
[data-bs-theme="light"] .alert-success .fas {
    color: #16a34a !important;
}

[data-bs-theme="light"] .alert-warning {
    background-color: #fffbeb !important;
    border-color: #fcd34d !important;
    color: #92400e !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}
[data-bs-theme="light"] .alert-warning .fas {
    color: #d97706 !important;
}

[data-bs-theme="light"] .alert-info {
    background-color: #f0f9ff !important;
    border-color: #7dd3fc !important;
    color: #075985 !important;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.08);
}
[data-bs-theme="light"] .alert-info .fas {
    color: #0284c7 !important;
}

[data-bs-theme="light"] .alert .btn-close {
    filter: none;
    opacity: 0.7;
}

/* ==========================================================================
   14. HORIZONTAL SCROLL TRAYS & DISCOVERY GRIDS
   ========================================================================== */
.cinema-scroll-tray {
    display: flex;
    overflow-x: auto;
    gap: 0.85rem;
    padding: 0.4rem 0.2rem 1rem 0.2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.cinema-scroll-tray::-webkit-scrollbar {
    height: 5px;
}
.cinema-scroll-tray::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.cinema-scroll-tray::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}
.cinema-scroll-tray > .scroll-card-col {
    flex: 0 0 160px;
    max-width: 160px;
    scroll-snap-align: start;
}
.cinema-scroll-tray > .scroll-card-product {
    flex: 0 0 155px;
    max-width: 155px;
    scroll-snap-align: start;
}
.cinema-scroll-tray > .scroll-card-wide {
    flex: 0 0 215px;
    max-width: 215px;
    scroll-snap-align: start;
}
@media (max-width: 768px) {
    .cinema-scroll-tray {
        gap: 0.65rem;
    }
    .cinema-scroll-tray > .scroll-card-col {
        flex: 0 0 125px;
        max-width: 125px;
    }
    .cinema-scroll-tray > .scroll-card-product {
        flex: 0 0 120px;
        max-width: 120px;
    }
    .cinema-scroll-tray > .scroll-card-wide {
        flex: 0 0 165px;
        max-width: 165px;
    }
}

/* Mobile 3-Card Grid & Compact Cards */
@media (max-width: 576px) {
    .movie-card-thumb {
        aspect-ratio: 2 / 3;
    }
    .movie-card-body {
        padding: 0.45rem !important;
    }
    .movie-card-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.15rem !important;
        -webkit-line-clamp: 1 !important;
    }
    .movie-card-meta {
        font-size: 0.65rem !important;
        gap: 3px !important;
        margin-bottom: 0.25rem !important;
    }
    .price-text, .price-free {
        font-size: 0.75rem !important;
    }
    .movie-card-price {
        padding-top: 0.25rem !important;
    }
    .movie-card-price .btn {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.68rem !important;
    }
    .movie-badges {
        top: 4px !important;
        left: 4px !important;
        gap: 2px !important;
    }
    .movie-badges .badge {
        font-size: 0.55rem !important;
        padding: 0.15em 0.35em !important;
    }
    .movie-rating-badge {
        top: auto !important;
        bottom: 4px !important;
        right: 4px !important;
        height: auto !important;
        max-height: 20px !important;
        font-size: 0.58rem !important;
        padding: 0.08rem 0.28rem !important;
        line-height: 1 !important;
    }
}
.countdown-box {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}
.countdown-item {
    text-align: center;
    min-width: 34px;
}
.countdown-num {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: #facc15;
    font-family: 'Poppins', sans-serif;
}
.countdown-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Responsive Episode Card Actions */
@media (max-width: 576px) {
    .episode-actions-wrapper {
        width: 100%;
    }
    .episode-actions-wrapper .btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.65rem;
    }
}

/* ==========================================================================
   15. OTT COMPACT SYSTEM SCALE & ZOOM (Header & Footer Excluded)
   ========================================================================== */
main.flex-grow-1 {
    zoom: 0.90;
}
@media (min-width: 1400px) {
    main.flex-grow-1 {
        zoom: 0.88;
    }
}
@media (max-width: 768px) {
    main.flex-grow-1 {
        zoom: 0.95;
    }
}

/* ==========================================================================
   16. CINEMA SCREEN PLAYER SIZING & 3-SHIELD ANTI-DOWNLOAD PROTECTION
   ========================================================================== */
.cinema-player-cinema-box {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    width: 100%;
}

/* Google Drive Embed Specific Alignment (Hides Google Drive's top 54px header bar & centers video) */
.gdrive-player-box {
    position: relative;
    overflow: hidden !important;
}

.gdrive-player-box .gdrive-iframe {
    position: absolute;
    top: -54px;
    left: 0;
    width: 100%;
    height: calc(100% + 54px);
    border: 0;
}

/* 1. Top Shield: Covers 0 to 60px on desktop (Blocks file title and Google Drive Pop-out/Download icon) */
.player-shield-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 25;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* 2. Left Edge Shield: Covers left 14% on desktop */
.player-shield-left {
    position: absolute;
    top: 60px;
    bottom: 52px;
    left: 0;
    width: 14%;
    z-index: 25;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* 3. Right Edge Shield: Covers right 14% on desktop */
.player-shield-right {
    position: absolute;
    top: 60px;
    bottom: 52px;
    right: 0;
    width: 14%;
    z-index: 25;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* Mobile Responsive Optimizations for Cinema Player (max-width: 768px) */
@media (max-width: 768px) {
    .cinema-player-cinema-box {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .cinema-player-cinema-box .ratio-16x9 {
        --bs-aspect-ratio: 56.25%;
        border-radius: 12px !important;
    }

    /* On mobile: Keep iframe perfectly centered 100% so movie is NOT cut off and play button is centered */
    .gdrive-player-box .gdrive-iframe {
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Top shield on mobile: Covers top 42px to block Google Drive header / file title */
    .player-shield-top {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 42px !important;
        z-index: 25 !important;
        background: transparent !important;
        pointer-events: auto !important;
        cursor: default !important;
    }

    /* Dedicated top-right corner shield on mobile: Sleek black patch completely hiding & blocking the pop-out icon */
    .player-shield-right {
        top: 0 !important;
        right: 0 !important;
        width: 58px !important;
        height: 44px !important;
        bottom: auto !important;
        z-index: 26 !important;
        background: #000000 !important;
        pointer-events: auto !important;
        cursor: default !important;
    }

    /* Remove left shield on mobile so full width is available for center play/pause touch */
    .player-shield-left {
        display: none !important;
    }

    .player-demo-play-btn {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.4rem !important;
    }

    .player-demo-label {
        font-size: 0.76rem !important;
        padding: 5px 12px !important;
    }

    .player-demo-content {
        gap: 10px !important;
        padding: 0.5rem !important;
    }

    .player-demo-cover {
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        inset: 0 !important;
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #000000 !important;
    }
}

/* ==========================================================================
   CINEMA SCREEN DEMO PREVIEW COVER OVERLAY WITH GLOWING PLAY BUTTON
   ========================================================================== */
.player-demo-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: 30;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.player-demo-cover.playing {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.player-demo-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(10, 12, 18, 0.92) 100%);
    pointer-events: none;
}

.player-demo-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 1rem;
}

.player-demo-play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 32px rgba(229, 9, 20, 0.85), 0 6px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    padding-left: 5px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    animation: playerDemoPulse 2.4s infinite ease-in-out;
}

.player-demo-cover:hover .player-demo-play-btn {
    transform: scale(1.15);
    box-shadow: 0 0 45px rgba(229, 9, 20, 1), 0 8px 25px rgba(0, 0, 0, 0.9);
    border-color: #ffffff;
}

.player-demo-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.player-demo-label {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.4px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

@keyframes playerDemoPulse {
    0% { transform: scale(1); box-shadow: 0 0 22px rgba(229, 9, 20, 0.75); }
    50% { transform: scale(1.06); box-shadow: 0 0 40px rgba(229, 9, 20, 1); }
    100% { transform: scale(1); box-shadow: 0 0 22px rgba(229, 9, 20, 0.75); }
}



