/* Animations */
@keyframes fog-drift {
    0%, 100% { 
        transform: translateX(-10px) translateY(-5px); 
        opacity: 0.3;
    }
    25% { 
        transform: translateX(10px) translateY(5px); 
        opacity: 0.5;
    }
    50% { 
        transform: translateX(-5px) translateY(10px); 
        opacity: 0.4;
    }
    75% { 
        transform: translateX(5px) translateY(-10px); 
        opacity: 0.6;
    }
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(127, 29, 29, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 6px 25px rgba(127, 29, 29, 0.5);
    }
}

@keyframes title-glow {
    0% { 
        text-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    }
    100% { 
        text-shadow: 0 0 50px rgba(220, 38, 38, 0.8), 0 0 80px rgba(220, 38, 38, 0.3);
    }
}

@keyframes flicker {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.8; 
    }
    51% { 
        opacity: 1; 
    }
    52% { 
        opacity: 0.9; 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

@keyframes slide-in-left {
    0% { 
        transform: translateX(-100%); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slide-in-right {
    0% { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes fade-in {
    0% { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.3); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.6), 0 0 30px rgba(220, 38, 38, 0.4); 
    }
}

/* Animation Classes */
.heartbeat {
    animation: heartbeat 2s ease-in-out infinite;
}

.flicker {
    animation: flicker 3s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.slide-in-left {
    animation: slide-in-left 0.6s ease-out;
}

.slide-in-right {
    animation: slide-in-right 0.6s ease-out;
}

.fade-in {
    animation: fade-in 0.8s ease-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Hover Effects */
.module-card:hover .module-icon {
    animation: pulse 1s ease-in-out infinite;
}

.nav-link:hover {
    animation: glow 0.5s ease-in-out;
}

.btn-primary:hover {
    animation: pulse 0.3s ease-in-out;
}

/* Transition Classes */
.transition-all {
    transition: all 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(220, 38, 38, 0.3);
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particle Effects */
.particle {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-delay: -2s;
}

.particle:nth-child(even) {
    animation-delay: -1s;
}

/* Text Effects */
.text-shadow-glow {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.text-shadow-strong {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.8), 0 0 40px rgba(220, 38, 38, 0.4);
}

/* Background Effects */
.bg-noise {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter></defs><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.1"/></svg>');
}

.bg-grain {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><filter id="grain"><feTurbulence baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter></defs><rect width="100%" height="100%" filter="url(%23grain)" opacity="0.05"/></svg>');
}
