/* Animations and Special Effects */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(233, 69, 96, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(233, 69, 96, 0.8), 0 0 30px rgba(233, 69, 96, 0.6);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Background Animation Effects */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(233, 69, 96, 0.1) 0%, 
        rgba(15, 52, 96, 0.1) 25%, 
        rgba(22, 33, 62, 0.1) 50%, 
        rgba(233, 69, 96, 0.1) 75%, 
        rgba(15, 52, 96, 0.1) 100%);
    background-size: 400% 400%;
    animation: shimmer 8s ease-in-out infinite;
    z-index: 1;
}

/* Floating Particles Background */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(233, 69, 96, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    top: 40%;
    left: 60%;
    animation-delay: 4s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 20%;
    animation-delay: 6s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 90%;
    animation-delay: 1s;
    animation-duration: 11s;
}

/* Element Animations */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.9s both;
}

/* Feature Cards Animation */
.feature-card {
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover .feature-icon img {
    animation: pulse 1s ease-in-out;
}

/* Game Cards Animation */
.game-card {
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.game-card:hover img {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

/* Step Cards Animation */
.step {
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.4s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.step-number {
    animation: pulse 2s ease-in-out infinite;
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Navigation Link Animations */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

/* Logo Animation */
.nav-logo img {
    transition: all 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Social Links Animation */
.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.2);
    filter: brightness(1.3);
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--highlight-color);
    animation: rotate 1s ease-in-out infinite;
}

/* Hover Effects for Interactive Elements */
.feature-card:hover .feature-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Glow Effect for Special Elements */
.hero-title:hover {
    animation: glow 2s ease-in-out infinite;
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .hero-title {
        animation: slideInFromTop 1s ease-out;
    }
    
    .hero-subtitle {
        animation: slideInFromTop 1s ease-out 0.2s both;
    }
    
    .hero-buttons {
        animation: slideInFromTop 1s ease-out 0.4s both;
    }
    
    .hero-image {
        animation: slideInFromTop 1s ease-out 0.6s both;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .particles-bg,
    .particle {
        display: none;
    }
}

/* Performance Optimizations */
.feature-card,
.game-card,
.step,
.benefit-item {
    will-change: transform;
}

.btn {
    will-change: transform, box-shadow;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Animations for Accessibility */
.btn:focus,
.nav-link:focus {
    animation: pulse 0.5s ease-in-out;
}

/* Loading States */
.loading-state {
    opacity: 0.7;
    pointer-events: none;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--highlight-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}
