/* ================================
   ADVANCED SIGNUP PAGE STYLES
   ================================ */

/* Remove default body/main padding */
body:has(.signup-page-advanced) {
    overflow-x: hidden;
}

body:has(.signup-page-advanced) main {
    padding: 0 !important;
}

/* Main Container */
.signup-page-advanced {
    min-height: 100vh;
    display: flex;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Left Side - Branding */
.signup-brand-section {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
.brand-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.brand-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.brand-shape-1 {
    width: 400px;
    height: 400px;
    background: white;
    top: -100px;
    left: -100px;
    animation: floatShape 20s infinite ease-in-out;
}

.brand-shape-2 {
    width: 300px;
    height: 300px;
    background: white;
    bottom: -80px;
    right: -80px;
    animation: floatShape 15s infinite ease-in-out 2s;
}

.brand-shape-3 {
    width: 200px;
    height: 200px;
    background: white;
    top: 50%;
    left: 50%;
    animation: floatShape 18s infinite ease-in-out 4s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(60px, 20px) rotate(180deg); }
    75% { transform: translate(30px, 50px) rotate(270deg); }
}

.brand-content {
    position: relative;
    z-index: 1;
    color: white;
}

.brand-logo {
    margin-bottom: 40px;
}

.brand-logo h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-logo p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
}

.brand-description {
    font-size: 1.15rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
}

/* Benefits List */
.brand-benefits {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.benefit-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.benefit-text p {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.9;
}

/* Right Side - Form */
.signup-form-section {
    flex: 1;
    background: #f8f9fa;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    max-height: 100vh;
}

.signup-form-wrapper {
    width: 100%;
    max-width: 550px;
}

/* Form Header */
.signup-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.signup-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.signup-badge-pulse {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.signup-badge-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

.signup-form-title {
    font-size: 2rem;
    font-weight: 800;
    color: #212529;
    margin-bottom: 10px;
}

.signup-form-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

/* Progress Stepper */
.signup-progress-stepper {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.progress-connector {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: 0;
}

.progress-connector-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.5s ease;
}

.stepper-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.stepper-circle {
    width: 40px;
    height: 40px;
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    color: #6c757d;
    transition: all 0.3s ease;
}

.stepper-step.active .stepper-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.stepper-step.completed .stepper-circle {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.stepper-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

.stepper-step.active .stepper-label {
    color: #667eea;
}

.stepper-step.completed .stepper-label {
    color: #28a745;
}

/* Form Steps */
.signup-form-steps {
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInStep 0.5s ease;
}

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

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* Advanced Form Fields */
.form-group-signup {
    margin-bottom: 25px;
}

.input-wrapper-signup {
    position: relative;
}

.input-icon-signup {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-control-signup {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control-signup:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control-signup:focus ~ .input-icon-signup {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.form-control-signup.is-valid {
    border-color: #28a745;
    background: #f8fff9;
}

.form-control-signup.is-invalid {
    border-color: #dc3545;
    background: #fff8f8;
}

/* Floating Label */
.floating-label-signup {
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

.form-control-signup:focus ~ .floating-label-signup,
.form-control-signup:not(:placeholder-shown) ~ .floating-label-signup {
    top: -10px;
    left: 15px;
    font-size: 0.75rem;
    color: #667eea;
    background: white;
    padding: 0 5px;
    font-weight: 600;
}

/* Validation Icons */
.validation-icon-signup {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-control-signup.is-valid ~ .validation-icon-signup {
    opacity: 1;
    color: #28a745;
}

.form-control-signup.is-invalid ~ .validation-icon-signup {
    opacity: 1;
    color: #dc3545;
}

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 10px;
}

.strength-bars {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: #e9ecef;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.active {
    background: #dc3545;
}

.strength-bar.active.medium {
    background: #ffc107;
}

.strength-bar.active.strong {
    background: #28a745;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.strength-text.weak {
    color: #dc3545;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #28a745;
}

/* Password Toggle */
.password-toggle-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    z-index: 2;
    transition: all 0.3s ease;
}

.password-toggle-btn:hover {
    color: #667eea;
}

/* Referral Status */
.referral-status {
    margin-top: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: none;
}

.referral-status.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.referral-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.referral-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.referral-status.loading {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Terms Checkbox */
.terms-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 25px;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #6c757d;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox.checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.custom-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.terms-text {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

.terms-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Form Buttons */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-back {
    flex: 1;
    padding: 16px;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8f9ff;
}

.btn-next,
.btn-submit-signup {
    flex: 2;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-next:hover,
.btn-submit-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-next:active,
.btn-submit-signup:active {
    transform: translateY(0);
}

/* Alternative Signup */
.signup-alternative {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.signup-alternative p {
    color: #6c757d;
    margin: 0;
}

.signup-alternative a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.signup-alternative a:hover {
    text-decoration: underline;
}

/* Success Message */
.signup-success {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.signup-success.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-icon-signup {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
    color: white;
    animation: successBounce 0.6s ease;
    box-shadow: 0 10px 40px rgba(40, 167, 69, 0.4);
}

.signup-success h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 15px;
}

.signup-success p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-goto-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-goto-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    color: white;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991px) {
    .signup-page-advanced {
        flex-direction: column;
    }
    
    .signup-brand-section {
        min-height: 50vh;
        padding: 40px 30px;
    }
    
    .brand-logo h1 {
        font-size: 2.5rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .signup-form-section {
        padding: 40px 30px;
        max-height: none;
    }
}

@media (max-width: 767px) {
    .signup-brand-section {
        padding: 30px 20px;
    }
    
    .signup-form-section {
        padding: 30px 20px;
    }
    
    .signup-form-steps {
        padding: 25px 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .btn-back,
    .btn-next,
    .btn-submit-signup {
        flex: 1;
        width: 100%;
    }
    
    .signup-progress-stepper {
        margin: 30px 0;
    }
    
    .stepper-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .stepper-label {
        font-size: 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
