/* Estilos generales para el cuerpo y el contenedor principal */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f2f2f2; /* Fondo claro */
    color: #1a1a1a; /* Texto oscuro */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

main {
    width: 100%;
    max-width: 400px;
}

/* Contenedor del formulario */
.form {
    background-color: #ffffff; /* Caja del formulario más clara */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    border: 1px solid #e0e0e0;
}

.first-box h1 {
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Formulario */
.first-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Campos de entrada */
.normal-login input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #1a1a1a;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.normal-login input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Marcadores de posición (placeholders) */
.normal-login input::placeholder {
    color: #888;
}

/* Botón de envío */
.button-sub {
    width: 100%;
    padding: 15px;
    background-color: #006400; /* Verde oscuro */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.button-sub:hover {
    background-color: #004d00; /* Verde más oscuro al pasar el cursor */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.button-sub:active {
    transform: translateY(0);
}

/* Estilos para el mensaje de error (toast) */
.error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c; /* Rojo para errores */
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 90%;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.error-toast h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.error-toast p {
    margin: 0;
}

.close-toast-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

.close-toast-btn:hover {
    transform: rotate(90deg);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Media Queries para adaptabilidad */
@media (max-width: 500px) {
    body {
        padding: 10px;
    }

    .form {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .first-box h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .normal-login input,
    .button-sub {
        padding: 12px;
        font-size: 1em;
    }
}