/* CSS Custom Variables & Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --brand-blue: #2E9BF0;
    --brand-blue-glow: rgba(46, 155, 240, 0.4);
    --bg-main: #0A0A0A;
    --bg-sec: #141414;
    --card-bg: #1C1C1E;
    --card-bg-hover: #232326;
    --text-sec: #A0A0A5;
}

/* General Resets & Configuration */
body {
    background-color: var(--bg-main);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Condensed Titles */
.font-condensed {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--brand-blue);
}

/* Hide Scrollbars entirely but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Glassmorphism Header Blur */
.header-scrolled {
    background-color: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .header-scrolled {
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }
}

/* Linear Gradient Masks for Carousels */
.mask-right {
    position: relative;
}

/* Custom progress bar gradient */
.progress-bar-gradient {
    background: linear-gradient(90deg, #E63946 0%, #F4A83B 100%);
}

/* Card Hover Zoom & Glow Effect */
.movie-card {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
    will-change: transform, box-shadow;
}

.movie-card:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 12px 30px var(--brand-blue-glow);
    border-color: rgba(46, 155, 240, 0.3);
    z-index: 10;
}

/* Wide Cards layout styling */
.wide-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
    will-change: transform, box-shadow;
}

.wide-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(46, 155, 240, 0.25);
    border-color: rgba(46, 155, 240, 0.3);
    z-index: 10;
}

/* Modal Animations */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-up {
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* VR Overlay (Easter Egg/Immersive styling) */
.vr-mode {
    filter: sepia(0.2) saturate(1.4) contrast(1.1) hue-rotate(190deg);
}

.vr-mode::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle, transparent 50%, rgba(46, 155, 240, 0.15) 100%);
    z-index: 9999;
}

/* Image skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-color: #1c1c1e;
    }
    50% {
        background-color: #2a2a2e;
    }
    100% {
        background-color: #1c1c1e;
    }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

/* Dropdown styling */
#search-results-dropdown {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Mobile responsive menu animation helper */
.menu-open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

/* Button micro-interactions */
button:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* --- Mobile Bottom Navigation ----------------------------------------------
   Fixed 5-item tab bar shown only on phones (< 768px), replacing the
   hamburger menu for primary navigation — thumb-reachable, no menu to open.
   Active state (toggled by handleRoute() in app.js) lights up the icon/label
   and shows a small dot above it, mirroring the reference design's tab bar. */
#mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-link .nav-dot {
    position: absolute;
    top: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--brand-blue);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bottom-nav-link.active {
    color: #ffffff;
}

.bottom-nav-link.active .nav-dot {
    opacity: 1;
}

.bottom-nav-link.active i {
    text-shadow: 0 0 12px var(--brand-blue-glow);
}

/* Fix for broken images - gray background instead of white camera icon */
img:not([src]), 
img[src=""],
img:not([src]) + * {
    background-color: #333333 !important;
}

/* Hide broken image icon and show gray background */
img:-moz-broken,
img:-webkit-broken,
img:broken {
    opacity: 0;
}

/* Ensure image containers have proper fallback background */
.bg-zinc-900 {
    background-color: #18181b !important;
}

/* Gray placeholder for loading images */
img.loading {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Native Ad Slot (Adsterra) -------------------------------------------
   Reserved space for the Native Banner ad unit. Hidden by default via the
   .hidden utility class until initAds() (app.js) confirms a Zone ID is
   configured and the current user isn't ad-free — see ADSTERRA_NATIVE_ZONE_ID.
   The "Publicidade" label keeps this honest/transparent rather than trying
   to disguise the placement as organic content. */
.ad-slot-wrapper {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0.75rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-slot-label {
    align-self: flex-start;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-sec);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.ad-slot-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* --- AdEra Display Banners & Catfish Styling ------------------------------- */
ins[class*="7236739a"] {
    display: inline-block !important;
    text-decoration: none !important;
    margin: 0 auto;
}

#ad-sticky-catfish {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* --- Top 10 Ranking Rows ---------------------------------------------------
   Giant outlined rank digit sitting behind each poster, the same visual
   language used by major streaming platforms for their "Top 10 hoje" rows.
   The site has no light theme, so the stroke is fixed to the dark treatment. */
.top10-rank-wrap {
    width: 74px;
    flex: 0 0 74px;
}

.top10-rank {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-width: 3px;
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
    line-height: 0.82;
    letter-spacing: -0.08em;
    font-family: 'Bebas Neue', ui-sans-serif, system-ui, sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
}

.top10-rank[data-digits="2"] {
    letter-spacing: -0.12em;
}

@media (min-width: 640px) {
    .top10-rank-wrap { width: 86px; flex-basis: 86px; }
}

/* --- Mobile Video Player Adaptations ---------------------------------------
   The desktop player relies on :hover for two things that don't exist on
   touch screens: (1) the volume slider expanding via group-hover/volume, and
   (2) the "Pular Abertura"/fullscreen corner buttons only needing to be
   reachable by a mouse. Below 768px we force the volume slider open at a
   fixed width instead of collapsed-by-default, and tighten up the player
   header's season/episode/server selects so the wrapped two-row layout
   (see index.html #player-modal-header) doesn't feel cramped. */
/* ==========================================================================
   MOBILE NATIVE PLAYER ENHANCEMENTS (< 768px)
   Adapts BRFLIX video player into a native streaming app experience (Netflix/YouTube style).
   Desktop player (>= 768px) remains 100% untouched.
   ========================================================================== */
@keyframes mobileSheetSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0.6;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Force dark color-scheme and solid dark background on all select dropdown options */
#player-modal select,
#player-modal select option,
#details-modal select,
#details-modal select option {
    color-scheme: dark !important;
}

#player-modal select option,
#details-modal select option {
    background-color: #121216 !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
}

@media (max-width: 767px) {
    /* 1. Header Safe Area, Back Button & Translucent Pill Selects */
    #player-modal-header {
        padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
        padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
        gap: 0.5rem !important;
    }

    #close-player-btn {
        width: 38px !important;
        height: 38px !important;
        border-radius: 9999px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
        font-size: 0.95rem !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    #player-modal-header select {
        height: 32px !important;
        border-radius: 9999px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        color: #ffffff !important;
        color-scheme: dark !important;
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        outline: none !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    #player-modal-header select option {
        background-color: #121216 !important;
        color: #ffffff !important;
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }

    /* 2. Hide volume slider and button on mobile (phone hardware buttons control volume) */
    #native-volume-column,
    #native-volume-btn,
    #native-volume-slider,
    .group\/volume {
        display: none !important;
    }

    /* 3. Center Playback Cluster: Floats to the physical center of the screen */
    #native-playback-pill-container {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 40 !important;
        pointer-events: auto !important;
    }

    #native-playback-pill {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        gap: 1.25rem !important;
        padding: 0 !important;
    }

    /* Prominent Center Play/Pause Button */
    #native-play-btn {
        width: 60px !important;
        height: 60px !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.25) !important;
        font-size: 1.3rem !important;
        margin: 0 !important;
        transition: transform 0.15s ease, background-color 0.2s ease !important;
    }
    #native-play-btn:active {
        transform: scale(0.9) !important;
        background: #e50914 !important;
        color: #ffffff !important;
    }

    /* Center Rewind 10s & Forward 10s Buttons */
    #native-rewind-btn,
    #native-forward-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        background: rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        font-size: 1rem !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    }
    #native-rewind-btn:active,
    #native-forward-btn:active {
        transform: scale(0.88) !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }

    /* TV Episode navigation buttons flanking the center controls */
    #native-prev-ep-btn,
    #native-next-ep-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        background: rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 0.875rem !important;
    }

    /* Hide non-interactive center play indicator badge on mobile */
    #native-center-play-btn {
        display: none !important;
    }

    /* Vertical centering for double-tap seek indicators */
    #native-seek-flash-left,
    #native-seek-flash-right {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    #native-seek-flash-left {
        left: 8% !important;
    }
    #native-seek-flash-right {
        right: 8% !important;
    }
    #native-seek-flash-left > div,
    #native-seek-flash-right > div {
        background: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 9, 20, 0.4) !important;
    }

    /* 4. Bottom Control Bar & Scrubber on Mobile */
    #native-bottom-bar {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
        padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
        background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 60%, transparent 100%) !important;
        gap: 0.5rem !important;
    }

    /* Thumb-friendly timeline scrubbing */
    #native-timeline-container {
        height: 4px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
        margin-top: -10px !important;
        margin-bottom: -6px !important;
    }
    /* Always-visible tactile red scrubber thumb on mobile */
    #native-timeline-progress > div {
        transform: scale(1) !important;
        width: 14px !important;
        height: 14px !important;
        background-color: #E50914 !important;
        box-shadow: 0 0 10px rgba(229, 9, 20, 0.9), 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
    }

    /* Secondary Controls Row (Audio, Subtitles, Quality, Cast, Zoom, Fullscreen) */
    #native-secondary-controls {
        width: 100% !important;
        justify-content: flex-end !important;
        gap: 0.5rem !important;
    }

    #native-secondary-controls button {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 9999px !important;
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 0.85rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #native-secondary-controls button:active {
        transform: scale(0.9) !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }

    /* 5. Audio, Subtitles, and Quality Menus as Native Bottom Sheets */
    #native-audio-menu,
    #native-subtitle-menu,
    #native-quality-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        margin: 0 !important;
        padding: 1.25rem 1rem max(1.75rem, env(safe-area-inset-bottom)) 1rem !important;
        background: rgba(18, 18, 22, 0.97) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-bottom: none !important;
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.85) !important;
        z-index: 2147483647 !important;
        max-height: 65vh !important;
        overflow-y: auto !important;
        animation: mobileSheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Visual drag handle for mobile bottom sheets */
    #native-audio-menu::before,
    #native-subtitle-menu::before,
    #native-quality-menu::before {
        content: '';
        display: block;
        width: 38px;
        height: 4px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 9999px;
        margin: 0 auto 0.875rem auto;
    }

    #native-audio-menu .audio-option,
    #native-subtitle-menu button,
    #native-quality-menu button {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        border-radius: 0.75rem !important;
        margin-bottom: 0.35rem !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    /* 6. Floating Skip Intro Button placement on mobile */
    #native-skip-intro-btn {
        bottom: max(5.5rem, calc(5.5rem + env(safe-area-inset-bottom))) !important;
        right: max(1rem, env(safe-area-inset-right)) !important;
        font-size: 0.75rem !important;
        padding: 0.6rem 1.1rem !important;
    }

    /* 7. Landscape Mode: Edge padding and notch protection */
    @media (orientation: landscape) {
        #player-modal-header {
            padding-left: max(1.5rem, env(safe-area-inset-left)) !important;
            padding-right: max(1.5rem, env(safe-area-inset-right)) !important;
        }
        #native-bottom-bar {
            padding-left: max(1.5rem, env(safe-area-inset-left)) !important;
            padding-right: max(1.5rem, env(safe-area-inset-right)) !important;
        }
    }

    /* Prevent browser gesture collisions */
    #native-click-shield,
    #native-bottom-bar,
    #player-native-controls {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
}

/* --- Floating "Pular Abertura" button --------------------------------------
   Lives on its own, away from the toolbar/pill controls, with a gentle
   breathing pulse (scale + glow) to draw the eye without being obnoxious —
   just a soft shadow bloom, no jitter or color flashing. */
@keyframes skipIntroPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(255, 255, 255, 0.35);
    }
    50% {
        transform: scale(1.045);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.skip-intro-floating {
    animation: skipIntroPulse 2.2s ease-in-out infinite;
}

.skip-intro-floating:hover {
    animation-play-state: paused;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NATIVE MOBILE APP UI / UX ENHANCEMENTS (< 768px)
   Strictly scoped to touch devices and mobile breakpoints. Desktop remains 100% untouched.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Remove mobile web blue/gray tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Touch Ergonomics & Sticky Hover Removal */
@media (hover: none) {
    /* Prevent desktop hover zoom from sticking on cards when tapped on touchscreens */
    .movie-card:hover,
    .wide-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: rgba(255, 255, 255, 0.05) !important;
    }

    /* Provide immediate tactile press feedback like a native iOS/Android app */
    .movie-card:active,
    .wide-card:active,
    .mobile-cat-pill:active,
    .bottom-nav-link:active,
    .mobile-touch-btn:active {
        transform: scale(0.96) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Momentum scrolling and scroll snap for horizontal carousels on mobile */
@media (max-width: 767px) {
    body {
        overscroll-behavior-y: contain;
    }

    /* Smooth touch momentum in carousels */
    #movies-carousel,
    #series-carousel,
    #animes-home-carousel,
    #minha-lista-carousel,
    #top10-filmes-carousel,
    #top10-series-carousel,
    #top10-animes-carousel,
    #slider-estreias,
    #slider-premiados,
    #slider-series-alta,
    #slider-animes-alta,
    #mobile-category-pills,
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .movie-card,
    .wide-card,
    .group\/item {
        scroll-snap-align: start;
    }

    /* Header Safe Area on mobile devices with top notch/Dynamic Island */
    #main-header {
        padding-top: max(0.5rem, env(safe-area-inset-top)) !important;
    }

    #main-header.header-scrolled {
        padding-top: max(0.5rem, env(safe-area-inset-top)) !important;
        padding-bottom: 0 !important;
    }
}

/* --- Mobile Category Filter Pills ----------------------------------------- */
.mobile-cat-pill {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
}

.mobile-cat-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.mobile-cat-pill.active {
    background: #ffffff !important;
    color: #0A0A0A !important;
    font-weight: 700 !important;
    border-color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(255, 255, 255, 0.3);
    transform: scale(1.04);
}

#mobile-pill-halloween.active {
    background: linear-gradient(135deg, #ea580c 0%, #c026d3 100%) !important;
    color: #ffffff !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 16px rgba(234, 88, 12, 0.5) !important;
}

/* --- Mobile Bottom Sheet (Modal de Detalhes) ------------------------------ */
@media (max-width: 767px) {
    #details-modal {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #details-modal > div {
        max-height: 92vh !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.95) !important;
        animation: slideUpSheet 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
    }

    @keyframes slideUpSheet {
        from {
            transform: translateY(100%);
            opacity: 0.5;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* --- Mobile Bottom Navigation Polish -------------------------------------- */
#mobile-bottom-nav {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.85);
    padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
}

.bottom-nav-link {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-nav-link.active {
    color: #2E9BF0 !important;
}

.bottom-nav-link.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 16px rgba(46, 155, 240, 0.6);
}

.bottom-nav-link.active .nav-dot {
    opacity: 1;
    background-color: var(--brand-blue);
    box-shadow: 0 0 8px var(--brand-blue-glow);
}

/* ==========================================================================
   HALLOWEEN SPECIAL TAB THEMING & ACCENTS
   ========================================================================== */
:root {
    --halloween-orange: #ff7518;
    --halloween-orange-glow: rgba(255, 117, 24, 0.45);
    --halloween-purple: #8b00ff;
    --halloween-purple-glow: rgba(139, 0, 255, 0.35);
    --halloween-blood: #dc2626;
}

/* Atmospheric Halloween Background Glow */
.halloween-bg-glow {
    display: none;
}

/* Spiderweb SVG overlay styling */
.halloween-cobweb {
    position: absolute;
    width: 140px;
    height: 140px;
    opacity: 0.28;
    pointer-events: none;
    z-index: 25;
    transition: opacity 0.3s ease;
}
.halloween-cobweb:hover {
    opacity: 0.55;
}

/* Spooky Hero Glowing Buttons */
.halloween-btn-primary {
    background: linear-gradient(135deg, #ff5500 0%, #b30000 100%) !important;
    box-shadow: 0 0 25px rgba(255, 85, 0, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.halloween-btn-primary:hover {
    background: linear-gradient(135deg, #ff6b00 0%, #dc2626 100%) !important;
    box-shadow: 0 0 35px rgba(255, 107, 0, 0.65) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

.halloween-btn-trick {
    background: linear-gradient(135deg, #6b21a8 0%, #3b0764 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
    box-shadow: 0 0 20px rgba(139, 0, 255, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.halloween-btn-trick:hover {
    background: linear-gradient(135deg, #7e22ce 0%, #581c87 100%) !important;
    border-color: rgba(168, 85, 247, 0.7) !important;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.55) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* Halloween Card Hover Effects */
.halloween-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.halloween-card:hover {
    border-color: rgba(255, 117, 24, 0.6);
    box-shadow: 0 8px 30px rgba(255, 117, 24, 0.25);
    transform: translateY(-4px) scale(1.02);
}

/* Pulsing Jack-o-Lantern & Ghost animation */
@keyframes spooky-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
}
.animate-spooky-float {
    animation: spooky-float 3.5s ease-in-out infinite;
}

/* Spooky flickering neon candle effect */
@keyframes horror-flicker {
    0%, 100% { opacity: 1; }
    41% { opacity: 0.8; }
    42% { opacity: 0.3; }
    43% { opacity: 0.85; }
    45% { opacity: 0.2; }
    46% { opacity: 0.95; }
}
.horror-flicker-text {
    animation: horror-flicker 6s infinite;
}

/* Top 10 Halloween Rank styling with fiery stroke */
.halloween-top10-rank {
    -webkit-text-stroke: 2px #ff6600;
    color: #0d0608 !important;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
}



/* Sagas Collection Cards */
.saga-collection-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #141416;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.saga-collection-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 117, 24, 0.6);
    box-shadow: 0 12px 36px rgba(255, 117, 24, 0.25);
}
@media (max-width: 640px) {
    .saga-collection-card {
        border-radius: 0.75rem;
    }
    .saga-collection-card:active {
        transform: scale(0.96);
    }
}

/* Touch Momentum Scrolling for Mobile Carousels */
#top10-halloween-carousel,
#slider-hw-slasher,
#slider-hw-sobrenatural,
#slider-hw-psicologico,
#slider-hw-familia,
#slider-hw-series {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

/* Termômetro do Medo Cards */
.fear-meter-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(145deg, rgba(28, 28, 30, 0.8) 0%, rgba(14, 14, 16, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.fear-meter-card:hover {
    transform: translateY(-3px);
}

/* Expanding Evil Pumpkin Burst Animation */
#pumpkin-lid {
    transform-box: fill-box;
    transform-origin: 50% 90%;
    transform: translateY(-4px) rotate(-6deg);
}

@keyframes pumpkinExpandBurst {
    0% {
        transform: scale(0.25) rotate(-6deg);
        opacity: 0;
        filter: drop-shadow(0 0 15px rgba(255, 117, 24, 0.4));
    }
    25% {
        transform: scale(1.02) rotate(2deg);
        opacity: 1;
        filter: drop-shadow(0 0 50px rgba(255, 102, 0, 0.95)) drop-shadow(0 0 90px rgba(234, 88, 12, 0.8));
    }
    60% {
        transform: scale(1.15) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 60px rgba(255, 102, 0, 1)) drop-shadow(0 0 100px rgba(234, 88, 12, 0.85));
    }
    80% {
        transform: scale(1.5);
        opacity: 0.85;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

@keyframes pumpkinLidOpen {
    0% {
        transform: translateY(-4px) rotate(-6deg);
    }
    25% {
        transform: translateY(-18px) rotate(-14deg);
    }
    60% {
        transform: translateY(-30px) rotate(-20deg);
        opacity: 1;
    }
    85% {
        transform: translateY(-44px) rotate(-26deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-56px) rotate(-30deg);
        opacity: 0;
    }
}

@keyframes pumpkinCavityBurst {
    0% { opacity: 0; transform: scaleY(0.2); }
    25% { opacity: 0.95; transform: scaleY(1.1); }
    60% { opacity: 0.95; transform: scaleY(1.25); }
    85% { opacity: 0.6; transform: scaleY(1.4); }
    100% { opacity: 0; }
}

@keyframes pumpkinSpookyGlowFlare {
    0% {
        filter: drop-shadow(0 0 5px #ff7700);
    }
    40% {
        filter: drop-shadow(0 0 35px #ffca28) drop-shadow(0 0 55px #ff5500);
    }
    100% {
        filter: drop-shadow(0 0 70px #ff9900);
    }
}

.pumpkin-animating {
    animation: pumpkinExpandBurst 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pumpkin-animating #pumpkin-lid {
    animation: pumpkinLidOpen 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pumpkin-animating #pumpkin-face {
    animation: pumpkinSpookyGlowFlare 0.75s ease-out forwards;
}

.pumpkin-animating #pumpkin-cavity-flame {
    animation: pumpkinCavityBurst 0.75s ease-out forwards;
    transform-origin: 150px 78px;
}

/* --- BRFLIX Halloween Entrance Intro Animation --------------------------- */
@keyframes hwBatFlapLeft {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-35deg); }
}
@keyframes hwBatFlapRight {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(35deg); }
}
.hw-bat-wing-l {
    transform-origin: 48px 22px;
    animation: hwBatFlapLeft 0.16s ease-in-out infinite alternate;
}
.hw-bat-wing-r {
    transform-origin: 52px 22px;
    animation: hwBatFlapRight 0.16s ease-in-out infinite alternate;
}

@keyframes hwBatSwoop1 {
    0% { transform: translate3d(0, 0, -800px) scale(0.08) rotate(-15deg); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate3d(-380px, 320px, 500px) scale(4.0) rotate(-35deg); opacity: 0; }
}
@keyframes hwBatSwoop2 {
    0% { transform: translate3d(0, 0, -900px) scale(0.05) rotate(10deg); opacity: 0; }
    15% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate3d(420px, -280px, 520px) scale(4.2) rotate(30deg); opacity: 0; }
}
@keyframes hwBatSwoop3 {
    0% { transform: translate3d(0, 0, -700px) scale(0.1) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translate3d(30px, 450px, 580px) scale(4.8) rotate(5deg); opacity: 0; }
}
@keyframes hwBatSwoop4 {
    0% { transform: translate3d(0, 0, -850px) scale(0.06) rotate(-25deg); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate3d(-480px, -240px, 450px) scale(3.5) rotate(-45deg); opacity: 0; }
}
@keyframes hwBatSwoop5 {
    0% { transform: translate3d(0, 0, -650px) scale(0.12) rotate(18deg); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate3d(320px, 280px, 480px) scale(3.6) rotate(15deg); opacity: 0; }
}
@keyframes hwBatSwoop6 {
    0% { transform: translate3d(0, 0, -950px) scale(0.04) rotate(-10deg); opacity: 0; }
    25% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate3d(-180px, -380px, 500px) scale(4.0) rotate(-20deg); opacity: 0; }
}

@keyframes hwLogoEntranceEmerge {
    0% {
        transform: scale(0.4) translateY(20px);
        opacity: 0;
        filter: blur(14px) drop-shadow(0 0 10px rgba(255,102,0,0));
    }
    65% {
        transform: scale(1.06) translateY(-4px);
        opacity: 1;
        filter: blur(0px) drop-shadow(0 0 50px rgba(255,102,0,0.95));
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
        filter: blur(0px) drop-shadow(0 0 35px rgba(255,102,0,0.7));
    }
}

@keyframes hwMoonGlowAura {
    0%, 100% { transform: scale(1); opacity: 0.85; filter: drop-shadow(0 0 40px rgba(255,130,0,0.4)); }
    50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 80px rgba(255,90,0,0.7)); }
}

@keyframes hwWingsSpread {
    0% { transform: scale(0.3) scaleX(0.2); opacity: 0; }
    60% { transform: scale(1.1) scaleX(1.1); opacity: 1; }
    100% { transform: scale(1) scaleX(1); opacity: 1; }
}

.hw-intro-moon-glow {
    animation: hwMoonGlowAura 4s ease-in-out infinite;
}
.hw-intro-logo-anim {
    animation: hwLogoEntranceEmerge 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
    opacity: 0;
}
.hw-intro-wings-anim {
    animation: hwWingsSpread 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    transform-origin: center center;
    opacity: 0;
}



