/* =====================================================
   ATOM Casino - Animations
   Атомные орбитальные анимации
   ===================================================== */

/* =====================================================
   Keyframes
   ===================================================== */

/* Orbit Rotation */
@keyframes orbit-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Ring Spins - 3D Effect */
@keyframes ring-spin-1 {
    from {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

@keyframes ring-spin-2 {
    from {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(60deg);
    }
    to {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(420deg);
    }
}

@keyframes ring-spin-3 {
    from {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(120deg);
    }
    to {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(480deg);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Float Particle */
@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }
    25% {
        transform: translate(20px, -30px);
        opacity: 0.8;
    }
    50% {
        transform: translate(-10px, -50px);
        opacity: 0.6;
    }
    75% {
        transform: translate(-30px, -20px);
        opacity: 0.8;
    }
}

/* Glow Pulse */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.8), 0 0 60px rgba(59, 130, 246, 0.4);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Particle Float */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-100px) translateX(25px);
    }
    50% {
        transform: translateY(-200px) translateX(-25px);
    }
    75% {
        transform: translateY(-300px) translateX(15px);
    }
}

/* Shimmer */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Rotate Slow */
@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   Animation Classes
   ===================================================== */

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* Fade Variants */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Atom Glow */
.atom-glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Floating Elements */
.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-fast {
    animation: float 4s ease-in-out infinite;
}

/* Rotate */
.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* =====================================================
   Particle System
   ===================================================== */

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 10s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 10s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 11s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 13s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 12s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; animation-duration: 10s; }

/* =====================================================
   Loading Animation
   ===================================================== */

.loader {
    width: 50px;
    height: 50px;
    position: relative;
}

.loader-atom {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--accent-violet);
    border-radius: 50%;
    animation: orbit-rotate 1s linear infinite;
}

.loader-atom:nth-child(2) {
    inset: 5px;
    border-top-color: var(--accent-blue);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.loader-atom:nth-child(3) {
    inset: 10px;
    border-top-color: var(--accent-pink);
    animation-duration: 2s;
}

/* =====================================================
   Button Animations
   ===================================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* =====================================================
   Card Animations
   ===================================================== */

.game-card,
.feature-card,
.bonus-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* =====================================================
   Text Animations
   ===================================================== */

.text-gradient-animate {
    background: linear-gradient(
        90deg,
        #6366f1,
        #8b5cf6,
        #a855f7,
        #ec4899,
        #8b5cf6,
        #6366f1
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease infinite;
}

/* =====================================================
   Mobile Menu Animation
   ===================================================== */

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================
   Scroll Progress Bar
   ===================================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* =====================================================
   Prefers Reduced Motion
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .particle {
        animation: none;
    }
    
    .atom-glow,
    .float,
    .float-slow,
    .float-fast,
    .rotate-slow {
        animation: none;
    }
    
    .shimmer,
    .text-gradient-animate {
        animation: none;
    }
}

