:root {
    --verde: #2ecc71;
    --amarillo: #f1c40f;
    --rojo: #e74c3c;
    --color-fondo: #1a1a2e;
    --color-texto: #ffffff;
    --color-boton: #e94560;
    --boton-hover: #16213e;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.contenedor-principal {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Contenedor de la Ruleta */
.contenedor-ruleta {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    /* Prevenir aplastamiento */
}

/* La Ruleta en sí */
.ruleta {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: conic-gradient(var(--verde) 0deg 40deg,
            var(--amarillo) 40deg 80deg,
            var(--rojo) 80deg 120deg,
            var(--verde) 120deg 160deg,
            var(--amarillo) 160deg 200deg,
            var(--rojo) 200deg 240deg,
            var(--verde) 240deg 280deg,
            var(--amarillo) 280deg 320deg,
            var(--rojo) 320deg 360deg);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    /* Ease-out cubic para parada realista */
    transform: rotate(0deg);
}

/* Círculo decorativo central */
.circulo-central {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Puntero/Flecha */
.puntero {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #2a9aa7;
    z-index: 5;
    filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.3));
}

/* Botón de Girar */
.boton-girar {
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background-color: var(--color-boton);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(233, 69, 96, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    font-family: inherit;
    text-transform: uppercase;
}

.boton-girar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.6);
}

.boton-girar:active {
    transform: translateY(1px);
}

.boton-girar:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Visualización del Resultado */
.resultado {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 1rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.resultado.mostrar {
    opacity: 1;
    transform: translateY(0);
}

/* .oculto is implicit by opacity 0, but can be useful if logical hiding is needed, 
   currently just using opacity transition based on .mostrar class */

#nombre-color {
    text-transform: uppercase;
}

/* Ajustes Responsive */
@media (max-width: 400px) {
    .contenedor-ruleta {
        width: 250px;
        height: 250px;
    }

    h1 {
        font-size: 2rem;
    }
}

footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}