/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Fondo de la página */
body {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

/* Contenedor principal */
.container {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

/* Logo */
.logo {
    margin-bottom: 20px;
}

.logo-img {
    max-width: 100px;
    transition: transform 0.3s ease-in-out;
}

.logo-img:hover {
    transform: scale(1.1);
}

/* Estilos del formulario */
.form-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.3s;
}

input:focus, select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* Botón principal */
button {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #388E3C;
    transform: scale(1.05);
}

/* Botón de abrir modal */
#openModalBtn {
    margin-top: 15px;
    background: #1976D2;
}

#openModalBtn:hover {
    background: #1565C0;
}

/* Mensajes de error y éxito */
.error {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

.success {
    color: green;
    font-size: 14px;
    margin-top: 10px;
}

/* --- ESTILOS DEL MODAL --- */
.modal {
    display: none; /* Asegura que el modal esté oculto al inicio */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.modal.open {
    display: flex; 
    opacity: 1;
}
.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 350px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s;
}

/* Botón de cierre */
#closeModalBtn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

#closeModalBtn:hover {
    color: black;
}

/* Animación de aparición */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
    .container, .modal-content {
        width: 90%;
    }
}
