/* Animations and Background 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 shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Background Animation Effects */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(192, 192, 192, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(15, 52, 96, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

/* Floating Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    animation: float 8s infinite linear;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 6s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 8s;
    animation-duration: 11s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 10s;
    animation-duration: 7s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 12s;
    animation-duration: 13s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 14s;
    animation-duration: 8s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 16s;
    animation-duration: 10s;
}

/* Element Animations */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.6s both;
}

.feature-card {
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.feature-card:hover {
    animation: pulse 0.6s ease-in-out;
}

.game-card {
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.game-card:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

/* 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(--gold-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

/* Logo Animation */
.logo-text {
    background: linear-gradient(45deg, var(--gold-color), var(--silver-color), var(--gold-color));
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Card Hover Effects */
.feature-card, .game-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before, .game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover::before, .game-card:hover::before {
    left: 100%;
}

/* 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(--gold-color);
    animation: rotate 1s ease-in-out infinite;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

/* Text Gradient Animation */
.gradient-text {
    background: linear-gradient(45deg, var(--gold-color), var(--silver-color), var(--gold-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

/* Responsive Animations */
@media (max-width: 768px) {
    .hero-title {
        animation: fadeInUp 0.8s ease-out;
    }
    
    .hero-subtitle {
        animation: fadeInUp 0.8s ease-out 0.1s both;
    }
    
    .hero-buttons {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }
    
    .hero-image {
        animation: fadeInUp 0.8s ease-out 0.3s both;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles {
        display: none;
    }
    
    .hero::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .particles, .hero::after {
        display: none;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}
