/* Particle Animations and 3D Effects */

/* Particle Animation */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: rgba(114, 9, 183, 0.5);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
    box-shadow: 0 0 5px rgba(114, 9, 183, 0.5);
    animation: float-particle 15s ease-in-out infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(calc(100px * var(--random-x, 1)), calc(100px * var(--random-y, 1)));
    }
    50% {
        transform: translate(calc(200px * var(--random-x, 1)), calc(50px * var(--random-y, 1)));
    }
    75% {
        transform: translate(calc(100px * var(--random-x, 1)), calc(200px * var(--random-y, 1)));
    }
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
}

.card-inner {
    transform-style: preserve-3d;
}

.card-inner > * {
    transform: translateZ(20px);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-slow {
    animation: float 6s ease-in-out infinite;
}

.float-medium {
    animation: float 4s ease-in-out infinite;
}

.float-fast {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(114, 9, 183, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(114, 9, 183, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(114, 9, 183, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(50%);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(114, 9, 183, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(114, 9, 183, 0.8);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Typing Animation */
.typing::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Rotating Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-slow {
    animation: rotate 10s linear infinite;
}

.rotate-medium {
    animation: rotate 5s linear infinite;
}

.rotate-fast {
    animation: rotate 3s linear infinite;
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 300% 300%;
    animation: gradient 5s ease infinite;
}

/* 3D Hologram Effect */
.ar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.ar-hologram {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(
        rgba(114, 9, 183, 0.1),
        rgba(0, 180, 216, 0.1),
        rgba(114, 9, 183, 0.1)
    );
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

.ar-hologram::before, .ar-hologram::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(114, 9, 183, 0.8) 0%,
        rgba(0, 180, 216, 0.3) 50%,
        transparent 70%
    );
    filter: blur(10px);
    animation: pulse 3s ease-in-out infinite;
}

.ar-hologram::after {
    animation-delay: 1.5s;
    animation: pulse 4s ease-in-out infinite;
}

/* Stats Overlay */
.stats-overlay {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-10px);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--neutral-dark);
    opacity: 0.8;
}

/* Liquid Button Effect */
.liquid-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(114, 9, 183, 0.8),
        rgba(0, 180, 216, 0.8),
        rgba(114, 9, 183, 0.8)
    );
    background-size: 50% 100%;
    animation: liquid 3s infinite linear;
    z-index: -1;
}

@keyframes liquid {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Neon Highlight */
.neon-highlight {
    color: var(--accent-color);
    text-shadow: 
        0 0 5px rgba(0, 180, 216, 0.5),
        0 0 10px rgba(0, 180, 216, 0.3),
        0 0 15px rgba(0, 180, 216, 0.1);
}

/* Custom Animation for the AI Brain Section */
.brain-particles::before,
.brain-particles::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(114, 9, 183, 0.6);
    filter: blur(5px);
}

.brain-particles::before {
    top: 30%;
    left: 40%;
    animation: brain-particle 5s ease-in-out infinite;
}

.brain-particles::after {
    top: 60%;
    left: 60%;
    animation: brain-particle 7s ease-in-out infinite reverse;
}

@keyframes brain-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(50px, -30px) scale(1.5);
        opacity: 0.9;
    }
    50% {
        transform: translate(0, -60px) scale(1);
        opacity: 0.6;
    }
    75% {
        transform: translate(-50px, -30px) scale(1.5);
        opacity: 0.9;
    }
}

/* Special animations for Mening Bot */

/* Mining Animation */
@keyframes mining {
    0% {
        box-shadow: 0 0 5px rgba(0, 209, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 209, 255, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 209, 255, 0.5);
    }
}

.mining-animation {
    animation: mining 2s infinite;
}

/* Gradient Animation */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientAnimation 5s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Bitcoin Glowing Effect */
@keyframes bitcoinGlow {
    0% {
        text-shadow: 0 0 5px rgba(255, 157, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 157, 0,.8), 0 0 30px rgba(255, 157, 0, 0.4);
    }
    100% {
        text-shadow: 0 0 5px rgba(255, 157, 0, 0.5);
    }
}

.bitcoin-icon {
    animation: bitcoinGlow 3s infinite;
    color: #ff9d00;
}

/* Shimmer effect for primary buttons */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shimmerEffect 3s infinite;
}

@keyframes shimmerEffect {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

/* Pulse animation for the "live" indicators */
.pulse {
    animation: pulseAnimation 1.5s infinite;
}

@keyframes pulseAnimation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(29, 209, 120, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(29, 209, 120, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(29, 209, 120, 0);
    }
}

/* Count animation for numbers */
.count-animation {
    display: inline-block;
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Crypto Card hover effects */
.crypto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crypto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Blinking server light */
.server-light {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    margin-right: 6px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}

/* Glow animation for the CTA button */
.glow-btn {
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    from {
        box-shadow: 0 0 10px rgba(103, 0, 235, 0.6);
    }
    to {
        box-shadow: 0 0 20px rgba(103, 0, 235, 0.9), 0 0 40px rgba(103, 0, 235, 0.4);
    }
}

/* Liquid button effect */
.liquid-btn {
    position: relative;
    overflow: hidden;
}

.liquid-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: translateX(-100%) translateY(-25%) rotate(45deg);
    animation: liquid 3s infinite;
}

@keyframes liquid {
    0% {
        transform: translateX(-100%) translateY(-25%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(-25%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Digital rain animation for background elements */
.digital-rain {
    position: relative;
    overflow: hidden;
}

.digital-rain::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: linear-gradient(to bottom, 
                             rgba(0, 209, 255, 0) 0%,
                             rgba(0, 209, 255, 0.05) 75%,
                             rgba(0, 209, 255, 0) 100%);
    animation: digitalRain 5s linear infinite;
}

@keyframes digitalRain {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(50%);
    }
}

/* 3D card effect */
.card-3d {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) translateZ(10px);
}

/* Оптимизация анимаций для мобильных устройств */

/* Упрощение анимаций частиц для мобильных устройств */
@media (max-width: 768px) {
    .particle {
        opacity: 0.5;
        /* Уменьшаем количество эффектов для улучшения производительности */
        filter: none;
        box-shadow: none;
    }
    
    @keyframes float-particle {
        0%, 100% {
            transform: translate(0, 0);
        }
        50% {
            transform: translate(calc(50px * var(--random-x, 1)), calc(50px * var(--random-y, 1)));
        }
    }
    
    /* Упрощаем 3D эффекты */
    .card-3d:hover {
        transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
    }
    
    /* Уменьшаем интенсивность плавающей анимации */
    @keyframes float {
        0% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-8px);
        }
        100% {
            transform: translateY(0px);
        }
    }
    
    /* Упрощаем анимацию градиента */
    .gradient-animate {
        background-size: 200% 200%;
    }
}

/* Еще больше оптимизируем для маленьких экранов */
@media (max-width: 576px) {
    /* Полностью отключаем некоторые тяжелые анимации */
    #particle-container {
        display: none;
    }
    
    /* Упрощаем анимации для лучшей производительности */
    .float-slow, .float-medium, .float-fast {
        animation-duration: 3s !important;
    }
    
    /* Упрощаем эффект мерцания */
    .shimmer::after {
        animation-duration: 3s;
    }
    
    /* Уменьшаем интенсивность свечения */
    @keyframes glow {
        0%, 100% {
            box-shadow: 0 0 5px rgba(114, 9, 183, 0.3);
        }
        50% {
            box-shadow: 0 0 10px rgba(114, 9, 183, 0.5);
        }
    }
}

/* Оптимизация для устройств с низкими ресурсами */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .particle, .float-slow, .float-medium, .float-fast, 
    .pulse, .shimmer, .glow, .typing, .rotate-slow, 
    .rotate-medium, .rotate-fast, .gradient-animate,
    #cursor-blur {
        display: none !important;
    }
}

/* Улучшаем эффект наведения для устройств с мышью */
@media (hover: hover) {
    .card-3d:hover {
        transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
    }
    
    .card-3d .card-inner {
        transition: transform 0.3s ease;
    }
    
    .card-3d:hover .card-inner {
        transform: translateZ(30px);
    }
}

/* Основные оптимизации для всех устройств */
.particle, .float-slow, .float-medium, .float-fast, 
.pulse, .shimmer, .glow, .typing, .rotate-slow, 
.rotate-medium, .rotate-fast, .gradient-animate {
    will-change: transform, opacity;
}

/* Стили для crypto-card без эффекта увеличения */
.crypto-card.card-3d:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

.crypto-card.card-3d .card-inner {
    transform: translateZ(0);
}

.crypto-card.card-3d:hover .card-inner {
    transform: translateZ(0) !important;
} 