.roulette-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.roulette-overlay.active { display: flex; animation: fadeIn 0.3s ease; }

.roulette-container {
    position: relative;
    width: fit-content;
    background: transparent;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 480px;
    height: 480px;
    margin: 20px auto;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
}

.wheel-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 12px solid #ffb300;
    box-shadow: 0 0 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.5);
    transition: transform 9s cubic-bezier(0.1, 0, 0.1, 1);
    background: #000;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ffb300;
    z-index: 100;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,0.6));
}

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: #1a1a1a;
    border: 4px solid #ffb300;
    border-radius: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.5);
}

.btn-spin-now {
    background: #ffb300;
    color: #1a1a1a;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 20px rgba(255,179,0,0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-spin-now:hover:not(:disabled) { 
    transform: scale(1.05); 
    box-shadow: 0 15px 30px rgba(255,179,0,0.6);
}
.btn-spin-now:active:not(:disabled) { transform: scale(0.95); }
.btn-spin-now:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; }

.roulette-close {
    position: absolute;
    top: -10px; right: 22px;
    background: none; border: none; font-size: 1.5rem;
    color: #fff; cursor: pointer;
    z-index: 110;
}

.wheel-slice {
    position: absolute;
    width: 100%; 
    height: 100%;
    top: 0; left: 0;
    background-color: var(--bg-color);
    transform-origin: center;
    transform: rotate(calc(var(--slice-index) * 45deg));
    /* Recorte em formato de fatia (pizza slice) */
    clip-path: polygon(50% 50%, 30.5% 0%, 69.5% 0%);
    overflow: hidden;
}

.wheel-slice .animal-img {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translateX(-50%);
    /* Aumentamos a largura para que o bicho preencha as laterais do triângulo */
    width: 110%; 
    /* Limitamos a altura para o bicho não "afunilar" em direção ao centro */
    height: 40%;
    /* Contain garante que o animal apareça inteiro, sem cortes ou zoom */
    object-fit: contain;
    object-position: center;
    opacity: 1;
    z-index: 1;
}

.wheel-slice small {
    position: absolute;
    top: 35%; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #ffb300;
    font-weight: 900;
    text-shadow: 1px 1px 2px #000;
    z-index: 2;
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 1px 5px;
    border-radius: 5px;
}

/* Novo Alerta de Resultado Premium */
.roulette-result-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000000;
    backdrop-filter: blur(5px);
}
.roulette-result-card {
    background: #1a1a1a;
    border: 3px solid #ffb300;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    color: #fff;
    box-shadow: 0 0 50px rgba(255, 179, 0, 0.3);
    animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.result-title { font-size: 1.8rem; font-weight: 900; color: #ffb300; margin-bottom: 10px; text-transform: uppercase; }
.result-amount { font-size: 2.5rem; font-weight: 900; margin: 15px 0; display: block; }
.btn-result-close { 
    background: #ffb300; color: #000; border: none; padding: 12px 30px; 
    border-radius: 25px; font-weight: 800; cursor: pointer; width: 100%;
    text-transform: uppercase; margin-top: 10px;
}

@keyframes resultPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 500px) {
    .wheel-wrapper { width: 340px; height: 340px; }
    .btn-spin-now { font-size: 1rem; padding: 12px; }
    .wheel-slice small { font-size: 0.8rem; top: 27%; }
}
