/* 🎃 KAZ DONAT - HALLOWEEN FESTIVE THEME STYLES (v5.0) */

/* Hidden when Halloween is disabled */
body:not(.halloween-active) .halloween-element {
    display: none !important;
}

/* =========================================
   1. BACKGROUND DECORATION LAYER
   ========================================= */
#halloweenDecorationContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    width: 100vw;
    height: 100%;
    height: 100vh;
    max-width: 100%;
    pointer-events: none !important;
    z-index: 1 !important; /* In background layer, behind cards, sidebar, buttons */
    overflow: hidden !important; /* CRITICAL: Prevent horizontal overflow */
    transition: opacity 0.5s ease;
    will-change: transform, opacity;
}

/* Outer pumpkin wrapper: handles fixed position and continuous scroll parallax */
.halloween-pumpkin-item {
    position: fixed;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-drag: none;
    z-index: 1 !important;
    will-change: transform;
}

/* Inner pumpkin image: handles pure floating and bobbing animation */
.halloween-pumpkin-img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none !important;
}

/* Positions & Widths */
.p-left-1 { top: 14%; left: 20px; width: 135px; max-width: 18vw; }
.p-left-2 { top: 40%; left: 45px; width: 150px; max-width: 19vw; }
.p-left-3 { top: 68%; left: 18px; width: 125px; max-width: 16vw; }

.p-right-1 { top: 16%; right: 25px; width: 140px; max-width: 18vw; }
.p-right-2 { top: 46%; right: 35px; width: 145px; max-width: 18vw; }

.p-ground-right { bottom: -12px; right: 20px; width: 220px; max-width: 28vw; }
.p-ground-left  { bottom: -10px; left: 25px;  width: 160px; max-width: 22vw; }

/* 🌟 CONTINUOUS, HIGH-VISIBILITY FLOATING ANIMATIONS */
.anim-float-1 {
    animation: pumpkinFloatA 4.2s ease-in-out infinite alternate !important;
}
.anim-float-2 {
    animation: pumpkinFloatB 5.4s ease-in-out infinite alternate !important;
}
.anim-float-3 {
    animation: pumpkinFloatC 4.8s ease-in-out infinite alternate !important;
}
.anim-ground {
    animation: pumpkinGroundBreathe 4.5s ease-in-out infinite alternate !important;
}

@keyframes pumpkinFloatA {
    0% {
        transform: translateY(0px) translateX(0px) rotate(-4deg);
        filter: drop-shadow(0 0 16px rgba(255, 110, 0, 0.55)) drop-shadow(0 10px 22px rgba(0,0,0,0.85));
    }
    100% {
        transform: translateY(-42px) translateX(14px) rotate(6deg) scale(1.05);
        filter: drop-shadow(0 0 34px rgba(255, 160, 0, 0.9)) drop-shadow(0 18px 30px rgba(0,0,0,0.92));
    }
}

@keyframes pumpkinFloatB {
    0% {
        transform: translateY(0px) translateX(0px) rotate(5deg);
        filter: drop-shadow(0 0 18px rgba(255, 120, 0, 0.55)) drop-shadow(0 10px 20px rgba(0,0,0,0.85));
    }
    100% {
        transform: translateY(-46px) translateX(-16px) rotate(-6deg) scale(1.06);
        filter: drop-shadow(0 0 36px rgba(255, 150, 0, 0.92)) drop-shadow(0 20px 32px rgba(0,0,0,0.94));
    }
}

@keyframes pumpkinFloatC {
    0% {
        transform: translateY(0px) translateX(0px) rotate(-3deg);
        filter: drop-shadow(0 0 15px rgba(255, 95, 0, 0.5)) drop-shadow(0 8px 18px rgba(0,0,0,0.8));
    }
    100% {
        transform: translateY(-36px) translateX(12px) rotate(5deg) scale(1.04);
        filter: drop-shadow(0 0 30px rgba(255, 140, 0, 0.85)) drop-shadow(0 16px 28px rgba(0,0,0,0.88));
    }
}

@keyframes pumpkinGroundBreathe {
    0% {
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 0 18px rgba(255, 100, 0, 0.45)) drop-shadow(0 12px 25px rgba(0, 0, 0, 0.85));
    }
    100% {
        transform: translateY(-16px) scale(1.05);
        filter: drop-shadow(0 0 38px rgba(255, 150, 0, 0.88)) drop-shadow(0 18px 35px rgba(0, 0, 0, 0.95));
    }
}

/* =========================================
   2. HANGING BAT & LANTERN (LOWERED & VISIBLE)
   ========================================= */
.halloween-bat-top-left {
    position: fixed;
    top: 18px;
    left: 18px;
    width: 145px;
    max-width: 20vw;
    height: auto;
    z-index: 2 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 0 18px rgba(255, 80, 0, 0.45)) drop-shadow(0 8px 18px rgba(0,0,0,0.9));
    animation: batSway 4.5s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes batSway {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(14px) rotate(-5deg) scale(1.04); }
}

.halloween-candle-top-left {
    position: fixed;
    top: 14px;
    left: 110px;
    width: 90px;
    max-width: 14vw;
    height: auto;
    z-index: 2 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 0 25px rgba(255, 180, 50, 0.75)) drop-shadow(0 8px 20px rgba(0,0,0,0.85));
    animation: candleSway 3.2s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes candleSway {
    0% {
        transform: rotate(-2deg);
        filter: drop-shadow(0 0 20px rgba(255, 140, 20, 0.6)) drop-shadow(0 5px 15px rgba(0,0,0,0.8));
    }
    50% {
        transform: rotate(3deg) translateY(5px);
        filter: drop-shadow(0 0 38px rgba(255, 200, 50, 0.95)) drop-shadow(0 8px 22px rgba(0,0,0,0.9));
    }
    100% {
        transform: rotate(-1.5deg);
        filter: drop-shadow(0 0 26px rgba(255, 160, 30, 0.75)) drop-shadow(0 6px 18px rgba(0,0,0,0.85));
    }
}

/* =========================================
   3. WITCH HATS ON STREAMER VIDEO REVIEWS
   (RAISED HIGHER & TILTED TO THE SIDE)
   ========================================= */
.reviews-section {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding-top: 85px !important; /* Extra headroom for higher tilted hat */
}

.stories-carousel-container {
    overflow: hidden !important; /* CRITICAL: Clips carousel track overflow horizontally */
    width: 100% !important;
    max-width: 1100px !important;
    padding-top: 75px !important; /* Ensures the -68px hat is fully inside container */
    box-sizing: border-box !important;
}

.stories-scroll-track {
    overflow: visible !important;
    padding-top: 15px !important;
}

.story-ring {
    position: relative !important;
    overflow: visible !important;
}

.halloween-story-hat {
    position: absolute !important;
    top: -68px !important; /* Raised higher above the circle */
    left: 65% !important; /* Shifted more to the right edge */
    transform: translateX(-50%) rotate(16deg) !important;
    width: 98px !important;
    max-width: none !important;
    height: auto !important;
    z-index: 30 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 14px rgba(255, 120, 0, 0.7)) !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.story-circle-item:hover .halloween-story-hat {
    transform: translateX(-50%) rotate(20deg) scale(1.1) translateY(-3px) !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 22px rgba(255, 150, 0, 0.95)) !important;
}

/* =========================================
   4. WITCH HATS ON DASHBOARD BOUNCING LOGOS
   (RAISED HIGHER & CENTERED)
   ========================================= */
.bg-floating-logo-item {
    overflow: visible !important;
}

.halloween-logo-hat {
    position: absolute !important;
    top: -48px !important; /* Raised higher so it sits right on top of logo rim */
    left: 50% !important;
    transform: translateX(-50%) rotate(-8deg) !important; /* Centered & stylishly tilted */
    width: 74px !important;
    max-width: none !important;
    height: auto !important;
    z-index: 25 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.85)) drop-shadow(0 0 10px rgba(255,110,0,0.8)) !important;
    user-select: none;
    -webkit-user-drag: none;
}

/* =========================================
   5. AUTH & DASHBOARD HALLOWEEN BACKGROUND
   ========================================= */
body.halloween-active.auth-halloween-page,
body.halloween-active.dashboard-halloween-page {
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(255, 94, 0, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, rgba(8, 6, 15, 0.84) 0%, rgba(8, 6, 15, 0.95) 100%),
        url('/halloween/halloween_bg.jpg') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

body.halloween-active.dashboard-halloween-page .dashboard-content,
body.halloween-active.dashboard-halloween-page .main-content {
    position: relative;
    z-index: 5 !important;
}

body.halloween-active.dashboard-halloween-page .sidebar {
    z-index: 50 !important;
}

body.halloween-active.dashboard-halloween-page .stat-card,
body.halloween-active.dashboard-halloween-page .card,
body.halloween-active.dashboard-halloween-page .table-card {
    border-color: rgba(255, 120, 0, 0.18) !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.6), 0 0 20px rgba(255, 90, 0, 0.06) !important;
}

/* =========================================
   6. CLEAN HALLOWEEN MUSIC BUTTON
   (ZERO BACKGROUND, ZERO BORDER, ONLY THE CLEAN IMAGE)
   ========================================= */
#halloweenMusicBtnWrap,
.halloween-music-btn-wrap {
    all: unset !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
}

#halloweenMusicBtn,
.halloween-music-btn {
    all: unset !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: spookyMusicPulseWiggle 5s ease-in-out infinite !important;
    transition: transform 0.25s ease, filter 0.25s ease !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#halloweenMusicBtn:hover,
.halloween-music-btn:hover {
    transform: scale(1.08) !important;
    filter: drop-shadow(0 0 22px rgba(255, 130, 0, 0.95)) drop-shadow(0 0 35px rgba(255, 70, 0, 0.7)) !important;
}

#halloweenMusicBtn:active,
.halloween-music-btn:active {
    transform: scale(0.96) !important;
}

#halloweenMusicBtn img,
.halloween-music-btn img {
    all: unset !important;
    height: 44px !important;
    width: auto !important;
    max-width: 155px !important;
    object-fit: contain !important;
    display: block !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

@keyframes spookyMusicPulseWiggle {
    0%, 82%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 6px rgba(255, 95, 0, 0.45));
    }
    85% {
        transform: scale(1.08) rotate(-5deg);
        filter: drop-shadow(0 0 24px rgba(255, 120, 0, 1)) drop-shadow(0 0 35px rgba(255, 50, 0, 0.8));
    }
    89% {
        transform: scale(1.12) rotate(5deg);
        filter: drop-shadow(0 0 30px rgba(255, 150, 0, 1)) drop-shadow(0 0 45px rgba(255, 70, 0, 0.9));
    }
    93% {
        transform: scale(1.06) rotate(-3deg);
        filter: drop-shadow(0 0 22px rgba(255, 100, 0, 0.95)) drop-shadow(0 0 30px rgba(255, 40, 0, 0.7));
    }
    97% {
        transform: scale(1.02) rotate(1deg);
        filter: drop-shadow(0 0 12px rgba(255, 90, 0, 0.65));
    }
}

#halloweenMusicBtn.is-playing,
.halloween-music-btn.is-playing {
    animation: spookyMusicActivePlaying 1.8s ease-in-out infinite alternate !important;
}

@keyframes spookyMusicActivePlaying {
    0% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 16px rgba(255, 80, 0, 0.9)) drop-shadow(0 0 26px rgba(255, 180, 0, 0.6));
    }
    100% {
        transform: scale(1.07);
        filter: drop-shadow(0 0 26px rgba(255, 120, 0, 1)) drop-shadow(0 0 40px rgba(255, 60, 0, 0.85));
    }
}

/* =========================================
   7. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    .reviews-section {
        padding-top: 65px !important;
        overflow: hidden !important;
        width: 100% !important;
    }
    .stories-carousel-container {
        padding-top: 55px !important;
        overflow: hidden !important;
        width: 100% !important;
    }
    .p-ground-right { width: 140px; bottom: -10px; right: 5px; }
    .p-ground-left  { width: 100px; bottom: -10px; left: 5px; }
    .p-left-1, .p-left-2, .p-left-3 { width: 80px; left: 5px; }
    .p-right-1, .p-right-2 { width: 85px; right: 5px; }
    .halloween-bat-top-left { top: 10px; left: 10px; width: 100px; }
    .halloween-candle-top-left { top: 8px; left: 70px; width: 65px; }
    #halloweenMusicBtn img { height: 36px !important; max-width: 125px !important; }
    .halloween-story-hat { top: -48px !important; width: 78px !important; }
    .halloween-logo-hat { top: -36px !important; width: 55px !important; }
}
