/* ==============================================================
   Roleta de Prêmios — Página pública (GET /)
   Domínio: Roleta/Views @roleta — independente do layout admin
   ============================================================== */

:root {
    --primary-font: 'Inter', sans-serif;
    --title-font: 'Titillium Web', sans-serif;
}

body {
    font-family: var(--primary-font);
    background: transparent;
    overflow-x: hidden;
}

/* Background Videos */
.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
    pointer-events: none;
}

.mobile-bg { display: none; }

@media (max-width: 768px) {
    .desktop-bg { display: none; }
    .mobile-bg { display: block; }
}

.title-font { font-family: var(--title-font); }

/* Roleta (canvas 600x600 + borda) */
.roulette-container {
    font-family: var(--primary-font);
    width: 600px;
    height: 600px;
    box-sizing: content-box;
    border: 14px solid #ff7b00;
    outline: 5px solid #b74300;
    outline-offset: -2px;
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 106, 0, 0.55), inset 0 0 45px rgba(0, 0, 0, 0.95), 0 25px 50px rgba(0, 0, 0, 0.85);
    background: radial-gradient(circle, #2d1405 0%, #100702 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Responsivo para notebooks intermediários (<= 1200px) */
@media (max-width: 1199.98px) {
    .roulette-container {
        width: 500px;
        height: 500px;
        border-width: 12px;
    }
    #rouletteWheel {
        width: 500px;
        height: 500px;
    }
    .arrow {
        top: -30px !important;
        font-size: 3.2rem !important;
    }
}

/* Responsivo: a partir de tablets (<= 991px), roleta em 380x380 */
@media (max-width: 991.98px) {
    .roulette-container {
        width: 380px;
        height: 380px;
        border-width: 10px;
        outline-width: 3px;
    }
    #rouletteWheel {
        width: 380px;
        height: 380px;
    }
    .arrow {
        top: -26px !important;
        font-size: 2.8rem !important;
    }
}

/* Responsivo: telas pequenas / mobile (<= 576px), roleta em 320x320 */
@media (max-width: 576px) {
    .roulette-container {
        width: 310px;
        height: 310px;
        border-width: 8px;
        outline-width: 2px;
    }
    #rouletteWheel {
        width: 310px;
        height: 310px;
    }
    .arrow {
        top: -22px !important;
        font-size: 2.3rem !important;
    }
}

.roulette-container:hover {
    transform: scale(1.015);
    box-shadow: 0 0 75px rgba(255, 139, 57, 0.75), inset 0 0 45px rgba(0, 0, 0, 0.95), 0 30px 60px rgba(0, 0, 0, 0.9);
}

.arrow {
    top: -35px !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 193, 7, 0.85);
    font-size: 3.8rem !important;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.8));
    transition: transform 0.15s ease;
}

/* Botão principal */
.spin-btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ff8b39, #ff6a00);
    border: none;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.spin-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 106, 0, 0.6) !important;
}

.spin-btn:active { transform: translateY(2px) scale(0.95); }

/* Modais glass */
.glass-modal {
    background: rgba(20, 12, 6, 0.85);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 139, 57, 0.35);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(255, 106, 0, 0.25);
}

.glass-modal .form-control,
.glass-modal .form-select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}

.glass-modal .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: #ff8b39;
    box-shadow: 0 0 0 .2rem rgba(255, 139, 57, .25);
    color: #fff;
}

.glass-modal .form-control::placeholder { color: rgba(255,255,255,0.35); }
.glass-modal input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

.voucher-input { letter-spacing: 3px; }

/* Botões secundários (regulamento etc.) */
.rules-btn {
    border-radius: 50px;
    color: #fff;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.45);
    backdrop-filter: blur(8px);
    transition: all .25s ease;
}
.rules-btn:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; transform: translateY(-2px); }

/* Regulamento */
.rules-content { font-size: .92rem; line-height: 1.6; color: rgba(255,255,255,0.85); }
.rules-content h6 { color: #ffa464; font-family: var(--title-font); font-weight: 700; margin-top: 1.1rem; }
.rules-content h6:first-child { margin-top: 0; }
.rules-content::-webkit-scrollbar { width: 8px; }
.rules-content::-webkit-scrollbar-thumb { background: #ff8b39; border-radius: 8px; }

/* Obrigatórios + validação */
.form-label.required::after,
.req { content: ' *'; color: #ff6b6b; font-weight: 700; }
.req-note { color: rgba(255,255,255,0.55); }
.glass-modal .invalid-feedback { color: #ff8080; font-size: .78rem; }
.glass-modal .form-control.is-invalid { border-color: #ff5c5c; background-color: rgba(255, 92, 92, 0.08); }
.glass-modal .form-control.is-valid { border-color: #4ade80; }
.glass-modal .form-select.is-invalid,
.glass-modal .form-select.is-valid { padding-right: 2.25rem; }
.result-icon.ready { color: #4ade80; text-shadow: 0 0 30px rgba(74, 222, 128, .6); }

/* Preloader / Loading Screen */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #261408 0%, #0d0703 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    background: #ffffff;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 139, 57, 0.2);
    border-top: 3px solid #ff8b39;
    border-right: 3px solid #ffaa60;
    border-radius: 50%;
    animation: spinLoader 1s linear infinite;
}

.loader-icon {
    font-size: 1.6rem;
    animation: pulseIcon 1.5s ease-in-out infinite;
}

.letter-spacing-1 { letter-spacing: 2px; }

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

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Select dark */
.glass-modal .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.25rem;
    color-scheme: dark;
}
.glass-modal select.form-select option {
    background-color: #1e140c !important;
    color: #ffffff !important;
}
.glass-modal .form-control:disabled { background: rgba(255,255,255,0.03); opacity: .6; }

/* Ícone de resultado */
.result-icon {
    font-size: 5rem;
    line-height: 1;
}
.result-icon.win { color: #ffc107; text-shadow: 0 0 30px rgba(255, 193, 7, .7); }
.result-icon.lose { color: #9aa0a6; }

.modal-backdrop.show { opacity: .7; }

/* Scrollbar customizada */
:root {
    scrollbar-color: #c65200 #1e1108;
    scrollbar-width: auto;
}
html, body {
    scrollbar-color: #c65200 #1e1108;
}
::-webkit-scrollbar {
    width: 22px;
    height: 22px;
}
::-webkit-scrollbar-track { background: #1e1108; }
::-webkit-scrollbar-thumb {
    background: #c65200;
    border-radius: 12px;
    border: 4px solid #1e1108;
}
::-webkit-scrollbar-thumb:hover { background: #ff6a00; }

/* Banner / Alerta LGPD */
.lgpd-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: 92%;
    max-width: 950px;
    background: rgba(18, 10, 5, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 139, 57, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 106, 0, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    z-index: 10050;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.lgpd-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.lgpd-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.lgpd-link {
    color: #ffa464;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.lgpd-link:hover {
    color: #ffc107;
}

.lgpd-btn {
    border-radius: 50px;
    background: linear-gradient(135deg, #ff8b39, #ff6a00);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 10px 24px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.lgpd-btn:hover {
    background: linear-gradient(135deg, #ffa464, #ff8b39);
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.6);
    color: #fff;
}

