@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

/* --- CONFIGURACIÓN GENERAL --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f1f1f1;
    overflow-x: hidden; /* Esto ya lo tienes, es correcto */
    width: 100%;
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* --- ENCABEZADO BLANCO CON LOGO CENTRADO --- */
header {
    background-color: #ffffff;
    height: 90px; /* Aumentado de 70px a 90px */
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid #e0e0e0;
    z-index: 10;
}

header .logo {
    height: 60px; /* Aumentado para que sea más grande */
    object-fit: contain;
}

/* CONTENEDOR PRINCIPAL CON FONDO DE RAYOS DE SOL (SUNBURST) */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    background: repeating-conic-gradient(from 0deg, #ff1a2b 0deg 10deg, #ff2e3e 10deg 20deg);
    overflow: hidden;
}

/* PANEL IZQUIERDO (TEXTOS Y BOTÓN) */
.panel-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #ffffff;
    max-width: 480px;
    z-index: 2;
}

.panel-left h1 {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.1);
}

.panel-left p {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

/* TEXTO BATA.COM EN CURSIVA GRUESA COMO EL LOGO */
.panel-left h2 {
    font-size: 3.8rem;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

/* DOBLE FLECHA SUBTIL */
.panel-left .arrow {
    font-size: 5rem; /* Aumentado drásticamente para que sea muy visible */
    font-weight: 900;
    margin-bottom: 30px;
    opacity: 0.95;
    color: white;
    cursor: default;
    display: inline-block;
    animation: bounce 2s infinite;
}
/* BOTÓN GIRAR BLANCO RECTANGULAR RELLENO DEL PROTOTIPO */
#btnSpin {
    background-color: #ffffff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 400px; /* Ancho máximo aumentado */
    padding: 20px 0; /* Más alto */
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#btnSpin span {
    font-size: 2.5rem; /* Letra mucho más grande */
    font-weight: 900;
    color: #ff1a2b;
    letter-spacing: 2px;
}
#btnSpin:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#btnSpin img {
    width: auto;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* --- PANEL DE LA RULETA (DERECHA) --- */
.panel-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-bottom: 40px; /* Padding extra abajo para asegurar que el soporte respire */
}

/* El contenedor debe ser grande, pero no debe ocultar nada */
.wheel-container {
    position: relative;
    width: 90vw;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 90px; /* Margen para que el soporte tenga espacio debajo */
    overflow: visible;    /* Garantiza que nada se corte */
}

/* El fondo de luces (debe ocupar el 100% del contenedor) */
.wheel-background {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2; /* Está por debajo de la ruleta */
    pointer-events: none;
}

/* La ruleta que gira (se reduce un poco para que se vean las luces) */
#wheel {
    position: absolute;
    width: 85%; 
    height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

#wheelImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Capa: Gota / Indicador de Bata justo en el centro de la ruleta */
.pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18%;
    z-index: 5;
    pointer-events: none;
}

/* Capa: Soporte / Base negra inferior */
.support {
    position: absolute;
    bottom: -110px; /* Bajamos el soporte aún más para que gane espacio */
    width: 45%;    
    z-index: 1;    
    pointer-events: none;
}

/* Capa: Brillo/Overlay */
.wheel-light {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
}

/* --- MODAL DE PREMIO --- */
#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fondo más oscuro para mayor contraste */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#modal.active .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    font-size: 2.5rem;
    color: #ff1a2b;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.modal-content p {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 30px;
}

.btn-close {
    background-color: #ff1a2b;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-close:hover {
    background-color: #d20e15;
}

/* --- ANIMACIONES --- */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(90deg); }
    40% { transform: translateY(-6px) rotate(90deg); }
    60% { transform: translateY(-3px) rotate(90deg); }
}

/* --- MEDIA QUERY: DISPOSITIVOS MÓVILES --- */
@media (max-width: 768px) {
    main {
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 5px !important;
        gap: 5px !important;
    }

    /* Ocultamos el botón de escritorio en móviles y mostramos el móvil */
    .btn-desktop {
        display: none !important;
    }

    .btn-mobile {
        display: block !important;
    }

    /* Ajustamos tamaño de textos */
    .panel-left h1 {
        font-size: 1.2rem !important;
        margin: 2px 0 !important;
    }

    .panel-left p {
        font-size: 0.8rem !important;
        margin: 2px 0 !important;
    }

    .bata-text {
        font-size: 1.6rem !important;
        margin: 2px 0 !important;
    }

    .panel-left .arrow {
        font-size: 4rem !important;
        margin: 5px 0 !important;
    }

    /* Contenedor de la ruleta en móvil - LO SUBIMOS MÁS */
    .wheel-container {
        width: 85vw !important;
        max-width: 280px !important;
        /* Cambiamos de -80px a -110px (o -120px) para que todo el bloque suba hacia el texto */
        margin: -110px auto 90px auto !important;
        flex-shrink: 0;
        position: relative;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Soporte */
    .support {
        position: absolute !important;
        bottom: -65px !important;
        width: 55% !important;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        display: block !important;
        pointer-events: none;
    }

    /* POSICIÓN EXACTA DEL BOTÓN GIRAR ABAJO DEL SOPORTE EN MÓVIL */
    .btn-mobile {
        position: absolute !important;
        /* Acompañamos el movimiento para que se mantenga justo debajo del soporte */
        bottom: -125px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 160px !important;
        padding: 10px 0 !important;
        z-index: 10 !important;
        background-color: #ffffff !important;
        border-radius: 6px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }

        .btn-mobile span {
            font-size: 1.5rem !important;
            font-weight: 900;
            color: #ff1a2b;
            letter-spacing: 1px;
        }
}
/* Estilo para que el texto Bata.com se vea como el prototipo */
.bata-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;       /* Ultra bold */
    font-style: italic;     /* Inclinación tipo logo */
    font-size: 3.8rem;      /* Tamaño grande */
    letter-spacing: -1.5px; /* Ajuste para que las letras se sientan compactas como el logo */
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 10px 0;
}
.coupon-container {
    background: #f4f4f4;
    border: 2px dashed #ff1a2b;
    padding: 10px 20px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
}

#couponCode {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

#copyBtn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.login-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Ajustes para ampliar el tamaño del popup de login */
.login-content {
    position: relative;
    background: white;
    padding: 50px; /* Aumentamos el espacio interno */
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 500px; /* Aumentado de 350px a 500px para que sea más ancho */
}

.login-content input {
    width: 100%;
    padding: 18px; /* Inputs más grandes y fáciles de llenar */
    margin: 15px 0; /* Más espacio entre campos */
    border: 2px solid #ccc; /* Borde un poco más grueso */
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1.1rem; /* Texto dentro del input más legible */
}

.login-content button {
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    background: #ff1a2b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem; /* Botón más grande */
}

.login-logo {
    max-width: 200px; /* Logo un poco más grande */
    height: auto;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-content h2 {
    margin-top: 0;
    font-size: 1.5rem; /* Título un poco más grande */
    color: #333;
    margin-bottom: 25px; /* Más espacio debajo del título */
}
/* --- AJUSTES RESPONSIVE PARA EL LOGIN --- */
@media (max-width: 480px) {
    .login-content {
        padding: 20px; /* Menos padding interno en móviles muy pequeños */
        width: 95%;    /* Aprovecha más el ancho de pantalla */
    }

    .login-logo {
        max-width: 120px; /* Logo un poco más compacto en móviles */
    }

    .login-content h2 {
        font-size: 1.1rem; /* Título ligeramente más pequeño */
    }
}

/* --- CORRECCIÓN DE LA RULETA EN MÓVILES --- */
@media (max-width: 480px) {
    .wheel-container {
        max-width: 280px; /* Reducimos el tamaño máximo para evitar desbordes */
        margin-bottom: 20px; /* Menos margen inferior para ganar espacio vertical */
    }

    .panel-right {
        padding-bottom: 20px; /* Reducimos padding inferior */
    }
}
#btnAceptar, .btn-close {
    background-color: #6c757d !important; /* Cambia este código de color por el que desees */
    color: white !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    width: 100% !important;
    cursor: pointer !important;
}

#btnAceptar:hover, .btn-close:hover {
    background-color: #5a6268 !important; /* Color al pasar el mouse */
}
/* Enlace "Volver a Bata.com" más grande */
.login-content a {
    font-size: 1.25rem !important; /* Texto del enlace más legible */
}
* Por defecto, ocultamos el botón móvil en escritorio y mostramos el de escritorio */
.btn-mobile {
    display: none !important;
}

.btn-desktop {
    display: block;
}