/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Hero Section Animations */
.hero-title {
    animation: fadeInUp 1.2s ease-out, textGlow 4s ease-in-out infinite;
}

.hero-subtitle {
    animation: fadeInUp 1.2s ease-out 0.3s both;
}

.hero-buttons {
    animation: fadeInUp 1.2s ease-out 0.6s both;
}

/* Feature Cards Animation */
.feature-card {
    animation: fadeInUp 0.8s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* Game Cards Animation */
.game-card {
    animation: fadeInUp 0.8s ease-out both;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }

/* Steps Animation */
.step {
    animation: fadeInUp 0.8s ease-out both;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Hover Effects */
.feature-card:hover .feature-icon,
.game-card:hover .game-icon {
    animation: pulse 2s ease-in-out infinite;
}

.step:hover .step-number {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Button Hover Effects */
.btn:hover {
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Card Hover Effects */
.feature-card:hover,
.game-card:hover,
.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon Animations */
.feature-icon,
.game-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon,
.game-card:hover .game-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

/* Step Number Animation */
.step-number {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: rotate 1s ease-in-out infinite;
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Skip Link Animation */
.skip-link {
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skip-link:focus {
    top: 6px !important;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        opacity: 1;
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .feature-card,
    .game-card,
    .step {
        border: 2px solid var(--accent-color);
        background: rgba(0, 0, 0, 0.8);
    }
    
    .btn {
        border: 2px solid var(--accent-color);
    }
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.feature-card:focus-within,
.game-card:focus-within,
.step:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .background-effects,
    .floating-particles,
    .gradient-overlay {
        display: none;
    }
    
    .feature-card,
    .game-card,
    .step {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn {
        border: 1px solid #000;
        background: none;
        color: #000;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-title {
        animation: fadeInUp 0.8s ease-out;
    }
    
    .hero-subtitle {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }
    
    .hero-buttons {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
    
    .feature-card,
    .game-card,
    .step {
        animation: fadeInUp 0.6s ease-out both;
        animation-delay: 0.1s !important;
    }
}
