/* Анимации монет и сокровищ */

/* Появление экспедиции при скролле */
.treasure-card {
    opacity: 0;
    animation: treasure-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes treasure-appear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Сбор монеты - анимация */
.coin-collect {
    position: relative;
    animation: coin-spin 0.8s ease-out forwards;
}

@keyframes coin-spin {
    0% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotateY(180deg);
    }
    100% {
        transform: scale(0.5) rotateY(360deg) translateY(-60px);
        opacity: 0;
    }
}

/* Денежное хранилище мигает */
.logo-treasury {
    animation: treasury-glow 2s ease-in-out infinite;
}

@keyframes treasury-glow {
    0%, 100% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 16px rgba(255, 215, 0, 0.6);
    }
}

/* Иконка монеты вращается */
.coin-icon {
    display: inline-block;
    animation: coin-rotate 2s linear infinite;
}

@keyframes coin-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Монета при наведении */
.treasure-card:hover .coin-icon {
    animation: coin-rotate 0.6s linear infinite;
}

/* Волнистое движение монет в футере */
.footer-coins {
    animation: coins-wave 3s ease-in-out infinite;
}

@keyframes coins-wave {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Кнопка при клике */
.btn:active {
    animation: button-press 0.2s ease-out;
}

@keyframes button-press {
    0% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); }
    100% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); }
}

/* Пульсирующий эффект на заголовке */
h1, h2 {
    animation: title-pulse 3s ease-in-out infinite;
}

@keyframes title-pulse {
    0%, 100% { text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2); }
    50% { text-shadow: 2px 2px 8px rgba(30, 144, 255, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
