/* =============================================== */
/* ESTILOS PARA FORMULARIOS */
/* =============================================== */

.form-page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 200px);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.form-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(100, 200, 255, 0.8);
    animation: text-glow 3s ease-in-out infinite;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Progress Bar */
.form-progress {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64c8ff, #7c3aed);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 33.33%;
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.5);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.step {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step.active {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.2), rgba(124, 58, 237, 0.2));
    border-color: #64c8ff;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(100, 200, 255, 0.3);
}

.step.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border-color: #10b981;
    color: #10b981;
}

/* Form Container */
.modern-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    animation: slideUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.modern-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #64c8ff, transparent);
    animation: scan 4s infinite;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

.step-header {
    margin-bottom: 2rem;
}

.step-header h2 {
    color: #64c8ff;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: rgba(255, 255, 255, 0.7);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Labels */
.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.required {
    color: #ef4444;
    margin-left: 2px;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #64c8ff;
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
}

.form-input.error {
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

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

/* Custom Select */
.custom-select {
    position: relative;
}

.form-select {
    appearance: none;
    padding-right: 3rem;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64c8ff;
}

.select-arrow svg {
    width: 24px;
    height: 24px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 22px;
    width: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 200, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-container input:checked ~ .radio-checkmark {
    background: linear-gradient(135deg, #64c8ff, #7c3aed);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.5);
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.radio-container input:checked ~ .radio-checkmark:after {
    display: block;
}

.radio-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
    line-height: 1.5;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-checkmark {
    position: absolute;
    top: 3px;
    left: 0;
    height: 22px;
    width: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 200, 255, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background: linear-gradient(135deg, #64c8ff, #7c3aed);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.5);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Error Messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(100, 200, 255, 0.2);
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-prev {
    background: rgba(100, 200, 255, 0.1);
    color: #64c8ff;
    border: 1px solid rgba(100, 200, 255, 0.3);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    margin-left: auto;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-prev:hover,
.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 200, 255, 0.4);
}

/* Loading State */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.spinner circle {
    stroke-dasharray: 60;
    stroke-dashoffset: 45;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-dash {
    0% { stroke-dashoffset: 60; }
    50% { stroke-dashoffset: 15; }
    100% { stroke-dashoffset: 60; }
}

/* Summary Container */
.summary-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-section {
    margin-bottom: 1.5rem;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-section h3 {
    color: #64c8ff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 200, 255, 0.2);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    padding: 0.5rem;
}

.summary-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.summary-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
}

/* Terms Container */
.terms-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

/* Success Message */
.success-container {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    animation: slideUp 0.8s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: success-pulse 2s ease-in-out infinite;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes success-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(16, 185, 129, 0.8);
    }
}

.success-container h2 {
    color: #10b981;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-container p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.success-detail {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-page-container {
        padding: 0 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}