/* ===== Estilos Globales ===== */
body {
    background: linear-gradient(45deg, #111, #222);
    font-family: 'Poppins', sans-serif;
    color: white;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

h5 {
    font-size: 20px;
    color: #00ffee;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* ===== Formulario Principal ===== */
.carrera-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    margin-top: 40px;
    
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: #0ff;
}

input.form-control {
    width: 95%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #222;
    color: white;
    font-size: 14px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

button.btn-custom {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #00ccff, #ff66cc);
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 20px;
}

button.btn-custom:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px #0ff;
}

.blur {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* ===== Resultado Overlay ===== */

.titulo-libertad {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #00ffcc;
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
  font-family: 'Press Start 2P', cursive;
}

/* ===== Resultado Overlay ===== */
#resultado-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

#resultado-overlay.visible {
    display: flex;
}

/* ===== Carta Resultado Final ===== */
#resultado-final {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: rgba(10, 10, 10, 0.95);
    border: 2px solid #0f0;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
    animation: fadeIn 1s ease forwards;
    max-width: 400px;
    width: 90%;
    font-family: 'Poppins', sans-serif;
}

#rata-titulo {
    font-size: 1.6rem;
    color: rgb(34, 255, 0);
    margin-bottom: 12px;
    text-shadow: 0 0 4px rgb(0, 255, 47);
    font-weight: bold;
}

#rata-descripcion {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.5;
    max-width: 350px;
}

/* ===== Barra de progreso ===== */
.barra-libertad {
    width: 90%;
    max-width: 500px;
    height: 30px;
    background-color: #222;
    border: 2px solid #0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 0 15px #0f08;
}

#barra-progreso {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0f0, #0ff);
    color: black;
    font-weight: bold;
    text-align: center;
    line-height: 30px;
    transition: width 2s ease-out;
}

/* ===== Animación Entrada ===== */
@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.boton-ranking {
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.boton-ranking:hover {
    background-color: #555;
}



/* ===== Responsive ===== */
@media (max-width: 600px) {
    #resultado-final {
        padding: 20px;
    }

    #rata-titulo {
        font-size: 1.3rem;
    }

    #rata-descripcion {
        font-size: 0.9rem;
    }
}