/* Elementos animados - solo visibles en día de muertos */
.day-of-the-dead .spider-animation,
.day-of-the-dead .floating-skulls,
.day-of-the-dead .butterfly {
    display: block;
}

/* Arañita animada colgando */
.spider-animation {
    position: fixed;
    top: -50px;
    left: 10%;
    animation: spiderDrop 8s ease-in-out infinite;
    font-size: 24px;
    z-index: 1000;
    opacity: 0.7;
    pointer-events: none;
    display: none;
}

.spider-animation:nth-child(2) {
    left: 80%;
    animation-delay: 2s;
    animation-duration: 10s;
}

@keyframes spiderDrop {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    20%, 80% {
        transform: translateY(50vh) rotate(360deg);
        opacity: 0.7;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Calaveritas flotantes */
.floating-skulls {
    position: fixed;
    font-size: 18px;
    opacity: 0.4;
    z-index: -1;
    animation: floatAround 15s linear infinite;
    pointer-events: none;
    display: none;
}

.floating-skulls:nth-child(1) { top: 20%; left: 5%; animation-delay: 0s; }
.floating-skulls:nth-child(2) { top: 60%; left: 85%; animation-delay: 3s; animation-duration: 20s; }
.floating-skulls:nth-child(3) { top: 80%; left: 15%; animation-delay: 7s; animation-duration: 25s; }
.floating-skulls:nth-child(4) { top: 30%; left: 75%; animation-delay: 12s; }

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, 15px) rotate(90deg);
    }
    50% {
        transform: translate(0, 30px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, 15px) rotate(270deg);
    }
}

/* Mariposas volando */
.butterfly {
    position: fixed;
    font-size: 16px;
    opacity: 0.6;
    z-index: -1;
    animation: butterflyFlight 20s linear infinite;
    pointer-events: none;
    display: none;
}

.butterfly:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.butterfly:nth-child(2) { top: 70%; left: 90%; animation-delay: 5s; animation-duration: 25s; }
.butterfly:nth-child(3) { top: 40%; left: 5%; animation-delay: 10s; animation-duration: 30s; }

@keyframes butterflyFlight {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    25% {
        transform: translate(100px, 50px) rotate(45deg);
    }
    50% {
        transform: translate(200px, -30px) rotate(90deg);
    }
    75% {
        transform: translate(100px, -80px) rotate(135deg);
    }
    100% {
        transform: translate(0, 0) rotate(180deg);
        opacity: 0;
    }
}

/* Pétalos de cempasúchil cayendo */
.petal {
    position: fixed;
    top: -50px;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    animation: petalFall 3s ease-in forwards;
}

.petal.use-image {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes petalFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift)) rotate(var(--rotation));
        opacity: 0;
    }
}

/* Ocultar animaciones en móvil para mejor rendimiento */
@media (max-width: 768px) {
    .spider-animation,
    .floating-skulls:nth-child(3),
    .floating-skulls:nth-child(4),
    .butterfly:nth-child(3) {
        display: none !important;
    }
}

/* Agregar a animations.css */

/* Vibración suave para emojis de tabs */
.tab-emoji {
    display: inline-block;
    transition: transform 0.3s ease;
}

.tab-button:hover .tab-emoji {
    animation: gentleShake 0.5s ease-in-out;
}

.tab-button.active .tab-emoji {
    animation: floatBounce 2s ease-in-out infinite;
}

@keyframes gentleShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg) scale(1.1); }
    75% { transform: rotate(8deg) scale(1.1); }
}

@keyframes floatBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.05); }
}

/* Reemplazar en animations.css */

@keyframes gentlePulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-3px) scale(1.02) rotate(1deg);
    }
    50% {
        transform: translateY(-5px) scale(1.05) rotate(-1deg);
    }
    75% {
        transform: translateY(-3px) scale(1.02) rotate(1deg);
    }
}

.rat-icon {
    display: inline-block;
    animation: ratWiggle 3s ease-in-out infinite;
}

@keyframes ratWiggle {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-5deg); }
    20% { transform: rotate(5deg); }
    30% { transform: rotate(-3deg); }
    40% { transform: rotate(3deg); }
    50% { transform: rotate(0deg); }
}


/* ===== ANIMACIONES NAVIDEÑAS ===== */

/* Copos de nieve */
.christmas .snowflake {
    display: block !important;
}

.snowflake {
    position: fixed;
    top: -50px;
    color: #fff;
    font-size: 1em;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    animation: snowfall linear forwards;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    display: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift)) rotate(var(--rotation));
        opacity: 0;
    }
}

/* Estrellas brillantes */
.christmas .star {
    display: block !important;
}

.star {
    position: fixed;
    color: #ffd700;
    font-size: 1.2em;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    animation: starTwinkle 3s ease-in-out infinite;
    display: none;
}

.star:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 85%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 70%; left: 10%; animation-delay: 1s; }
.star:nth-child(4) { top: 60%; left: 90%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 40%; left: 50%; animation-delay: 2s; }
.star:nth-child(6) { top: 80%; left: 70%; animation-delay: 2.5s; }

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        filter: drop-shadow(0 0 8px #ffd700);
    }
}

/* Luces navideñas */
.christmas .christmas-light {
    display: block !important;
}

.christmas-light {
    position: fixed;
    top: 20px;
    width: 10px;
    height: 15px;
    border-radius: 50% 50% 40% 40%;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1000;
    animation: lightBlink 2s ease-in-out infinite;
    display: none;
}

.christmas-light:nth-child(1) { left: 10%; background: #ff0000; animation-delay: 0s; }
.christmas-light:nth-child(2) { left: 20%; background: #00ff00; animation-delay: 0.3s; }
.christmas-light:nth-child(3) { left: 30%; background: #ffd700; animation-delay: 0.6s; }
.christmas-light:nth-child(4) { left: 40%; background: #ff0000; animation-delay: 0.9s; }
.christmas-light:nth-child(5) { left: 50%; background: #00ff00; animation-delay: 1.2s; }
.christmas-light:nth-child(6) { left: 60%; background: #ffd700; animation-delay: 1.5s; }
.christmas-light:nth-child(7) { left: 70%; background: #ff0000; animation-delay: 1.8s; }
.christmas-light:nth-child(8) { left: 80%; background: #00ff00; animation-delay: 2.1s; }
.christmas-light:nth-child(9) { left: 90%; background: #ffd700; animation-delay: 2.4s; }

@keyframes lightBlink {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 0 5px currentColor;
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px currentColor;
    }
}

/* Regalos flotantes */
.christmas .gift {
    display: block !important;
}

.gift {
    position: fixed;
    font-size: 2em;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
    animation: giftFloat 20s ease-in-out infinite;
    display: none;
}

.gift:nth-child(1) { top: 25%; left: 8%; animation-delay: 0s; }
.gift:nth-child(2) { top: 65%; left: 92%; animation-delay: 4s; animation-duration: 25s; }
.gift:nth-child(3) { top: 45%; left: 5%; animation-delay: 8s; animation-duration: 30s; }

@keyframes giftFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translate(15px, -20px) rotate(10deg);
        opacity: 0.7;
    }
    50% {
        transform: translate(30px, -10px) rotate(-10deg);
        opacity: 0.6;
    }
    75% {
        transform: translate(15px, -25px) rotate(5deg);
        opacity: 0.7;
    }
}

/* Ocultar en móvil */
@media (max-width: 768px) {
    .christmas-light:nth-child(n+6),
    .star:nth-child(n+4),
    .gift:nth-child(3) {
        display: none !important;
    }
}