/* Premium Vegas-Style Animations for Landing Page */

/* ============================================
   1. FLOATING & LEVITATION EFFECTS
   ============================================ */

/* Lightweight floating animation for all devices */
@keyframes floatLite {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -3px, 0);
    }
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateZ(0); /* Enable hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    animation: floatLite 8s ease-in-out infinite;
}

/* Slightly stronger effect on desktop */
@media (min-width: 769px) {
    @keyframes floatLite {
        0%, 100% {
            transform: translate3d(0, 0, 0);
        }
        50% {
            transform: translate3d(0, -5px, 0);
        }
    }
    
    .feature-card {
        animation-duration: 6s;
    }
}

.feature-card:nth-child(1) { animation-delay: 0s; }
.feature-card:nth-child(2) { animation-delay: 0.5s; }
.feature-card:nth-child(3) { animation-delay: 1s; }

.feature-card:hover {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

/* ============================================
   2. PREMIUM GLOW EFFECTS
   ============================================ */

/* Simplified glow for mobile performance */
.prize-tier {
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Lightweight glow for all devices */
@keyframes glowLite {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.25);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.4);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    }
}

.prize-tier {
    animation: glowLite 4s ease-in-out infinite;
}

/* Slightly stronger on desktop */
@media (min-width: 769px) {
    .prize-tier {
        animation-duration: 3s;
    }
    
    @keyframes glowLite {
        0%, 100% {
            border-color: rgba(255, 215, 0, 0.3);
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
        }
        50% {
            border-color: rgba(255, 215, 0, 0.5);
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
        }
    }
}

.prize-tier:nth-child(1) { animation-delay: 0s; }
.prize-tier:nth-child(2) { animation-delay: 0.3s; }
.prize-tier:nth-child(3) { animation-delay: 0.6s; }
.prize-tier:nth-child(4) { animation-delay: 0.9s; }
.prize-tier:nth-child(5) { animation-delay: 1.2s; }

/* Lightweight shimmer effect - less frequent */
.prize-tier::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmerLite 8s ease-in-out infinite;
    will-change: auto;
}

@keyframes shimmerLite {
    0%, 100% {
        transform: translate3d(-100%, -100%, 0) rotate(45deg);
    }
    50% {
        transform: translate3d(200%, 200%, 0) rotate(45deg);
    }
}

/* Slightly faster on desktop */
@media (min-width: 769px) {
    .prize-tier::before {
        animation-duration: 6s;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.08),
            transparent
        );
    }
}

/* ============================================
   3. COUNTDOWN TIMER PREMIUM EFFECTS
   ============================================ */

.countdown-unit {
    position: relative;
    background: linear-gradient(145deg, 
        rgba(30, 30, 30, 0.9) 0%, 
        rgba(10, 10, 10, 0.95) 100%
    );
    border: 1px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Only animate on desktop */
@media (min-width: 1024px) {
    .countdown-unit {
        animation: pulseLite 4s ease-in-out infinite;
    }
    
    @keyframes pulseLite {
        0%, 100% {
            border-color: rgba(255, 215, 0, 0.2);
            opacity: 0.95;
        }
        50% {
            border-color: rgba(255, 215, 0, 0.35);
            opacity: 1;
        }
    }
}

/* Slightly stronger on desktop */
@media (min-width: 769px) {
    .countdown-unit {
        animation-duration: 2.5s;
    }
    
    @keyframes pulseLite {
        0%, 100% {
            transform: scale3d(1, 1, 1);
            border-color: rgba(255, 215, 0, 0.2);
        }
        50% {
            transform: scale3d(1.01, 1.01, 1);
            border-color: rgba(255, 215, 0, 0.4);
        }
    }
}

.countdown-value {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); /* Lighter shadow */
}

/* Desktop only animation */
@media (min-width: 1024px) {
    .countdown-value {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        /* No animation for better performance */
    }
}

/* ============================================
   4. BUTTON ANIMATIONS
   ============================================ */

.btn-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation only on desktop */
@media (min-width: 1024px) {
    .btn-hero {
        animation: buttonShine 5s ease-in-out infinite; /* Slower animation */
    }
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    animation: sweepLite 6s ease-in-out infinite;
}

/* Lightweight sweep animation */
@keyframes sweepLite {
    0%, 100% { 
        transform: translate3d(-100%, 0, 0);
    }
    50% { 
        transform: translate3d(200%, 0, 0);
    }
}

/* Slightly faster on desktop */
@media (min-width: 769px) {
    .btn-hero::before {
        animation-duration: 4s;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
        );
    }
}

/* Lightweight shine effect */
@keyframes shineLite {
    0%, 100% {
        box-shadow: 0 2px 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 2px 20px rgba(255, 215, 0, 0.4);
    }
}

.btn-hero {
    animation: shineLite 4s ease-in-out infinite;
}

/* Desktop version */
@media (min-width: 769px) {
    @keyframes shineLite {
        0%, 100% {
            box-shadow: 
                0 4px 20px rgba(255, 215, 0, 0.4),
                0 0 30px rgba(255, 215, 0, 0.15);
        }
        50% {
            box-shadow: 
                0 4px 25px rgba(255, 215, 0, 0.5),
                0 0 40px rgba(255, 215, 0, 0.2);
        }
    }
}

.btn-hero:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 40px rgba(255, 215, 0, 0.5),
        0 0 80px rgba(255, 215, 0, 0.3);
    animation-play-state: paused;
}

/* Secondary buttons */
.btn-outline-warning {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-warning::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-outline-warning:hover::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   5. VALUE PROPS ANIMATIONS
   ============================================ */

.value-item {
    transition: all 0.3s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Desktop only animation */
@media (min-width: 769px) {
    .value-item {
        animation: iconBounce 4s ease-in-out infinite;
    }
    
    .value-item:nth-child(1) { animation-delay: 0s; }
    .value-item:nth-child(2) { animation-delay: 0.2s; }
    .value-item:nth-child(3) { animation-delay: 0.4s; }
    
    @keyframes iconBounce {
        0%, 100% { transform: translateY(0) rotate(0deg); }
        25% { transform: translateY(-3px) rotate(2deg); }
        75% { transform: translateY(-1px) rotate(-2deg); }
    }
}

.value-icon {
    display: inline-block;
}

/* Desktop only animation */
@media (min-width: 769px) {
    .value-icon {
        animation: iconSpin 8s linear infinite;
    }
    
    @keyframes iconSpin {
        0%, 100% { transform: rotate(0deg) scale(1); }
        25% { transform: rotate(5deg) scale(1.1); }
        50% { transform: rotate(0deg) scale(1); }
        75% { transform: rotate(-5deg) scale(1.1); }
    }
}

/* ============================================
   6. SECTION HEADERS
   ============================================ */

.section-title {
    position: relative;
    display: inline-block;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 40px rgba(255, 165, 0, 0.2);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 60px rgba(255, 165, 0, 0.3);
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        #FFD700,
        #FFA500,
        #FFD700,
        transparent
    );
    animation: lineSlide 3s ease-in-out infinite;
}

@keyframes lineSlide {
    0%, 100% {
        transform: scaleX(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ============================================
   7. LOTTERY NUMBER DISPLAY
   ============================================ */

.number-display {
    position: relative;
    padding: 15px 25px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(30, 30, 30, 0.8) 100%
    );
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    letter-spacing: 5px;
    animation: numberPulse 2s ease-in-out infinite;
    overflow: hidden;
}

@keyframes numberPulse {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.3);
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.2),
            inset 0 0 20px rgba(255, 215, 0, 0.05);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.6);
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.4),
            inset 0 0 30px rgba(255, 215, 0, 0.1);
    }
}

.match-highlight {
    color: #00FF88;
    font-weight: bold;
    text-shadow: 
        0 0 10px #00FF88,
        0 0 20px #00FF88;
    animation: highlightFlash 1s ease-in-out infinite;
}

@keyframes highlightFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   8. CARD ENTRANCE ANIMATIONS
   ============================================ */

.feature-card,
.prize-tier,
.step-card {
    opacity: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Lightweight entrance for all devices */
.feature-card,
.prize-tier,
.step-card {
    opacity: 0;
    animation: fadeInLite 0.6s ease-out forwards;
}

@keyframes fadeInLite {
    from {
        opacity: 0;
        transform: translate3d(0, 15px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.15s; }
.feature-card:nth-child(4) { animation-delay: 0.2s; }

/* Slightly stronger on desktop */
@media (min-width: 769px) {
    @keyframes fadeInLite {
        from {
            opacity: 0;
            transform: translate3d(0, 20px, 0) scale3d(0.98, 0.98, 1);
        }
        to {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
        }
    }
    
    .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; }
    .feature-card:nth-child(4) { animation-delay: 0.4s; }
}

/* ============================================
   9. TESTIMONIAL CARDS
   ============================================ */

.testimonial-card {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 215, 0, 0.2);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Desktop only animation */
@media (min-width: 769px) {
    .testimonial-card {
        animation: testimonialFloat 5s ease-in-out infinite;
    }
    
    @keyframes testimonialFloat {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
        }
        33% {
            transform: translateY(-5px) rotate(1deg);
        }
        66% {
            transform: translateY(-3px) rotate(-1deg);
        }
    }
}

.testimonial-card::before {
    content: '⭐';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 30px;
}

/* Desktop only animation */
@media (min-width: 769px) {
    .testimonial-card::before {
        animation: starRotate 3s linear infinite;
    }
    
    @keyframes starRotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}

/* ============================================
   10. MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .prize-tier::before {
        animation-duration: 10s; /* Slower for performance */
    }
    
    .btn-hero::before {
        animation-duration: 8s; /* Slower for performance */
    }
    
    /* Simpler hover effects on mobile */
    .feature-card:active {
        transform: scale(0.98);
    }
    
    .btn-hero:active {
        transform: scale(0.95);
    }
    
    /* Simplify text shadows */
    .countdown-value,
    .section-title {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }
    
    /* Reduce particle effects */
    .particle {
        animation-duration: 15s !important;
    }
}

/* ============================================
   11. PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use will-change only on desktop for frequently animated elements */
@media (min-width: 769px) {
    .feature-card,
    .prize-tier,
    .btn-hero,
    .countdown-unit {
        will-change: transform, box-shadow;
    }
}

/* On mobile, ensure smooth rendering without will-change */
@media (max-width: 768px) {
    .feature-card,
    .prize-tier,
    .btn-hero,
    .countdown-unit,
    .testimonial-card {
        will-change: auto;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   12. SPECIAL EFFECTS
   ============================================ */

/* Gold particle effect for special sections - Desktop only */
@media (min-width: 769px) {
    .gold-particles {
        position: absolute;
        width: 100%;
        height: 100%;
        overflow: hidden;
        pointer-events: none;
    }
    
    .particle {
        position: absolute;
        width: 4px;
        height: 4px;
        background: radial-gradient(circle, #FFD700 0%, transparent 70%);
        border-radius: 50%;
        animation: particleFloat 10s linear infinite;
    }
    
    @keyframes particleFloat {
        from {
            transform: translateY(100vh) rotate(0deg);
            opacity: 0;
        }
        10% {
            opacity: 1;
        }
        90% {
            opacity: 1;
        }
        to {
            transform: translateY(-100vh) rotate(720deg);
            opacity: 0;
        }
    }
    
    .particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
    .particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 10s; }
    .particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 11s; }
    .particle:nth-child(4) { left: 40%; animation-delay: 6s; animation-duration: 13s; }
    .particle:nth-child(5) { left: 50%; animation-delay: 8s; animation-duration: 12s; }
    .particle:nth-child(6) { left: 60%; animation-delay: 10s; animation-duration: 10s; }
    .particle:nth-child(7) { left: 70%; animation-delay: 1s; animation-duration: 11s; }
    .particle:nth-child(8) { left: 80%; animation-delay: 3s; animation-duration: 13s; }
    .particle:nth-child(9) { left: 90%; animation-delay: 5s; animation-duration: 12s; }
    .particle:nth-child(10) { left: 95%; animation-delay: 7s; animation-duration: 10s; }
}

/* Hide particles on mobile */
@media (max-width: 768px) {
    .gold-particles,
    .particle {
        display: none !important;
    }
}