/* Roleta de Descontos — popup de entrada */
#rouletteOverlay * {
    box-sizing: border-box;
}

body.roulette-locked {
    overflow: hidden;
}

body.roulette-locked #siteRoot {
    filter: blur(16px) brightness(0.92);
    pointer-events: none;
    user-select: none;
}

#rouletteOverlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 9, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

#rouletteOverlay[hidden] {
    display: none !important;
}

.roulette-card {
    position: relative;
    background: #FFFFFF;
    width: 100%;
    max-width: 425px;
    border-radius: 32px;
    padding: 38px 30px 32px;
    text-align: center;
    box-shadow:
        0 30px 60px rgba(17, 17, 15, 0.4),
        0 10px 24px rgba(17, 17, 15, 0.25);
    animation: roulettePopIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes roulettePopIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.roulette-card h1 {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.3;
    color: #111110;
    margin-bottom: 8px;
}

.roulette-card .subtitle {
    color: #6B6862;
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 auto 28px;
    max-width: 320px;
}

.roulette-wrapper {
    position: relative;
    width: 100%;
    max-width: 296px;
    margin: 0 auto 26px;
}

.roulette-wrapper::before {
    content: '';
    position: absolute;
    inset: -32px;
    background: radial-gradient(circle, rgba(17, 17, 15, 0.22) 0%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
}

#rouletteCanvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 50%;
    border: 9px solid #FFFFFF;
    box-shadow:
        0 0 0 2px #E6C36E,
        0 0 22px rgba(17, 17, 15, 0.25),
        0 16px 30px rgba(17, 17, 15, 0.18);
    transition: transform 4.2s cubic-bezier(0.17, 0.67, 0.16, 0.99);
}

.roulette-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: #FFFFFF;
    border: 2px solid #C6A03E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(17, 17, 15, 0.3));
}

.roulette-pointer svg {
    width: 16px;
    height: 16px;
}

.roulette-center-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: #111110;
    border: 3px solid #C6A03E;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E6C36E;
    font-weight: 800;
    font-size: clamp(0.9rem, 4vw, 1.3rem);
    z-index: 9;
    pointer-events: none;
}

.roulette-attempts {
    color: #6B6862;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-girar {
    position: relative;
    overflow: hidden;
    background: linear-gradient(100deg, #111110, #2b2a25 45%, #C6A03E);
    border: none;
    border-radius: 16px;
    padding: 18px 24px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    box-shadow:
        0 12px 26px rgba(17, 17, 15, 0.35),
        0 6px 12px rgba(17, 17, 15, 0.25);
}

.btn-girar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: rouletteShine 3.2s ease-in-out infinite;
}

@keyframes rouletteShine {
    0% { left: -60%; }
    45% { left: 130%; }
    100% { left: 130%; }
}

.btn-girar:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 16px 32px rgba(17, 17, 15, 0.4),
        0 6px 12px rgba(17, 17, 15, 0.25);
}

.btn-girar:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.roulette-footer-note {
    color: #9A9690;
    font-size: 0.9rem;
    margin-top: 18px;
}

/* MODAL DE RESULTADO */
#rouletteResultModal {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 16, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

#rouletteResultModal[hidden] {
    display: none !important;
}

.roulette-modal {
    background: #FFFFFF;
    border-radius: 26px;
    padding: 38px 28px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(17, 17, 16, 0.35);
    animation: roulettePopIn 0.28s ease-out;
}

.roulette-modal .win-label {
    color: #111110;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.roulette-modal .big-offer {
    font-size: 3.2rem;
    font-weight: 800;
    color: #C6A03E;
    margin: 8px 0 6px;
    text-shadow: 0 0 28px rgba(230, 195, 110, 0.75);
}

.roulette-modal p {
    color: #6B6862;
    font-size: 0.98rem;
    margin: 6px 0;
}

.roulette-modal .btn-fechar {
    position: relative;
    overflow: hidden;
    background: #111110;
    border: none;
    border-radius: 999px;
    padding: 15px 40px;
    font-weight: 700;
    font-size: 1rem;
    color: #FFFFFF;
    margin-top: 22px;
    cursor: pointer;
    transition: 0.15s;
    width: 100%;
    box-shadow:
        0 14px 34px rgba(17, 17, 15, 0.4),
        0 8px 16px rgba(17, 17, 15, 0.3);
}

.roulette-modal .btn-fechar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: rouletteShine 3.2s ease-in-out infinite;
}

.roulette-modal .btn-fechar:hover {
    background: #E6C36E;
    color: #111110;
    box-shadow:
        0 16px 38px rgba(17, 17, 15, 0.35),
        0 8px 16px rgba(17, 17, 15, 0.25);
}

.roulette-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: block;
    object-fit: contain;
}
