/* ===================================
   EFECTOS NAVIDEÑOS - NIEVE Y DECORACIONES
   =================================== */

/* Contenedor para los copos de nieve */
.snowflakes {
    position: fixed;
    top: -10px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Estilo base de cada copo */
.snowflake {
    position: absolute;
    top: -10px;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    opacity: 0.8;
    animation: snowfall linear infinite;
    will-change: transform;
}

/* Animación de caída de nieve */
@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotateZ(0deg);
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(var(--tx)) rotateZ(360deg);
        opacity: 0;
    }
}

/* Variaciones de copos para diferentes tamaños */
.snowflake.size-1 {
    font-size: 0.5em;
    opacity: 0.6;
}

.snowflake.size-2 {
    font-size: 1em;
    opacity: 0.7;
}

.snowflake.size-3 {
    font-size: 1.5em;
    opacity: 0.8;
}

.snowflake.size-4 {
    font-size: 2em;
    opacity: 0.9;
}

/* Variaciones de duración para efecto más natural */
.snowflake.speed-slow {
    animation-duration: 20s;
}

.snowflake.speed-normal {
    animation-duration: 15s;
}

.snowflake.speed-fast {
    animation-duration: 10s;
}

/* ===================================
   ICONOS DECORATIVOS NAVIDEÑOS
   =================================== */

.christmas-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.decoration-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.decoration-item.star {
    animation: twinkle 3s ease-in-out infinite, float 6s ease-in-out infinite;
}

.decoration-item.tree {
    animation: sway 4s ease-in-out infinite;
}

/* Animación de flotación suave */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
    }
    50% {
        transform: translateY(-20px) rotateZ(5deg);
    }
}

/* Animación de parpadeo para estrellas */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

/* Animación de balanceo para árboles */
@keyframes sway {
    0%, 100% {
        transform: translateX(0) rotateZ(-2deg);
    }
    50% {
        transform: translateX(10px) rotateZ(2deg);
    }
}

/* ===================================
   TEMAS DE COLOR NAVIDEÑO
   =================================== */

/* Tema Clásico Rojo/Verde */
body.christmas-theme-clasico {
    --primary-xmas: #c41e3a;
    --secondary-xmas: #165b33;
    --accent-xmas: #ffd700;
}

.christmas-theme-clasico .snowflake {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

/* Tema Azul/Blanco */
body.christmas-theme-azul {
    --primary-xmas: #003f87;
    --secondary-xmas: #ffffff;
    --accent-xmas: #87ceeb;
}

.christmas-theme-azul .snowflake {
    color: #e8f4f8;
    text-shadow: 0 0 8px rgba(135, 206, 235, 0.7);
}

/* Tema Dorado */
body.christmas-theme-dorado {
    --primary-xmas: #2c1810;
    --secondary-xmas: #ffd700;
    --accent-xmas: #ff8c00;
}

.christmas-theme-dorado .snowflake {
    color: #fffacd;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

/* ===================================
   DECORACIONES ESPECIALES
   =================================== */

.christmas-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #c41e3a 0%, #165b33 50%, #c41e3a 100%);
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: shimmer 3s ease-in-out infinite;
}

.christmas-banner .close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.christmas-banner .close-btn:hover {
    background: rgba(255, 255, 255, 0.6);
}

@keyframes shimmer {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* ===================================
   LUCES NAVIDEÑAS
   =================================== */

.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 999;
}

.light-bulb {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 5px 15px;
    animation: blink 1s ease-in-out infinite;
}

.light-bulb.red {
    background-color: #c41e3a;
}

.light-bulb.green {
    background-color: #165b33;
}

.light-bulb.gold {
    background-color: #ffd700;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px currentColor;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 5px currentColor;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .snowflake {
        font-size: 0.8em;
    }

    .decoration-item {
        font-size: 1.5rem;
    }

    .christmas-banner {
        padding: 10px;
        font-size: 1rem;
    }
}

/* Deshabilitar efectos en impresión */
@media print {
    .snowflakes,
    .christmas-decorations,
    .christmas-banner,
    .christmas-lights {
        display: none !important;
    }
}
