/* Анимации для Tower Rush */

/* Анимация башни */
@keyframes towerGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(138, 43, 226, 0.8),
                    0 0 60px rgba(0, 212, 255, 0.5);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Анимация появления элементов */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация для башни в демо */
.tower-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tower-floor {
    width: 60px;
    height: 40px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    animation: float 2s ease-in-out infinite;
    animation-delay: calc(var(--floor) * 0.2s);
}

.tower-floor--jackpot {
    background: linear-gradient(45deg, #ff6b35, #ffcc00);
    animation: pulse 1s ease-in-out infinite;
}

/* Анимация для кнопок */
.btn--primary:hover {
    animation: pulse 0.3s ease;
}

/* Анимация для статистики */
.stat {
    animation: fadeInUp 0.6s ease forwards;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

/* Анимация для карточек бонусов */
.bonus-card {
    animation: fadeInUp 0.6s ease forwards;
}

.bonus-card:nth-child(1) { animation-delay: 0.1s; }
.bonus-card:nth-child(2) { animation-delay: 0.2s; }
.bonus-card:nth-child(3) { animation-delay: 0.3s; }

/* Анимация загрузки */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Анимация успеха */
.success-animation {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--color-success);
    }
}

/* Анимация для таймера */
.timer__value {
    animation: countdown 1s ease infinite;
}

@keyframes countdown {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--color-accent);
    }
}