/* ===================================
   ENHANCED ANIMATIONS SYSTEM
   =================================== */

/* Smooth Page Load Animation */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body {
    animation: fadeInPage 0.6s ease-out;
}

/* ===================================
   HERO SECTION ANIMATIONS
   =================================== */

/* Parallax Video Effect - REMOVED FOR STABILITY */
/* Video Fix to Ensure Centering */
.hero-video {
    animation: none !important;
    transform: translate(-50%, -50%) !important;
}

/* Enhanced Hero Content Animations */
.hero-badge {
    animation: slideInDown 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-title {
    animation: slideInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s backwards;
}

.hero-description {
    animation: slideInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s backwards;
}

.cta-button {
    animation: slideInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s backwards,
        pulseGlow 3s ease-in-out 2s infinite;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
    }
}

/* Pulse Dot Enhanced Animation */
.pulse-dot {
    animation: pulseExpand 2s ease-in-out infinite;
}

@keyframes pulseExpand {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(166, 166, 166, 0.7);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.3);
        box-shadow: 0 0 0 10px rgba(166, 166, 166, 0);
    }
}

/* ===================================
   SECTION ANIMATIONS
   =================================== */

/* Staggered Fade In for Sections */
.section-header {
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   FEATURE CARDS ANIMATIONS
   =================================== */

.feature-card {
    animation: cardSlideIn 0.6s ease-out backwards;
}

.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;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Feature Icon Rotation on Hover */
.feature-card:hover .feature-icon {
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1.1) rotate(0deg);
    }

    25% {
        transform: scale(1.15) rotate(-5deg);
    }

    75% {
        transform: scale(1.15) rotate(5deg);
    }
}

/* ===================================
   PHONE MOCKUP ANIMATIONS
   =================================== */

.prediction-card {
    animation: phoneSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.prediction-card:nth-child(1) {
    animation-delay: 0.2s;
}

.prediction-card:nth-child(2) {
    animation-delay: 0.4s;
}

.prediction-card:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes phoneSlideIn {
    from {
        opacity: 0;
        transform: translateY(60px) rotateX(20deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Phone Screen Glow Effect */
.prediction-card::before {
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Success Badge Animation */
.prediction-badge.success {
    animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.8s backwards;
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   BUTTON ANIMATIONS
   =================================== */

/* CTA Button Hover Effect */
.cta-button:hover {
    animation: buttonShake 0.5s ease-in-out;
}

@keyframes buttonShake {

    0%,
    100% {
        transform: translateY(-2px) rotate(0deg);
    }

    25% {
        transform: translateY(-4px) rotate(-1deg);
    }

    75% {
        transform: translateY(-4px) rotate(1deg);
    }
}

/* Prediction Button Ripple Effect */
.prediction-button {
    position: relative;
    overflow: hidden;
}

.prediction-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.prediction-button:hover::after {
    width: 300px;
    height: 300px;
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

/* Smooth Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   TRUST BANNER ANIMATION
   =================================== */

.trust-banner {
    animation: slideInFromBottom 0.8s ease-out 0.5s backwards;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trust-banner-content {
    animation: marqueeScroll 20s linear infinite;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-10px);
    }
}

/* ===================================
   FOOTER ANIMATIONS
   =================================== */

.footer-telegram {
    transition: all 0.3s ease;
}

.footer-telegram:hover {
    animation: telegramBounce 0.6s ease-in-out;
}

@keyframes telegramBounce {

    0%,
    100% {
        transform: translateY(-2px);
    }

    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

/* ===================================
   LOADING STATES
   =================================== */

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg,
            var(--color-surface) 0%,
            var(--color-secondary) 50%,
            var(--color-surface) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===================================
   MICRO-INTERACTIONS
   =================================== */

/* Smooth Hover Transitions */
a,
button,
.feature-card,
.prediction-card,
.result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale on Active */
button:active,
.cta-button:active {
    transform: scale(0.95);
}

/* ===================================
   PARALLAX EFFECTS
   =================================== */

/* Parallax Background Layers */
.hero::before {
    animation: parallaxFloat 15s ease-in-out infinite alternate;
}

@keyframes parallaxFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

/* ===================================
   TEXT ANIMATIONS
   =================================== */

/* Gradient Text Animation */
.highlight {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Respect User Preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* GPU Acceleration */
.hero-video,
.prediction-card,
.feature-card,
.cta-button {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}