 /**
 * Seasonal Winter/Christmas Decorations
 * Lightweight CSS-only animations
 * Only active during September-December
 */

/* Snowflakes Container */
#seasonal-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* Snowflakes */
.snowflakes {
    position: absolute;
    top: -100px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation: snowfall linear infinite;
    pointer-events: none;
    user-select: none;
}

/* Individual snowflake positions and timings */
.snowflake:nth-child(1) {
    left: 10%;
    animation-duration: 10s;
    animation-delay: 0s;
    font-size: 1.2em;
}

.snowflake:nth-child(2) {
    left: 20%;
    animation-duration: 12s;
    animation-delay: 1s;
    font-size: 1.5em;
}

.snowflake:nth-child(3) {
    left: 30%;
    animation-duration: 15s;
    animation-delay: 2s;
    font-size: 1.3em;
}

.snowflake:nth-child(4) {
    left: 40%;
    animation-duration: 11s;
    animation-delay: 0.5s;
    font-size: 1.4em;
}

.snowflake:nth-child(5) {
    left: 50%;
    animation-duration: 13s;
    animation-delay: 1.5s;
    font-size: 1.6em;
}

.snowflake:nth-child(6) {
    left: 60%;
    animation-duration: 14s;
    animation-delay: 2.5s;
    font-size: 1.2em;
}

.snowflake:nth-child(7) {
    left: 70%;
    animation-duration: 12s;
    animation-delay: 0.8s;
    font-size: 1.5em;
}

.snowflake:nth-child(8) {
    left: 80%;
    animation-duration: 16s;
    animation-delay: 1.2s;
    font-size: 1.3em;
}

.snowflake:nth-child(9) {
    left: 90%;
    animation-duration: 11s;
    animation-delay: 2.2s;
    font-size: 1.4em;
}

.snowflake:nth-child(10) {
    left: 15%;
    animation-duration: 13s;
    animation-delay: 0.3s;
    font-size: 1.1em;
}

.snowflake:nth-child(11) {
    left: 55%;
    animation-duration: 15s;
    animation-delay: 1.8s;
    font-size: 1.6em;
}

.snowflake:nth-child(12) {
    left: 85%;
    animation-duration: 12s;
    animation-delay: 0.6s;
    font-size: 1.3em;
}

/* Snowfall Animation */
@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* Subtle horizontal drift */
@keyframes drift {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

/* Performance optimizations */
.snowflake {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation: none;
        opacity: 0;
    }
}

/* Mobile optimizations - fewer snowflakes visible */
@media (max-width: 768px) {
    .snowflake {
        font-size: 1em;
    }
    
    .snowflake:nth-child(n+7) {
        display: none;
    }
}

/* Hide on very small screens to maintain performance */
@media (max-width: 480px) {
    .snowflake:nth-child(n+5) {
        display: none;
    }
}

/* Ensure decorations don't interfere with interactive elements */
#seasonal-decorations * {
    pointer-events: none;
    touch-action: none;
}

/* ================================================
   CHRISTMAS CHARACTER (Santa/Christkind)
   Only visible in December
   ================================================ */

.christmas-character {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.character-emoji {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: floatAround 25s ease-in-out infinite;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

/* Subtle hover effect */
.christmas-character:hover .character-emoji {
    opacity: 1;
    transform: scale(1.1);
}

/* Floating animation - moves around screen edges */
@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    10% {
        transform: translate(15vw, 10vh) rotate(5deg);
    }
    20% {
        transform: translate(25vw, 5vh) rotate(-5deg);
    }
    30% {
        transform: translate(35vw, 15vh) rotate(8deg);
    }
    40% {
        transform: translate(50vw, 8vh) rotate(-8deg);
    }
    50% {
        transform: translate(65vw, 12vh) rotate(5deg);
    }
    60% {
        transform: translate(75vw, 5vh) rotate(-5deg);
    }
    70% {
        transform: translate(85vw, 10vh) rotate(8deg);
    }
    80% {
        transform: translate(90vw, 20vh) rotate(-8deg);
    }
    90% {
        transform: translate(80vw, 30vh) rotate(5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Alternative path for variety - random start position */
.christmas-character:nth-of-type(1) .character-emoji {
    animation: floatAroundReverse 30s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes floatAroundReverse {
    0% {
        transform: translate(100vw, 100vh) rotate(0deg);
    }
    10% {
        transform: translate(85vw, 90vh) rotate(-5deg);
    }
    20% {
        transform: translate(75vw, 95vh) rotate(5deg);
    }
    30% {
        transform: translate(65vw, 85vh) rotate(-8deg);
    }
    40% {
        transform: translate(50vw, 92vh) rotate(8deg);
    }
    50% {
        transform: translate(35vw, 88vh) rotate(-5deg);
    }
    60% {
        transform: translate(25vw, 95vh) rotate(5deg);
    }
    70% {
        transform: translate(15vw, 90vh) rotate(-8deg);
    }
    80% {
        transform: translate(10vw, 80vh) rotate(8deg);
    }
    90% {
        transform: translate(20vw, 70vh) rotate(-5deg);
    }
    100% {
        transform: translate(100vw, 100vh) rotate(0deg);
    }
}

/* Responsive sizing */
@media (max-width: 1024px) {
    .character-emoji {
        font-size: 1.75rem;
    }
    
}

@media (max-width: 768px) {
    .character-emoji {
        font-size: 1.5rem;
    }
    
    /* Simpler animation on mobile for performance */
    @keyframes floatAround {
        0% {
            transform: translate(0, 0) rotate(0deg);
        }
        25% {
            transform: translate(25vw, 10vh) rotate(5deg);
        }
        50% {
            transform: translate(50vw, 5vh) rotate(-5deg);
        }
        75% {
            transform: translate(75vw, 10vh) rotate(5deg);
        }
        100% {
            transform: translate(0, 0) rotate(0deg);
        }
    }
}

@media (max-width: 480px) {
    .character-emoji {
        font-size: 2rem;
    }
    
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .character-emoji {
        animation: none;
        transform: translate(5vw, 5vh);
    }
}

/* Hide on very small screens to maintain performance */
@media (max-width: 360px) {
    .christmas-character {
        display: none;
    }
}

/* ================================================
   SPECIAL CHRISTMAS DAY DECORATIONS (Dec 25th Only!)
   ================================================ */

/* Sparkles/Stars Animation */
.christmas-sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    animation: sparkleFloat 8s ease-in-out infinite;
    opacity: 0;
    pointer-events: none;
}

.sparkle:nth-child(1) { left: 10%; animation-delay: 0s; font-size: 1.2rem; }
.sparkle:nth-child(2) { left: 20%; animation-delay: 0.5s; font-size: 1.8rem; }
.sparkle:nth-child(3) { left: 30%; animation-delay: 1s; font-size: 1.4rem; }
.sparkle:nth-child(4) { left: 40%; animation-delay: 1.5s; font-size: 1.6rem; }
.sparkle:nth-child(5) { left: 50%; animation-delay: 2s; font-size: 1.3rem; }
.sparkle:nth-child(6) { left: 60%; animation-delay: 2.5s; font-size: 1.7rem; }
.sparkle:nth-child(7) { left: 70%; animation-delay: 3s; font-size: 1.5rem; }
.sparkle:nth-child(8) { left: 80%; animation-delay: 3.5s; font-size: 1.4rem; }
.sparkle:nth-child(9) { left: 15%; animation-delay: 4s; font-size: 1.6rem; }
.sparkle:nth-child(10) { left: 35%; animation-delay: 4.5s; font-size: 1.3rem; }
.sparkle:nth-child(11) { left: 55%; animation-delay: 5s; font-size: 1.8rem; }
.sparkle:nth-child(12) { left: 75%; animation-delay: 5.5s; font-size: 1.4rem; }
.sparkle:nth-child(13) { left: 25%; animation-delay: 6s; font-size: 1.5rem; }
.sparkle:nth-child(14) { left: 65%; animation-delay: 6.5s; font-size: 1.6rem; }
.sparkle:nth-child(15) { left: 85%; animation-delay: 7s; font-size: 1.3rem; }

@keyframes sparkleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(30px) rotate(180deg) scale(1);
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(60px) rotate(360deg) scale(0);
        opacity: 0;
    }
}


/* Enhanced effects for Christmas Day */
.christmas-day .snowflake {
    animation-duration: 8s;
}

.christmas-day .christmas-character .character-emoji {
    font-size: 2.25rem;
    animation-duration: 20s;
}

/* Twinkling RGB Lights */
.twinkling-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.light {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700;
    animation: twinkle 2s ease-in-out infinite;
}

.light:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.light:nth-child(2) { top: 20%; left: 15%; animation-delay: 0.2s; background: #FF1493; box-shadow: 0 0 10px #FF1493, 0 0 20px #FF1493, 0 0 30px #FF1493; }
.light:nth-child(3) { top: 30%; left: 25%; animation-delay: 0.4s; background: #00FF00; box-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00, 0 0 30px #00FF00; }
.light:nth-child(4) { top: 40%; left: 35%; animation-delay: 0.6s; background: #FF4500; box-shadow: 0 0 10px #FF4500, 0 0 20px #FF4500, 0 0 30px #FF4500; }
.light:nth-child(5) { top: 50%; left: 45%; animation-delay: 0.8s; }
.light:nth-child(6) { top: 60%; left: 55%; animation-delay: 1s; background: #FF1493; box-shadow: 0 0 10px #FF1493, 0 0 20px #FF1493, 0 0 30px #FF1493; }
.light:nth-child(7) { top: 70%; left: 65%; animation-delay: 1.2s; background: #00FF00; box-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00, 0 0 30px #00FF00; }
.light:nth-child(8) { top: 80%; left: 75%; animation-delay: 1.4s; background: #FF4500; box-shadow: 0 0 10px #FF4500, 0 0 20px #FF4500, 0 0 30px #FF4500; }
.light:nth-child(9) { top: 15%; left: 85%; animation-delay: 1.6s; }
.light:nth-child(10) { top: 90%; left: 95%; animation-delay: 1.8s; background: #FF1493; box-shadow: 0 0 10px #FF1493, 0 0 20px #FF1493, 0 0 30px #FF1493; }

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Mobile optimizations for Christmas Day */
@media (max-width: 768px) {
    .sparkle {
        font-size: 1.2rem;
    }
    
    .santa-extra {
        font-size: 1.25rem;
    }
    
}

@media (max-width: 480px) {
    .sparkle:nth-child(n+10) {
        display: none;
    }
    
    .light:nth-child(n+6) {
        display: none;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sparkle,
    .light {
        animation: none;
    }
}

