/* ==========================================================================
   ROULETTE STYLES (Fatia de Ouro - Black, White, Gold)
   ========================================================================== */

:root {
    --gold-primary: #D4AF37;
    --gold-dark: #AA8122;
    --gold-light: #F5D76E;
}

.roulette-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.roulette-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.roulette-container {
    background: radial-gradient(circle, #222 0%, #000 100%);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--gold-primary);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(212, 175, 55, 0.15);
    position: relative;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.roulette-logo {
    max-width: 250px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.roulette-title {
    color: var(--gold-light);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.roulette-subtitle {
    color: #FFF;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.wheel-wrapper {
    position: relative;
    width: 320px; height: 320px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 10px;
    background: #111;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.wheel-wrapper::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 8px dotted var(--gold-primary);
    animation: rotateLights 10s linear infinite;
    opacity: 0.8;
}

@keyframes rotateLights {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    /* Slices: Gold, Black, White, Gold, Black, White, Black */
    background: conic-gradient(
        var(--gold-primary) 0deg 51.42deg,
        #1A1A1A 51.42deg 102.85deg,
        #FFFFFF 102.85deg 154.28deg,
        var(--gold-primary) 154.28deg 205.71deg,
        #1A1A1A 205.71deg 257.14deg,
        #FFFFFF 257.14deg 308.57deg,
        #1A1A1A 308.57deg 360deg
    );
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.1, 1);
    overflow: hidden;
}

.slice {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 51.42deg + 25.71deg - 90deg)) translate(100px) rotate(90deg);
    text-align: center;
    line-height: 1;
    font-size: 1.25rem;
    font-weight: 800;
    z-index: 2;
}

.slice span { display: block; }
.slice span b { font-size: 2.5rem; }

/* Text Colors */
/* 1, 4 (Gold) -> Black */
.slice:nth-child(1) span, .slice:nth-child(4) span {
    color: #000;
}
/* 2, 5, 7 (Black) -> Gold */
.slice:nth-child(2) span, .slice:nth-child(5) span, .slice:nth-child(7) span {
    color: var(--gold-light);
}
/* 3, 6 (White) -> Black */
.slice:nth-child(3) span, .slice:nth-child(6) span {
    color: #000;
}

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: #111;
    border: 4px solid var(--gold-primary);
    border-radius: 50%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold-primary);
    font-size: 24px;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.wheel-pointer {
    position: absolute;
    bottom: -20px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 40px solid var(--gold-primary);
    z-index: 10;
    filter: drop-shadow(0 -5px 5px rgba(0,0,0,0.8));
}
.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 5px; left: -14px;
    width: 0; height: 0; 
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 30px solid #111;
}

/* Gold Buttons */
#btn-spin, #btn-continue {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}
#btn-spin:hover, #btn-continue:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
}

.roulette-popup {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
}

.roulette-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #FFFFFF;
    border: none;
    padding: 3.5rem 2.5rem;
    border-radius: 24px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 48px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
}

.roulette-popup.active .popup-content {
    transform: scale(1);
}

.popup-icon {
    font-size: 4.5rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.popup-content h2 {
    color: #111111;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-shadow: none;
}

.popup-content p {
    color: #555555;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.5;
}

.popup-content p strong {
    color: #111111;
    font-weight: 700;
}

.discount-status {
    background: #F9F9F9;
    color: #111111;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    border: 1px solid #EEEEEE;
    display: inline-block;
    width: 100%;
}

@media (max-width: 480px) {
    .roulette-container {
        padding: 2rem 1rem;
    }
    .roulette-logo {
        max-width: 165px;
        margin-bottom: 0.5rem;
    }
    .roulette-title {
        font-size: 1.6rem;
    }
    .roulette-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    .wheel-wrapper {
        width: 260px;
        height: 260px;
    }
    .slice {
        transform: translate(-50%, -50%) rotate(calc(var(--i) * 51.42deg + 25.71deg - 90deg)) translate(80px) rotate(90deg);
        font-size: 0.85rem;
    }
    .slice span b { font-size: 1.6rem; }
    
    #btn-spin {
        margin-top: 1.5rem !important;
        font-size: 1.1rem !important;
    }
    
    .popup-content {
        padding: 2.5rem 1.5rem;
    }
    .popup-icon {
        font-size: 3.5rem;
        margin-bottom: 0.5rem;
    }
    .popup-content h2 {
        font-size: 1.6rem;
    }
    .popup-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .discount-status {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}
