/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* Contenedor de mensaje de éxito */
.message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80vh;
    width: 100%;
}

.success-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #e9f7ef 0%, #d4edda 100%);
    border: 2px solid #28a745;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.2);
    max-width: 500px;
    animation: slideIn 0.5s ease-out;
}

.success-message h2 {
    color: #28a745;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.success-message p {
    color: #155724;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.btn-reset {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Contenido principal */
.main-content {
    width: 100%;
    max-width: 1200px;
}

.promo-section {
    display: flex;
    justify-content: center;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    min-height: 600px;
}

/* Imagen promocional móvil */
.promo-image-mobile {
    display: none;
}

.promo-img-mobile {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin-bottom: 1rem;
}

/* Sección del formulario */
.form-section {
    flex: 1;
    max-width: 600px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-logo {
    width: 70%;
    max-width: 300px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 115, 230, 0.3));
}

.form-header h1 {
    color: #000000;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.form-header p {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* Estilos del formulario */
.tech-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field-container {
    display: flex;
    flex-direction: column;
}

.field-container input {
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #fff;
}

.field-container input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.field-container input:valid {
    border-color: #28a745;
}

.field-container input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Contenedor de errores */
.error-container {
    height: 1.2rem;
    margin-top: 0.3rem;
    margin-bottom: 0.2rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
}

/* Checkbox de términos */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #000000;
    cursor: pointer;
}

.checkbox-container label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
    cursor: pointer;
    flex: 1;
}

.checkbox-container label a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-container label a:hover {
    text-decoration: underline;
}

/* Botón de envío */
.submit-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Estilos responsivos */
@media (max-width: 850px) {
    .container {
        padding: 0.5rem;
        min-height: 100vh;
    }

    .promo-section {
        flex-direction: column;
        border-radius: 15px;
        min-height: auto;
        background: #f9f9f9;
    }

    .promo-image-mobile {
        display: block;
        padding: 1rem;
        background: linear-gradient(135deg, #000000 0%, #333333 100%);
        border-radius: 15px 15px 0 0;
    }

    .form-section {
        margin: 0;
        padding: 2rem 1.5rem;
        border-radius: 0 0 15px 15px;
        box-shadow: none;
    }

    .form-header h1 {
        font-size: 1.6rem;
    }

    .form-logo {
        width: 80%;
    }

    .field-container input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .checkbox-container label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.25rem;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .form-header h1 {
        font-size: 1.4rem;
    }

    .field-container input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
    }

    .success-message {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .success-message h2 {
        font-size: 1.5rem;
    }

    .success-message p {
        font-size: 1rem;
    }
}

/* Estados de carga */
.loading .submit-btn {
    pointer-events: none;
    opacity: 0.8;
}

.loading .btn-text {
    opacity: 0;
}

.loading .loading-spinner {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
