@charset "UTF-8";

    /* DEFINIÇÕES DE VARIÁVEIS CSS */
    :root {
        --letter-height: 48px; /* Ajustado para 48px conforme o seu código */
        --num-letters: 5;      
    }
    
    body {
        margin: 0 auto;
        font-family: Arial, Helvetica, sans-serif;
        text-align: center;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        background-color: #000;
       
    }

    main{
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background-color: rgb(66, 3, 93);
        justify-content: center;
        align-items: center;
    }

    img{
        width: 60px;
        height: auto;
    }

    h1 {
        font-size: 1.5em;
        color: #FFD700;
    }

    .descricao {
        text-align: left;
        font-size: 0.9em;
        color: #fff;
        line-height: 1.4;
    }

    .p-boa-sorte{
        color: #FFD700;
        padding: 20px 0 20px 0;
        font-size: 1em;
    }

    #cards-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
        transition: all 0.4s ease;
        padding: 0 10px 0 10px;
    }

    .scratch-card {
        width:100px;
        height: 100px;
        background: hwb(274 19% 10%);
        border-radius: 12px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        cursor: pointer;
        transition: transform 0.35s ease, opacity 0.35s ease;
        position: relative;
        overflow: hidden;
    }

    .scratch-card.selected {
        transform: scale(1.1);
    }

    .scratch-card.fade-out {
        opacity: 0;
        transform: scale(0.75); /* Corrigido de 's(0.75)' para 'scale(0.75)' */
    }

    canvas {
        width: 100%;
        height: 100%;
        border-radius: 10px;
        position: absolute;
        top: 0;
        left: 0;
        touch-action: none;
    }

    /* ESTILOS DO CARRETEL DE ROLAGEM (Prize) */
    .prize {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px; 
        font-weight: 700;
        color: #fff;
        height: var(--letter-height); 
        overflow: hidden; 
        transition: transform 0.4s ease-out; 
    }
    
    .letter-box {
        width: 1ch; 
        height: var(--letter-height);
        overflow: hidden;
        margin: 0 1px;
    }

    .letter-roll {
        transform: translateY(0);
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
        animation: roll-infinite 0.3s linear infinite; 
    }

    .letter-roll span {
        display: block;
        height: var(--letter-height);
        line-height: var(--letter-height);
        text-align: center;
        opacity: 0.7; 
    }
    
    @keyframes roll-infinite {
        0% { transform: translateY(0); }
        100% { transform: translateY(calc(-1 * var(--letter-height) * (var(--num-letters) - 1))); } 
    }

    .letter-roll.stop {
        animation: none; 
    }
    
    .prize.revealed .letter-roll {
        text-shadow: 0 0 15px #FFD700; 
        opacity: 1; 
    }

    .p-boa-sorte{
        text-align: center;
    }

    /* CLÍMAX: Flash */
    @keyframes flash-win {
        0% { box-shadow: 0 0 0px rgba(255, 255, 255, 0); }
        50% { box-shadow: 0 0 30px rgba(255, 255, 100, 0.9); } 
        100% { box-shadow: 0 0 0px rgba(255, 255, 255, 0); }
    }
    
    .scratch-card.flash {
        animation: flash-win 0.3s ease-out 1; 
    }

    /* CONFETES: Estilos do overlay e animação */
    #confetti-overlay {
        position: fixed;
        inset: 0;
        z-index: 9998; 
        pointer-events: none; 
        display: none; 
        overflow: hidden;
    }

    #confetti-overlay.active {
        display: block;
    }

    @keyframes fall {
        to {
            transform: translateY(100vh) rotateX(360deg); 
        }
    }

    /* POPUP */
    #popup {
        position: fixed;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.07);
        z-index: 9999;
    }
    #popup .box {
        margin-top: 20px;
        background: #fff;
        border-radius: 12px;
        padding: 22px;
        max-width: 320px;
        text-align: center;
        box-shadow: 0 8px 30px rgba(0,0,0,0.25);
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    #popup .box h2 {
        margin: 0 0 8px 0;
        font-size: 22px;
        color: #000; 
    }
    #popup .box p {
         margin: 8px 0 0 0;
         color: black;
         font-size: 14px;
          }


@media (min-width: 769px){

    body{
        width: 400px;
    }

    


}