/* Fondo estilo lámpara de lava */
body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Arial", sans-serif;
    background: linear-gradient(45deg, #ffffff, #faa570, #ff791a, #ffffff);
    background-size: 600% 600%;
    animation: lavaLamp 7s ease infinite;
    overflow-x: hidden;
    /* evita scroll horizontal en toda la página */
}

@keyframes lavaLamp {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* Card */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 50%;
    max-width: 90%;
    max-height: 80vh;
    /* Altura máxima */
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* evita scroll horizontal en card */
}

@media (max-width: 768px) {
    .card {
        width: 80%;
        max-width: 80%;
        max-height: 80vh;
    }
}

.card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ff6b00;
    flex-shrink: 0;
}

/* Contenedor scrollable */
.form-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* evita scroll horizontal dentro */
    padding-right: 8px;
    /* espacio para scrollbar */
}

/* Scrollbar personalizado */
.form-container::-webkit-scrollbar {
    width: 8px;
}

.form-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.form-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff8c42, #ff6b00);
    border-radius: 10px;
}

.form-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff6b00, #e65c00);
}

/* Formulario */
form label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
    color: #333;
}

form input,
form textarea {
    width: 100%;
    max-width: 100%;
    /* evita que se salga horizontalmente */
    box-sizing: border-box;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: #ff6b00;
}

button {
    margin-top: 20px;
    width: 100%;
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #e65c00;
}

.success-message {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 8px;
    text-align: center;
}

.error-message {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 8px;
    text-align: center;
}
