/**
 * Pixelnetz v2 - Animations CSS
 * Schnee, Wiggle, Twinkle und andere Animationen
 */

/* Wiggle Animation (für heutiges Türchen) */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

/* Twinkle Animation (für Sterne) */
@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spin */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Schnee Animation
   ========================================== */

.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;
    color: white;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: fall linear infinite;
    opacity: 0.8;
}

@keyframes fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.2;
    }
}

/* Snowflake Variations */
.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 0.8rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.2rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 2s; font-size: 0.6rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 11s; animation-delay: 3s; font-size: 0.9rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 9s; animation-delay: 1.5s; font-size: 1.1rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 13s; animation-delay: 2.5s; font-size: 0.7rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 10s; animation-delay: 0.8s; font-size: 1.3rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 15s; animation-delay: 4s; font-size: 0.5rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 7s; animation-delay: 1.2s; font-size: 1rem; }

/* Additional snowflakes for denser effect */
.snowflake:nth-child(11) { left: 10%; animation-duration: 11s; animation-delay: 5s; font-size: 0.9rem; }
.snowflake:nth-child(12) { left: 20%; animation-duration: 9s; animation-delay: 3.5s; font-size: 0.7rem; }
.snowflake:nth-child(13) { left: 30%; animation-duration: 13s; animation-delay: 6s; font-size: 1.1rem; }
.snowflake:nth-child(14) { left: 40%; animation-duration: 8s; animation-delay: 4.5s; font-size: 0.8rem; }
.snowflake:nth-child(15) { left: 50%; animation-duration: 12s; animation-delay: 7s; font-size: 1rem; }
.snowflake:nth-child(16) { left: 60%; animation-duration: 10s; animation-delay: 5.5s; font-size: 0.6rem; }
.snowflake:nth-child(17) { left: 70%; animation-duration: 14s; animation-delay: 8s; font-size: 1.2rem; }
.snowflake:nth-child(18) { left: 80%; animation-duration: 9s; animation-delay: 6.5s; font-size: 0.85rem; }
.snowflake:nth-child(19) { left: 90%; animation-duration: 11s; animation-delay: 9s; font-size: 0.95rem; }
.snowflake:nth-child(20) { left: 2%; animation-duration: 16s; animation-delay: 7.5s; font-size: 1.15rem; }

/* ==========================================
   Utility Animation Classes
   ========================================== */

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease-out forwards;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Staggered animations for lists */
.animate-stagger > * {
    opacity: 0;
    animation: slideUp 0.4s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.02s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.04s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.06s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.08s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.12s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.14s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.16s; }
.animate-stagger > *:nth-child(9) { animation-delay: 0.18s; }
.animate-stagger > *:nth-child(10) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(11) { animation-delay: 0.22s; }
.animate-stagger > *:nth-child(12) { animation-delay: 0.24s; }
.animate-stagger > *:nth-child(13) { animation-delay: 0.26s; }
.animate-stagger > *:nth-child(14) { animation-delay: 0.28s; }
.animate-stagger > *:nth-child(15) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(16) { animation-delay: 0.32s; }
.animate-stagger > *:nth-child(17) { animation-delay: 0.34s; }
.animate-stagger > *:nth-child(18) { animation-delay: 0.36s; }
.animate-stagger > *:nth-child(19) { animation-delay: 0.38s; }
.animate-stagger > *:nth-child(20) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(21) { animation-delay: 0.42s; }
.animate-stagger > *:nth-child(22) { animation-delay: 0.44s; }
.animate-stagger > *:nth-child(23) { animation-delay: 0.46s; }
.animate-stagger > *:nth-child(24) { animation-delay: 0.48s; }

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: box-shadow var(--transition-fast);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .snow-container {
        display: none;
    }
}
