/*
 * Tema navideño especial para el sistema de cartas
 * Efectos visuales y animaciones festivas
 */

/* ===== EFECTO DE NIEVE ===== */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation-name: caer;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.snowflake.small {
    width: 4px;
    height: 4px;
}

.snowflake.medium {
    width: 6px;
    height: 6px;
}

.snowflake.large {
    width: 8px;
    height: 8px;
}

@keyframes caer {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== LUCES NAVIDEÑAS ===== */
.lights-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 999;
    pointer-events: none;
}

.christmas-light {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    top: 10px;
    animation: parpadear 1.5s infinite alternate;
    box-shadow: 0 0 10px currentColor;
}

@keyframes parpadear {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Colores de luces */
.light-red { background-color: #ff0000; color: #ff0000; }
.light-green { background-color: #00ff00; color: #00ff00; }
.light-blue { background-color: #0000ff; color: #0000ff; }
.light-yellow { background-color: #ffff00; color: #ffff00; }
.light-purple { background-color: #ff00ff; color: #ff00ff; }

/* ===== ESTRELLAS CENTELLEANTES ===== */
.twinkle-star {
    position: absolute;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23ffd700" d="M12,2 L14.5,8.5 L21.5,9.5 L16.5,14.5 L18,21.5 L12,17.5 L6,21.5 L7.5,14.5 L2.5,9.5 L9.5,8.5 Z"/></svg>');
    width: 20px;
    height: 20px;
    animation: centellear 3s infinite;
}

@keyframes centellear {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== GUIRNALDAS ===== */
.garland {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 998;
    pointer-events: none;
}

.garland-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #ff0000 20%, 
        #00ff00 40%, 
        #0000ff 60%, 
        #ffff00 80%, 
        transparent 100%);
    animation: moverGarland 20s linear infinite;
}

@keyframes moverGarland {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== REGALOS ANIMADOS ===== */
.gift-box {
    position: fixed;
    bottom: 0;
    width: 60px;
    height: 60px;
    z-index: 997;
    animation: subirRegalo 15s linear infinite;
    opacity: 0;
}

.gift-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--color-principal), var(--color-acento));
    border-radius: 10px;
}

.gift-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 20px;
    background: var(--color-acento);
    border-radius: 5px;
}

@keyframes subirRegalo {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== COPOS DE NIEVE ESPECIALES ===== */
.snowflake-special {
    position: absolute;
    background: white;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.9;
    animation: caerFlake 10s linear infinite;
}

@keyframes caerFlake {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== BOTONES NAVIDEÑOS ===== */
.btn-navidad {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, 
        var(--color-principal), 
        var(--color-acento), 
        var(--color-secundario));
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    border: none;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-navidad::after {
    content: '🎄';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

/* ===== TARJETAS NAVIDEÑAS ===== */
.card-navidad {
    background: linear-gradient(135deg, 
        rgba(196, 30, 58, 0.1), 
        rgba(255, 215, 0, 0.1),
        rgba(26, 71, 42, 0.1));
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, var(--color-principal), var(--color-acento)) 1;
    position: relative;
}

.card-navidad::before {
    content: '🎅';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 2em;
    z-index: 1;
}

/* ===== ANIMACIONES DE ENTRADA NAVIDEÑAS ===== */
@keyframes entradaNavidad {
    0% {
        transform: translateY(50px) scale(0.8);
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

.entrada-navidad {
    animation: entradaNavidad 1s ease-out;
}

/* ===== EFECTO DE VELAS ===== */
.candle {
    position: fixed;
    bottom: 20px;
    width: 20px;
    height: 40px;
    background: linear-gradient(to bottom, #8B4513, #A0522D);
    border-radius: 5px;
    z-index: 996;
}

.candle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 15px;
    background: linear-gradient(to bottom, #FF4500, #FFD700);
    border-radius: 50% 50% 20% 20%;
    animation: flame 0.5s infinite alternate;
}

@keyframes flame {
    0%, 100% { 
        transform: translateX(-50%) scaleY(1); 
        opacity: 0.8;
    }
    50% { 
        transform: translateX(-50%) scaleY(1.2); 
        opacity: 1;
    }
}

/* ===== CAMPANAS ===== */
.bell {
    position: fixed;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, var(--color-acento), #b8860b);
    border-radius: 50% 50% 40% 40%;
    animation: campanear 2s infinite;
    transform-origin: top center;
}

@keyframes campanear {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

/* ===== MODOS DE EFECTOS ===== */
.effects-on .snowflake,
.effects-on .christmas-light,
.effects-on .twinkle-star,
.effects-on .garland-line,
.effects-on .gift-box,
.effects-on .snowflake-special,
.effects-on .candle,
.effects-on .bell {
    display: block;
}

.effects-off .snowflake,
.effects-off .christmas-light,
.effects-off .twinkle-star,
.effects-off .garland-line,
.effects-off .gift-box,
.effects-off .snowflake-special,
.effects-off .candle,
.effects-off .bell {
    display: none;
}

/* ===== RESPONSIVE PARA EFECTOS ===== */
@media (max-width: 768px) {
    .lights-container,
    .garland,
    .gift-box,
    .candle,
    .bell {
        display: none;
    }
    
    .snowflake {
        width: 3px !important;
        height: 3px !important;
    }
}

/* ===== CLASES DE UTILIDAD PARA EFECTOS ===== */
.hidden-effect {
    display: none !important;
}

.visible-effect {
    display: block !important;
}

.effect-slow {
    animation-duration: 3s !important;
}

.effect-fast {
    animation-duration: 0.5s !important;
}

.effect-paused {
    animation-play-state: paused !important;
}

/* ===== TRANSICIONES SUAVES ===== */
.effect-transition {
    transition: all 0.5s ease;
}

/* ===== FILTROS NAVIDEÑOS ===== */
.filter-christmas {
    filter: sepia(0.3) saturate(1.5) hue-rotate(-10deg);
}

.filter-winter {
    filter: brightness(1.1) contrast(1.1) saturate(0.9) blur(0.5px);
}

/* ===== OVERLAY ESPECIAL ===== */
.christmas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 0, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: overlayShift 20s infinite alternate;
}

@keyframes overlayShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}