/* =============================================================================
   ESTILOS GENERALES Y DE PÁGINA
   ========================================================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* =============================================================================
   PANTALLAS DE ESTADO (CARGA Y ACCESO DENEGADO)
   ========================================================================== */

#pantalla-de-carga,
#acceso-denegado {
    text-align: center;
    padding: 40px;
}

#pantalla-de-carga {
    font-weight: 700;
    font-size: 1.5em;
}

#acceso-denegado {
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
}

#acceso-denegado h1 {
    color: #d32f2f; /* Un rojo de alerta */
}

/* Clase de utilidad para ocultar elementos de forma segura */
.oculto {
    display: none !important;
}

/* =============================================================================
   CONTENEDOR PRINCIPAL DE LA APLICACIÓN
   ========================================================================== */

#contenedor-principal-ruleta {
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    margin: 2em auto;
}

header {
    margin-bottom: 1em;
}

.logo {
    max-width: 150px;
    margin-bottom: 1em;
}

h1 {
    color: #1a237e; /* Azul corporativo */
    margin: 0;
}

/* =============================================================================
   SECCIÓN DE LA RULETA Y EL BOTÓN DE GIRO
   ========================================================================== */

.wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2em; /* Espacio entre la ruleta y el formulario */
}

/* El puntero que indica el premio */
.wheel-container::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #c62828; /* Rojo oscuro */
    z-index: 10;
}

#spin-button {
    margin-top: 1em;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, #d81b60, #8e24aa);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

#spin-button:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
}

#spin-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .3);
}

/* =============================================================================
   SECCIÓN DEL FORMULARIO
   ========================================================================== */

#form-container h2 {
    margin-bottom: 1em;
}

/* Estilo común para todos los campos de selección e inputs */
#role-selector,
#employee-name-selector,
#client-id {
    width: 100%;
    padding: 10px;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

#client-id-container {
    align-items: center;
}

#validate-button {
    padding: 10px 15px;
    border: none;
    background-color: #1a237e;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap; /* Evita que el texto del botón se parta */
}

#validation-status {
    margin-top: 5px;
    font-weight: 700;
    font-size: 0.9em;
}

/* =============================================================================
   MODAL DE RESULTADOS (POP-UP DEL PREMIO)
   ========================================================================== */

#result-modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
    width: 80%;
    max-width: 400px;
    animation: fadeIn .5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
}

#prize-text {
    font-size: 1.8em;
    font-weight: 700;
    color: #d81b60; /* Rosa/Fucsia */
    margin: .5em 0;
}

#data-status {
    font-style: italic;
    color: #777;
}