/* Estilo general */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom right, #00397a, #900fb4);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Contenedor principal */
.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px; /* Ancho máximo para pantallas grandes */
    margin: 0 20px; 
    box-sizing: border-box;
}

h2, h4 {
    text-align: center;
    color: #333333;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

h1 {
    font-size: 1.8rem;
    text-align: center;
    color: #333333;

}

form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333333;
    font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
select,
textarea {
    padding: 14px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 1.1rem; 
    width: 100%; 
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #894caf;
    outline: none;
}

textarea {
    resize: vertical;
}

input[type="submit"],
.formcopy {
    background-color: #894caf;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

input[type="submit"]:hover,
.formcopy:hover {
    background-color: #45a049;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 65%;
    transform: translateY(-50%);
    cursor: pointer;
    height: 24px;
}

.position-relative {
    position: relative;
}

.message {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 3px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.linea {
    border-top: 1px solid rgb(227, 227, 227);
    height: 0.5px;
    max-width: 100%;
    margin: 10px auto 0 auto;
}

.alert-agregar-celdas {
    background-color: #e6f9e6;
    border: 2px solid #4CAF50;
    color: #2e7d32;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.alert-agregar-celdas p {
    margin: 0;
    font-size: 16px;
}

.footer {
    text-align: center;
    padding: 10px;
    background-color: #efefef;
    color: rgb(5, 5, 5);
    border-radius: 5px;
    border: 1px solid #e4c6f5;
}

/* Responsividad para pantallas medianas */
@media (max-width: 768px) {
    .container {
        max-width: 90%; /* Limita el ancho al 90% en pantallas medianas */
        padding: 20px;
    }

    h1 {
        font-size: 1.6rem; /* Aumenta el tamaño en pantallas medianas */
    }

    input, textarea, button {
        font-size: 1rem;
        padding: 12px; /* Asegura suficiente espacio para tocar cómodamente */
    }
}

/* Responsividad para pantallas pequeñas (móviles) */
@media (max-width: 480px) {
    .container {
        max-width: 100%; /* Ocupa todo el ancho de la pantalla */
        padding: 20px;
        margin: 0 5px; /* Márgenes laterales pequeños en móviles */
    }

    h1 {
        font-size: 1.4rem; /* Ajusta el tamaño del título para móviles */
    }

    input, textarea, button {
        font-size: 1.1rem; /* Aumenta el tamaño del texto para mejor legibilidad */
        padding: 14px; /* Aumenta el padding para mejorar la interacción táctil */
    }

    button {
        padding: 14px;
    }

    .toggle-password {
        height: 20px;
    }
}
