/* Animations CSS File */

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes coinPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}

.coin-earned {
    position: absolute;
    font-family: 'Press Start 2P', cursive;
    color: #ffbe0b;
    font-size: 12px;
    animation: floatUp 1s forwards;
    z-index: 9999;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.casino-appear {
    animation: casinoAppear 0.5s forwards;
}

@keyframes casinoAppear {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes winnerGlow {
    0% { box-shadow: 0 0 10px 5px rgba(255, 255, 0, 0.5); }
    50% { box-shadow: 0 0 20px 10px rgba(255, 255, 0, 0.8); }
    100% { box-shadow: 0 0 10px 5px rgba(255, 255, 0, 0.5); }
}

.winner-glow {
    animation: winnerGlow 2s infinite;
}

/* Pixelated button hover effects */
.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 9px 0 #333;
    background-image: linear-gradient(to bottom, #4caf50, #3e8e41);
}

.cta-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #333;
}

/* Super Mario style coin */
.coin-icon {
    position: relative;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ffe97d, #ffbe0b);
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
    animation: coinSpin 3s infinite linear;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-icon:before {
    content: '$';
    font-weight: bold;
    color: #333;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
    font-size: 16px;
    position: absolute;
}

/* Animate the casino spinner */
.spin-active {
    animation: spinWheel 3s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

@keyframes spinWheel {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(var(--spin-deg, 1440deg)); }
}

.ribbon-animation {
    animation: ribbonWave 2s infinite;
}

@keyframes ribbonWave {
    0% { transform: skewX(0deg); }
    25% { transform: skewX(5deg); }
    50% { transform: skewX(0deg); }
    75% { transform: skewX(-5deg); }
    100% { transform: skewX(0deg); }
}

/* Cloud animation for Mario game */
@keyframes floatAcross {
    0% { 
        transform: translateX(-100%) scale(var(--scale, 1)); 
        opacity: 0.8;
    }
    100% { 
        transform: translateX(100vw) scale(var(--scale, 1)); 
        opacity: 0.8;
    }
}

.cloud {
    position: absolute;
    width: 60px;
    height: 30px;
    background-color: white;
    border-radius: 15px;
    opacity: 0.8;
    z-index: 1;
    animation: floatAcross linear infinite;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background-color: white;
    border-radius: 50%;
}

.cloud:before {
    width: 25px;
    height: 25px;
    top: -10px;
    left: 10px;
}

.cloud:after {
    width: 30px;
    height: 30px;
    top: -15px;
    right: 15px;
}

/* Game-specific animations */
@keyframes marioJump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
    100% { transform: translateY(0); }
}

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

.mario-character.jumping {
    animation: marioJump 0.5s ease-out;
}

.gameboy-screen.starting {
    animation: gameStart 0.3s ease-in-out;
}

/* D-pad and button press animations */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.pressed {
    animation: buttonPress 0.2s ease-in-out;
}

/* Pulsar com bordas */
@keyframes pulse-border {
    0% {
        border-color: #000;
    }
    100% {
        border-color: #E52521; /* Vermelho do Mario */
    }
}

/* Animação de pulo (como o Mario) */
@keyframes jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animação de moeda girando */
@keyframes coin-spin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* Animação de moeda coletada */
@keyframes coin-collected {
    0% {
        transform: scale(1) rotateY(0deg);
    }
    50% {
        transform: scale(1.5) rotateY(180deg);
    }
    100% {
        transform: scale(1) rotateY(360deg);
    }
}

/* Animação de bloco de interrogação */
@keyframes question-block {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Animação de aparecimento de item */
@keyframes item-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animação de movimento de nuvem */
@keyframes cloud-float {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(20px);
    }
}

/* Animação de texto piscando */
@keyframes blink-text {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Animação de botão de power-up */
@keyframes power-up {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
    }
    100% {
        transform: scale(1);
    }
}

/* Efeitos para Elementos do Tema Mario */
.coin-icon {
    animation: coin-spin 2s infinite linear;
    display: inline-block;
}

.coin-icon.coin-collected {
    animation: coin-collected 0.5s ease-out;
}

.service-card:hover {
    animation: jump 0.5s ease-in-out;
}

.cta-btn:hover {
    animation: power-up 1s infinite;
}

/* Removendo a animação piscante dos títulos */
.section-title {
    animation: none; /* Removendo a animação de piscar */
}

/* Adicionando animação para a linha verde abaixo dos títulos */
.section-title:after {
    animation: blink-text 3s infinite; /* Fazendo a linha piscar */
}

/* Removendo as nuvens animadas */
.hero-banner:before,
.hero-banner:after {
    content: none; /* Removendo as nuvens */
}

/* Animação para o diálogo de cupom */
@keyframes popup-scale {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes coupon-fade {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
