/* Auth Wrapper */
.auth-wrapper {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

/* Background Shapes */
.auth-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.auth-bg-shapes .shape-1 {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.auth-bg-shapes .shape-2 {
    position: absolute;
    bottom: -15%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.auth-bg-shapes .shape-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Auth Logo */
.auth-logo {
    display: inline-block;
    margin-bottom: 2rem;
}

.logo-img {
    height: 60px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.auth-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem 2rem 1rem;
}

.auth-card .card-body {
    padding: 2rem;
}

/* Auth Icon */
.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.auth-icon i {
    font-size: 2rem;
    color: white;
}

/* Auth Title */
.auth-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.875rem;
}

.auth-subtitle {
    color: #718096;
    margin-bottom: 0;
    font-size: 1rem;
}

/* Login Switcher */
.login-switcher {
    text-align: center;
    margin: 1.5rem 0;
}

.switch-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.switch-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Registration Steps */
.registration-steps {
    margin: 2rem 0 1rem;
}

.step-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.step.completed .step-number {
    background: #48bb78;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #718096;
}

.step.active .step-label {
    color: #2d3748;
    font-weight: 600;
}

.step-divider {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 1rem;
    flex-shrink: 0;
}

/* Form Steps */
.form-step {
    display: none;
}

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

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

/* Step Titles */
.step-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.step-subtitle {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

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

.input-group-text {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-right: none;
    color: #718096;
}

.input-group .form-control {
    border-left: none;
}

.input-group .btn {
    border: 2px solid #e2e8f0;
    border-left: none;
}

/* ---- Phone input group with country code selector ---- */
.phone-input-group {
    display: flex;
    align-items: stretch;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.phone-input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.phone-country-select-wrap {
    display: flex;
    align-items: center;
    position: relative;
    background: #f7fafc;
    border-right: 2px solid #e2e8f0;
    flex-shrink: 0;
    min-width: 110px;
    max-width: 140px;
}

.phone-country-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 0.75rem 1.75rem 0.75rem 0.6rem;
    font-size: 0.82rem;
    color: #4a5568;
    cursor: pointer;
    width: 100%;
    outline: none;
    font-weight: 500;
    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23718096'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 8px;
}

.phone-country-select:focus {
    outline: none;
}

.phone-number-input.form-control {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    background: white;
}

.phone-number-input.form-control:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Error state */
.phone-input-group:has(.is-invalid) {
    border-color: #f56565;
}

/* Dial code badge shown below the group (optional) */
.dial-badge {
    display: none; /* hidden — we rely on the select label itself */
}

/* Validation States */
.is-valid {
    border-color: #48bb78;
}

.is-invalid {
    border-color: #f56565;
}

.valid-feedback {
    color: #48bb78;
    font-size: 0.875rem;
}

.invalid-feedback {
    color: #f56565;
    font-size: 0.875rem;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.strength-weak { background: #f56565; width: 25%; }
.strength-fair { background: #ed8936; width: 50%; }
.strength-good { background: #38b2ac; width: 75%; }
.strength-strong { background: #48bb78; width: 100%; }

/* Sponsor Info Card */
.sponsor-info-card {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(56, 178, 172, 0.1) 100%);
    border: 1px solid rgba(72, 187, 120, 0.2);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.sponsor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.sponsor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sponsor-details h6 {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
}

.sponsor-details p {
    margin: 0;
    font-size: 0.875rem;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.btn {
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.3);
}

.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #718096;
    background: white;
}

.btn-outline-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* Alerts */
.alert-modern {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-left: 4px solid #f56565;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border-left: 4px solid #48bb78;
}

/* Real-time Validation */
.validation-success {
    color: #48bb78 !important;
}

.validation-error {
    color: #f56565 !important;
}

.validation-loading {
    color: #667eea !important;
}

.validation-loading::before {
    content: "⏳ ";
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-card .card-header,
    .auth-card .card-body {
        padding: 1.5rem;
    }

    .step-container {
        flex-direction: column;
        gap: 1rem;
    }

    .step-divider {
        width: 2px;
        height: 30px;
        margin: 0.5rem 0;
    }

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .form-navigation .btn {
        width: 100%;
    }

    .logo-img {
        height: 45px;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
    }

    .auth-icon i {
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
}

/* Registration Confirmation Modal */
.registration-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.registration-summary .row {
    align-items: center;
}

.registration-summary .row:last-child {
    margin-bottom: 0 !important;
}

#registrationLoadingOverlay .loading-content {
    animation: fadeInUp 0.5s ease-out;
}

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