/* ========================================
   Daddy Casino - Animations & Effects
   ======================================== */

/* Keyframe Animations */

/* Pulse Effect - оптимизировано для GPU */
@keyframes pulse {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale(1.1);
        opacity: 0.7;
    }
}

/* Rotate Ring - оптимизировано для GPU */
@keyframes rotate-ring {
    from {
        transform: translate3d(-50%, -50%, 0) rotate(0deg);
    }
    to {
        transform: translate3d(-50%, -50%, 0) rotate(360deg);
    }
}

/* Float Animation - оптимизировано для GPU */
@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -10px, 0);
    }
}

/* Twinkle Stars */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

/* Fade In Up - GPU-ускорение */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0); /* GPU-ускорение */
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Down - GPU-ускорение */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Left - GPU-ускорение */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-20px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Right - GPU-ускорение */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(20px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Scale In - GPU-ускорение */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale3d(0.9, 0.9, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Bounce - GPU-ускорение */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40% {
        transform: translate3d(0, -15px, 0);
    }
    60% {
        transform: translate3d(0, -7px, 0);
    }
}

/* Slide In From Bottom - GPU-ускорение */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translate3d(0, 50px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Utility Animation Classes */

/* Fade animations - ускорены для быстрой подгрузки */
.animate-fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease-out forwards;
}

/* Scale animation */
.animate-scale {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Delay classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Intersection Observer Animation Support - оптимизировано для быстрой подгрузки */
.fade-in-section {
    opacity: 0;
    transform: translate3d(0, 20px, 0); /* GPU-ускорение */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Ускорено с 0.8s */
    will-change: opacity, transform; /* Оптимизация производительности */
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0); /* GPU-ускорение */
    will-change: auto; /* Сброс после анимации */
}

/* Hover Effects - ускорены */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px); /* Уменьшено с -5px */
}

.hover-glow {
    transition: box-shadow 0.2s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--dc-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

.progress-bar {
    animation: progressFill 2s ease-out forwards;
}

/* Text Shimmer Effect */
.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--dc-purple) 0%,
        var(--dc-purple-light) 50%,
        var(--dc-purple) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Ripple Effect - GPU-ускорение */
@keyframes ripple {
    0% {
        transform: scale3d(0, 0, 1);
        opacity: 1;
    }
    100% {
        transform: scale3d(4, 4, 1);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ripple-effect:active::after {
    width: 100px;
    height: 100px;
    animation: ripple 0.6s ease-out;
}

/* Gradient Background Animation */
.animated-gradient {
    background: linear-gradient(
        270deg,
        var(--dc-purple),
        var(--dc-indigo),
        var(--dc-violet)
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

/* Parallax Effect Support */
.parallax-slow {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Smooth Reveal on Scroll - ускорено */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translate3d(0, 15px, 0); /* GPU-ускорение */
        transition: opacity 0.4s ease-out, transform 0.4s ease-out; /* Ускорено */
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translate3d(0, 0, 0); /* GPU-ускорение */
    }
}

/* Accessibility - Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .dc-stars {
        animation: none;
    }
    
    .dc-hero-core {
        animation: none;
    }
    
    .dc-hero-ring {
        animation: none;
    }
}

