#seasonal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through */
    z-index: 40; /* Default: Lower than navbar (50) to prevent blocking */
    overflow: hidden;
}

/* --- OVERLAY EFFECTS --- */
/* These effects should sit ON TOP of the navbar */
#seasonal-container.effect-new_years,
#seasonal-container.effect-guy_fawkes,
#seasonal-container.effect-valentines {
    z-index: 1000;
}

/* --- CHRISTMAS THEME --- */

/* Icicles - Background layer */
.effect-christmas .icicles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: 
        linear-gradient(45deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.667%, transparent 66.667%), 
        linear-gradient(-45deg, transparent 33.333%, #ffffff 33.333%, #ffffff 66.667%, transparent 66.667%);
    background-size: 40px 80px;
    background-position: 0 -20px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    z-index: 100;
}

/* Snowflake Styles */
.snowflake {
    position: fixed;
    top: -10%;
    color: #FFF;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 1px #000;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

@keyframes snowflakes-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}

@keyframes snowflakes-shake {
    0% { transform: translateX(0px); }
    50% { transform: translateX(80px); }
    100% { transform: translateX(0px); }
}

/* --- CHRISTMAS LIGHTS (The Lightrope) --- */
.lightrope {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    z-index: 101; 
    top: 62px; /* Align to bottom of navbar */
    margin: 0; /* Remove negative margin from original pen */
    padding: 0;
    pointer-events: none;
    width: 100%;
    display: block; /* Original used block/inline-block, NOT flex */
}

.lightrope li {
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block; /* Critical for the spacing/wire to work right */
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 20px; /* Spacing between lights */
    background: rgba(0,247,165,1);
    box-shadow: 0px 4.66px 24px 3px rgba(0,247,165,1);
    animation-name: flash-1;
    animation-duration: 2s;
}

/* The Wire Connector */
.lightrope li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 42px; 
    height: 9.33px;
    border-radius: 50%;
    top: -4.66px;
    left: 0px;
    border-bottom: solid #222 2px;
    background: transparent;
}

/* --- SCSS Logic Mimicry (Order matters for overrides!) --- */

/* 2n+1 (Odd positions): Cyan */
.lightrope li:nth-child(2n+1) {
    background: rgba(0,255,255,1);
    box-shadow: 0px 4.66px 24px 3px rgba(0,255,255,0.5);
    animation-name: flash-2;
    animation-duration: 0.4s;
}

/* 4n+2 (Every 4th, starting at 2): Pink */
.lightrope li:nth-child(4n+2) {
    background: rgba(247,0,148,1);
    box-shadow: 0px 4.66px 24px 3px rgba(247,0,148,1);
    animation-name: flash-3;
    animation-duration: 1.1s;
}

/* Odd positions timing override */
.lightrope li:nth-child(odd) {
    animation-duration: 1.8s;
}

/* 3n+1 timing override */
.lightrope li:nth-child(3n+1) {
    animation-duration: 1.4s;
}

/* Keyframes */
@keyframes flash-1 {
    0%, 100% { background: rgba(0,247,165,1); box-shadow: 0px 4.66px 24px 3px rgba(0,247,165,1); }
    50% { background: rgba(0,247,165,0.4); box-shadow: 0px 4.66px 24px 3px rgba(0,247,165,0.2); }
}
@keyframes flash-2 {
    0%, 100% { background: rgba(0,255,255,1); box-shadow: 0px 4.66px 24px 3px rgba(0,255,255,1); }
    50% { background: rgba(0,255,255,0.4); box-shadow: 0px 4.66px 24px 3px rgba(0,255,255,0.2); }
}
@keyframes flash-3 {
    0%, 100% { background: rgba(247,0,148,1); box-shadow: 0px 4.66px 24px 3px rgba(247,0,148,1); }
    50% { background: rgba(247,0,148,0.4); box-shadow: 0px 4.66px 24px 3px rgba(247,0,148,0.2); }
}

/* --- VALENTINES THEME --- */
.heart {
    position: absolute;
    bottom: -20px;
    width: 20px;
    height: 20px;
    background: rgba(255, 105, 180, 0.6);
    transform: rotate(45deg);
    animation: float-up 6s linear infinite;
}
.heart::before, .heart::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: inherit;
}
.heart::before { top: -10px; left: 0; }
.heart::after { left: -10px; top: 0; }

@keyframes float-up {
    0% { transform: translateY(0) rotate(45deg) scale(0.8); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(-100vh) rotate(45deg) scale(1.2); opacity: 0; }
}

/* --- NEW YEARS & GUY FAWKES (Fireworks) --- */
.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: explode 1s ease-out forwards;
}
@keyframes explode {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0px var(--fw-color); }
    100% { transform: scale(0); opacity: 0; box-shadow: 0 0 0 100px var(--fw-color); }
}

/* --- EASTER THEME --- */
.bunny-hopper {
    position: absolute;
    bottom: -50px;
    font-size: 2rem;
    animation: hop-across 15s linear infinite;
}
.easter-egg {
    position: absolute;
    top: -50px;
    font-size: 1.5rem;
    animation: fall-linear 8s linear infinite;
}
@keyframes hop-across {
    0% { left: -10%; transform: translateY(0); }
    25% { transform: translateY(-50px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-50px); }
    100% { left: 110%; transform: translateY(0); }
}

/* --- HALLOWEEN THEME (Spiders) --- */

.seasonal-spider {
    position: absolute;
    height: 40px;
    width: 50px;
    border-radius: 50%;
    margin: 40px 0 0 0; /* Offset from top */
    background: #110D04;
    z-index: 90;
}

/* The String */
.seasonal-spider:before {
    position: absolute;
    content: "";
    width: 1px;
    background: #AAAAAA;
    left: 50%;
    top: -320px;
    height: 320px;
}

/* Eyes */
.seasonal-spider .eye {
    position: absolute;
    top: 16px;
    height: 14px;
    width: 12px;
    background: #FFFFFF;
    border-radius: 50%;
}
.seasonal-spider .eye:after {
    position: absolute;
    content: "";
    top: 6px;
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background: black;
}
.seasonal-spider .eye.left { left: 14px; }
.seasonal-spider .eye.left:after { right: 3px; }
.seasonal-spider .eye.right { right: 14px; }
.seasonal-spider .eye.right:after { left: 3px; }

/* Legs */
.seasonal-spider .leg {
    position: absolute;
    top: 6px;
    height: 12px;
    width: 14px;
    border-top: 2px solid #110D04;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    z-index: -1;
}

.seasonal-spider .leg.left {
    left: -8px;
    transform-origin: top right;
    transform: rotate(36deg) skewX(-20deg);
    border-left: 2px solid #110D04;
    border-radius: 60% 0 0 0;
    animation: legs-wriggle-left 1s 0s infinite;
}

.seasonal-spider .leg.right {
    right: -8px;
    transform-origin: top left;
    transform: rotate(-36deg) skewX(20deg);
    border-right: 2px solid #110D04;
    border-radius: 0 60% 0 0;
    animation: legs-wriggle-right 1s 0.2s infinite;
}

/* Specific Leg Offsets */
.seasonal-spider .leg:nth-of-type(3) { top: 14px; left: -11px; animation-delay: 0.8s; } /* 2nd leg */
.seasonal-spider .leg:nth-of-type(4) { top: 22px; left: -12px; animation-delay: 0.2s; } /* 3rd leg */
.seasonal-spider .leg:nth-of-type(5) { top: 31px; left: -10px; animation-delay: 0.4s; } /* 4th leg */

.seasonal-spider .leg:nth-of-type(7) { top: 14px; right: -11px; animation-delay: 0.4s; } /* 2nd right */
.seasonal-spider .leg:nth-of-type(8) { top: 22px; right: -12px; animation-delay: 0.7s; } /* 3rd right */
.seasonal-spider .leg:nth-of-type(9) { top: 31px; right: -10px; animation-delay: 0.3s; } /* 4th right */

@keyframes legs-wriggle-left {
    0%, 100% { transform: rotate(36deg) skewX(-20deg); }
    25%, 75% { transform: rotate(15deg) skewX(-20deg); }
    50% { transform: rotate(45deg) skewX(-20deg); }
}

@keyframes legs-wriggle-right {
    0%, 100% { transform: rotate(-36deg) skewX(20deg); }
    25%, 75% { transform: rotate(-15deg) skewX(20deg); }
    50% { transform: rotate(-45deg) skewX(20deg); }
}

/* Happy Halloween Text */
.halloween-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20%;
    font-family: 'Playfair Display', serif;
    font-size: 5vw;
    color: #111111;
    animation: text-flicker 4s 0s infinite;
    pointer-events: none;
    z-index: 5;
    text-align: center;
    width: 100%;
}

@keyframes text-flicker {
    0%, 6%, 12% { text-shadow: none; color: #111111; }
    3%, 9% { text-shadow: 0 0 8px rgba(250, 103, 1, 0.6); color: #fa6701; }
    60% { text-shadow: 0 0 8px rgba(250, 103, 1, 0.6), 0 0 16px rgba(250, 103, 1, 0.4), 0 0 20px rgba(255, 0, 84, 0.2); color: #fa6701; }
    100% { text-shadow: 0 0 8px rgba(250, 103, 1, 0.6); color: #fa6701; }
}

/* --- Spiderwebs --- */
.web-corner {
    position: absolute;
    z-index: -1;
    opacity: 0.4;
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.web-top-left {
    top: -10px;
    left: -10px;
    right: auto;
    transform: rotate(0deg);
}

.web-bottom-left {
    top: auto;
    bottom: -10px;
    left: -10px;
    transform: rotate(-90deg);
}

.web-top-right { 
    right: -10px; 
    top: -10px; 
    transform: rotate(90deg);
}

.web-bottom-right { 
    right: -10px; 
    bottom: -10px; 
    transform: rotate(180deg);
}

/* --- GUY FAWKES (Bonfire) --- */
.bonfire {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    text-shadow: 0 0 20px orange;
    animation: flicker 0.5s infinite alternate;
}
@keyframes flicker {
    0% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* =========================================
   Seasonal Preloader Effects
   ========================================= */

/* --- Base Preloader Icon (Hidden by default) --- */
#preloader-container::after {
    content: '';
    position: absolute;
    top: 40%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.2;
    z-index: 0;
    animation: pulse-season 2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulse-season {
    0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.1); }
}

/* -----------------------------------------
   1. Christmas Effect
   ----------------------------------------- */
html.christmas #preloader-container {
    background-color: #0f392b; /* Deep Forest Green */
}
html.christmas .preloader-header .preloader-logo {
    color: #f0f0f0;
    text-shadow: 0 0 10px rgba(196, 30, 58, 0.8); /* Red Glow */
}
html.christmas #loader {
    border-top-color: #c41e3a; /* Berry Red */
    border-left-color: #ffffff; /* Snow White */
}
html.christmas #preloader-container::after {
    content: '❄️'; /* Snowflake */
}

/* -----------------------------------------
   2. Halloween Effect
   ----------------------------------------- */
html.halloween #preloader-container {
    background-color: #1a1a1a; /* Dark Night */
}
html.halloween .preloader-header .preloader-logo {
    color: #ff7518; /* Pumpkin Orange */
    font-family: 'Creepster', cursive, var(--font-heading); /* Optional: Spooky font fallback */
    text-shadow: 2px 2px 0px #000;
}
html.halloween #loader {
    border-top-color: #ff7518;
    border-left-color: #800080; /* Purple */
}
html.halloween #preloader-container::after {
    content: '🎃'; /* Jack-o-lantern */
}

/* -----------------------------------------
   3. Valentine's Effect
   ----------------------------------------- */
html.valentines #preloader-container {
    background-color: #3e0e1a; /* Dark Wine */
}
html.valentines .preloader-header .preloader-logo {
    color: #ff69b4; /* Hot Pink */
}
html.valentines #loader {
    border-top-color: #ff1493; /* Deep Pink */
    border-left-color: #ffc0cb; /* Pink */
}
html.valentines #preloader-container::after {
    content: '❤️'; /* Heart */
    color: #ff0000;
}

/* -----------------------------------------
   4. Easter Effect
   ----------------------------------------- */
html.easter #preloader-container {
    background-color: #fffbf0; /* Creamy White */
}
html.easter .preloader-header .preloader-logo {
    color: #5dade2; /* Pastel Blue */
}
html.easter #loader {
    border-top-color: #af7ac5; /* Pastel Purple */
    border-left-color: #58d68d; /* Pastel Green */
}
html.easter #preloader-container::after {
    content: '🐰'; /* Bunny */
}

/* -----------------------------------------
   5. New Year's Effect
   ----------------------------------------- */
html.new_years #preloader-container {
    background-color: #000000;
}
html.new_years .preloader-header .preloader-logo {
    background: -webkit-linear-gradient(#ffd700, #ffec8b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
html.new_years #loader {
    border-top-color: #ffd700; /* Gold */
    border-left-color: #c0c0c0; /* Silver */
}
html.new_years #preloader-container::after {
    content: '🥂'; /* Toast */
}

/* -----------------------------------------
   6. Guy Fawkes (Bonfire Night)
   ----------------------------------------- */
html.guy_fawkes #preloader-container {
    background-color: #0d0d26; /* Dark Blue/Black */
}
html.guy_fawkes .preloader-header .preloader-logo {
    color: #ff4500; /* Orange Red */
    text-shadow: 0 0 10px #ff8c00;
}
html.guy_fawkes #loader {
    border-top-color: #ff0000;
    border-left-color: #ffff00;
    box-shadow: 0 0 15px #ff4500; /* Glow effect */
}
html.guy_fawkes #preloader-container::after {
    content: '🎆'; /* Fireworks */
}