/**
 * Ruleta FAVA - Estilos públicos
 * Paleta: Rojo FAVA + blanco
 */

:root {
    --primary: #e52928;        /* Rojo FAVA */
    --primary-dark: #c1201a;
    --primary-darker: #a71b1a;
    --secondary: #ffffff;
    --accent: #C9A84C;         /* Dorado (acento premios) */
    --accent-dark: #A6882E;
    --dark: #2f353a;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

/* =============================================
   GENERAL
   ============================================= */
body {
    font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-light);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.padding-cont {
    padding-top: 60px !important;
    padding-bottom: 90px !important;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 1px;
}
.bg-primary-red { background-color: var(--primary) !important; }

/* =============================================
   HERO / FONDO
   ============================================= */
.hero-section {
    background: linear-gradient(160deg, #e52928 0%, #a71b1a 100%);
    position: relative;
    overflow: hidden;
}
.hero-section .container { position: relative; z-index: 2; }

/* =============================================
   BOTONES
   ============================================= */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
.btn-outline-light:hover { background-color: rgba(255,255,255,0.15); color: #fff; }

.nav-pills .nav-link { color: var(--primary-dark); font-weight: 600; border-radius: 8px; }
.nav-pills .nav-link.active { background-color: var(--primary); color: #fff; }

/* =============================================
   CARDS
   ============================================= */
.card { border-radius: 12px; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; color: #fff; }

/* =============================================
   RULETA
   ============================================= */
.roulette-stage {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    user-select: none;
}

/* Puntero (triángulo) arriba, apuntando hacia el centro */
.roulette-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 34px solid #ffffff;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.35));
}
.roulette-pointer::after {
    content: '';
    position: absolute;
    top: -40px;
    left: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* El SVG de la ruleta gira con transición */
.roulette-wheel {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28);
    transform: rotate(0deg);
    will-change: transform;
}
.roulette-wheel.spinning {
    /* La curva de desaceleración se define acá: arranca rápido y frena
       de forma orgánica (ease-out marcado). La duración la fija el JS. */
    transition: transform var(--spin-duration, 6s) cubic-bezier(0.16, 0.84, 0.19, 1);
}

/* Botón central GIRAR */
.roulette-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: 27%;
    height: 27%;
    border-radius: 50%;
    border: 6px solid #ffffff;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f1f1 60%, #dcdcdc 100%);
    color: var(--primary);
    font-weight: 800;
    font-size: clamp(0.85rem, 3.2vw, 1.25rem);
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.roulette-hub:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.05); }
.roulette-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.97); }
.roulette-hub:disabled { cursor: default; color: #b9b9b9; }

/* Textos y emojis de cada casillero (posicionados por JS con transform) */
.seg-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
}

/* =============================================
   MODAL RESULTADO
   ============================================= */
.result-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
}
.result-header {
    padding: 28px 20px 16px;
    color: #fff;
}
.result-header.win { background: linear-gradient(135deg, #C9A84C, #f3d96b); }
.result-header.lose { background: linear-gradient(135deg, #e52928, #a71b1a); }
.result-emoji { font-size: 3.4rem; line-height: 1; }
.coupon-code {
    display: inline-block;
    font-family: 'Montserrat', monospace;
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 1.6rem;
    color: #8a6d1f;
    background: #fff8e1;
    border: 2px dashed #C9A84C;
    border-radius: 12px;
    padding: 12px 22px;
    margin: 8px 0;
}
.prize-image { max-width: 200px; max-height: 200px; height: auto; }

/* =============================================
   PASOS / CÓMO FUNCIONA
   ============================================= */
.step-card { border-top: 6px solid var(--primary) !important; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 576px) {
    .roulette-stage { max-width: 340px; }
    .hero-section h1 { font-size: 1.7rem; }
}
