/* Animation Keyframes */
@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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.6);
    }
}

/* Page Load Animations */
.hero-section {
    animation: fadeInUp 1s ease-out;
}

.hero-content {
    animation: fadeInLeft 1s ease-out 0.3s both;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.6s both;
}

.quick-nav-section {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.games-section {
    animation: fadeInUp 1s ease-out 1.2s both;
}

.promotions-section {
    animation: fadeInUp 1s ease-out 1.5s both;
}

.leaderboard-section {
    animation: fadeInUp 1s ease-out 1.8s both;
}

.registration-steps {
    animation: fadeInUp 1s ease-out 2.1s both;
}

.reviews-section {
    animation: fadeInUp 1s ease-out 2.4s both;
}

.faq-section {
    animation: fadeInUp 1s ease-out 2.7s both;
}

.cta-section {
    animation: fadeInUp 1s ease-out 3s both;
}

/* Staggered Card Animations */
.game-card {
    animation: scaleIn 0.6s 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; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

.promotion-card {
    animation: scaleIn 0.6s ease-out both;
}

.promotion-card:nth-child(1) { animation-delay: 0.1s; }
.promotion-card:nth-child(2) { animation-delay: 0.2s; }
.promotion-card:nth-child(3) { animation-delay: 0.3s; }

.step-card {
    animation: scaleIn 0.6s ease-out both;
}

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }

.review-card {
    animation: scaleIn 0.6s ease-out both;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }

/* Hover Animations */
.btn:hover {
    animation: pulse 0.3s ease-in-out;
}

.quick-nav-btn:hover {
    animation: bounce 0.6s ease-in-out;
}

.game-card:hover .game-icon {
    animation: scaleIn 0.3s ease-out;
}

.promotion-icon {
    animation: float 3s ease-in-out infinite;
}

.promotion-card:hover .promotion-icon {
    animation: rotate 1s ease-in-out;
}

.step-number {
    animation: glow 2s ease-in-out infinite;
}

.step-card:hover .step-number {
    animation: bounce 0.6s ease-in-out;
}

.review-stars {
    animation: fadeInUp 0.5s ease-out 0.5s both;
}

/* Loading States */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll-triggered Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Interactive Animations */
.nav-link:hover {
    animation: pulse 0.3s ease-in-out;
}

.register-btn:hover {
    animation: glow 1s ease-in-out infinite;
}

.game-btn:hover,
.promotion-btn:hover,
.step-btn:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Jackpot Counter Animation */
.jackpot-amount {
    animation: pulse 2s ease-in-out infinite;
}

/* Leaderboard Item Animations */
.leaderboard-item {
    animation: slideInFromTop 0.5s ease-out both;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.3s; }

.rank {
    animation: scaleIn 0.5s ease-out both;
}

/* FAQ Item Animations */
.faq-item {
    animation: fadeInUp 0.6s ease-out both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

/* Social Links Animation */
.social-links a {
    animation: float 3s ease-in-out infinite;
}

.social-links a:nth-child(1) { animation-delay: 0s; }
.social-links a:nth-child(2) { animation-delay: 0.5s; }
.social-links a:nth-child(3) { animation-delay: 1s; }

/* Mobile Menu Animation */
.nav-menu {
    transition: left 0.3s ease-in-out;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Progress Bar Animation */
.progress-bar {
    width: 0%;
    height: 4px;
    background: var(--gradient-primary);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Button Click Animation */
.btn:active {
    transform: scale(0.95);
}

/* Card Flip Animation */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* Reduce motion for accessibility */
@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;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .btn:hover,
    .game-card:hover,
    .promotion-card:hover,
    .step-card:hover,
    .review-card:hover,
    .faq-item:hover {
        animation: none;
        transform: none;
    }
} 