/* P99 Clock Easter Eggs */
/* Fireworks and seasonal effects */

/* ========================================
   FIREWORKS (July 4th, 9pm-midnight)
   ======================================== */

#fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: none;
}

#fireworks-container.active {
    display: block;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: launch 1s ease-out forwards;
}

@keyframes launch {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-400px);
        opacity: 0;
    }
}

.firework-burst {
    position: absolute;
    width: 8px;
    height: 8px;
}

.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: explode 1.2s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.firework-trail {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    animation: trail-fade 0.5s ease-out forwards;
}

@keyframes trail-fade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Patriotic colors */
.color-red {
    background: radial-gradient(circle, #ff0000, #cc0000);
    box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
}

.color-white {
    background: radial-gradient(circle, #ffffff, #cccccc);
    box-shadow: 0 0 20px #ffffff, 0 0 40px #ffffff;
}

.color-blue {
    background: radial-gradient(circle, #0066ff, #0044cc);
    box-shadow: 0 0 20px #0066ff, 0 0 40px #0066ff;
}

.color-gold {
    background: radial-gradient(circle, #ffd700, #ffaa00);
    box-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700;
}

/* Large burst fireworks */
.firework-large .firework-particle {
    width: 6px;
    height: 6px;
    animation-duration: 1.5s;
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: sparkle 0.8s ease-out forwards;
    box-shadow: 0 0 10px white;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(50px);
    }
}

/* ========================================
   SNOW (December 25th)
   ======================================== */

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    display: none;
}

#snow-container.active {
    display: block;
}

.snowflake {
    position: absolute;
    color: white;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
    0% {
        transform: translateY(-10px) translateX(0);
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift));
    }
}

@keyframes gentle-sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

/* ========================================
   SANTA HAT (December 25th)
   ======================================== */

#santa-hat {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    pointer-events: none;
    display: none;
    z-index: 1;
}

#santa-hat.active {
    display: block;
}

.santa-hat-main {
    width: 60px;
    height: 45px;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    border-radius: 0 50% 0 0;
    position: relative;
}

.santa-hat-trim {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: white;
    border-radius: 4px;
}

.santa-hat-pom {
    position: absolute;
    top: -12px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Add fluffy texture to hat */
.santa-hat-main::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 50%);
    border-radius: inherit;
}

/* ========================================
   WINTER BACKGROUND (December 25th)
   ======================================== */

.winter-mode {
    background: linear-gradient(to bottom, 
        #b0c4de 0%,
        #e6f0ff 40%,
        #ffffff 60%,
        #f0f8ff 100%) !important;
}

.winter-mode #stars {
    opacity: 0 !important;
}

/* Ground snow effect */
.snow-ground {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
    z-index: 3;
    display: none;
}

.snow-ground.active {
    display: block;
}

/* ========================================
   HOLIDAY SIGN (Regional holidays)
   ======================================== */

.holiday-sign {
    position: fixed;
    bottom: 80px;
    right: 40px;
    pointer-events: none;
    z-index: 2;
    display: none;
    animation: sign-sway 3s ease-in-out infinite;
}

.holiday-sign.active {
    display: block;
}

.holiday-sign-post {
    width: 6px;
    height: 100px;
    background: linear-gradient(to bottom, #654321, #3d2817);
    margin: 0 auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.holiday-sign-board {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border: 3px solid #654321;
    border-radius: 8px;
    padding: 12px 20px;
    margin-top: -10px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Wood grain texture */
.holiday-sign-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 11px
    );
    border-radius: 5px;
    pointer-events: none;
}

.holiday-sign-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.3);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* Gentle sway animation */
@keyframes sign-sway {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

/* Nail details */
.holiday-sign-board::after {
    content: '⚫';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 8px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .holiday-sign {
        bottom: 60px;
        right: 20px;
        transform: scale(0.8);
    }
    
    .holiday-sign-text {
        font-size: 14px;
    }
}

/* ========================================
   NATIONAL FLAGS (for special holidays)
   ======================================== */

.national-flag {
    position: absolute;
    top: -15px;
    right: -70px;
    width: 60px;
    height: 40px;
    border: 2px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    display: none;
    animation: flag-wave 2s ease-in-out infinite;
}

.national-flag.active {
    display: block;
}

/* US Flag (Independence Day - July 4th) */
.flag-us {
    background: 
        linear-gradient(to bottom, 
            #b22234 0%, #b22234 7.69%, 
            white 7.69%, white 15.38%,
            #b22234 15.38%, #b22234 23.08%,
            white 23.08%, white 30.77%,
            #b22234 30.77%, #b22234 38.46%,
            white 38.46%, white 46.15%,
            #b22234 46.15%, #b22234 53.85%,
            white 53.85%, white 61.54%,
            #b22234 61.54%, #b22234 69.23%,
            white 69.23%, white 76.92%,
            #b22234 76.92%, #b22234 84.62%,
            white 84.62%, white 92.31%,
            #b22234 92.31%, #b22234 100%
        );
}

.flag-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.85%;
    background: #3c3b6e;
}

.flag-us::after {
    content: '⭐⭐⭐⭐⭐\A⭐⭐⭐⭐\A⭐⭐⭐⭐⭐\A⭐⭐⭐⭐';
    white-space: pre;
    position: absolute;
    top: 2px;
    left: 2px;
    color: white;
    font-size: 4px;
    line-height: 4px;
    letter-spacing: 1px;
}

/* Australian Flag (Australia Day - January 26th) */
.flag-au {
    background: #00008b;
}

.flag-au::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: 
        linear-gradient(to bottom right, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(to bottom left, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(to top right, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(to top left, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(to bottom, transparent 48%, white 48%, white 52%, transparent 52%),
        linear-gradient(to right, transparent 48%, white 48%, white 52%, transparent 52%);
    background-size: 100% 100%;
}

.flag-au::after {
    content: '⭐';
    position: absolute;
    bottom: 8px;
    right: 12px;
    color: white;
    font-size: 12px;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Canadian Flag (Canada Day - July 1st) */
.flag-ca {
    background: 
        linear-gradient(to right, 
            #ff0000 0%, #ff0000 25%, 
            white 25%, white 75%, 
            #ff0000 75%, #ff0000 100%
        );
}

.flag-ca::before {
    content: '🍁';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #ff0000;
}

/* Flag waving animation */
@keyframes flag-wave {
    0%, 100% {
        transform: perspective(100px) rotateY(-5deg);
    }
    50% {
        transform: perspective(100px) rotateY(5deg);
    }
}

/* Flag pole */
.flag-pole {
    position: absolute;
    top: -15px;
    right: -80px;
    width: 3px;
    height: 50px;
    background: linear-gradient(to bottom, #888, #555);
    display: none;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.4);
}

.flag-pole.active {
    display: block;
}

/* Mobile flag adjustments */
@media (max-width: 768px) {
    .national-flag {
        width: 48px;
        height: 32px;
        right: -60px;
        top: -10px;
    }
    
    .flag-pole {
        right: -68px;
        height: 40px;
    }
    
    .flag-ca::before {
        font-size: 16px;
    }
    
    .flag-au::after {
        font-size: 10px;
    }
}

