body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: center;     /* Centra verticalmente */
    height: 100vh;           /* Altura completa de la ventana del navegador */
}

h1 {
    color: #333;
    text-align: center;
}

h4 {
    color: #333;
    text-align: center;
    padding: 20px 0;
}

.main-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;             /* Uso del 100% del ancho */
    max-width: 500px;        /* No excede de 500px */
}

form {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input, select, button, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 20px;
}

textarea {
    height: 120px;  /* Ajusta esto si quieres un tamaño específico */
    resize: vertical;  /* Permite al usuario redimensionar verticalmente */
}

button {
    background-color: #007BFF;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* ... (resto de tu CSS) ... */

input, select, textarea, button {
    width: 100%; /* Aseguramos que ambos ocupen el 100% del espacio disponible */
    box-sizing: border-box; /* Esto hará que padding y bordes estén incluidos en el ancho */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 20px;
}

textarea {
    height: 100px; /* Ajustamos la altura del textarea */
    resize: vertical; /* Permitimos que se redimensione sólo verticalmente */
}


/* Responsive styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .main-container {
        padding: 15px; /* Reduce el padding para pantallas pequeñas */
    }

    input, select, button, textarea {
        font-size: 14px;
    }
}