

/* Overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1099;
}

.login-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    background: white;
    border-radius: 32px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    padding: 32px 24px;
}

    .login-modal.active {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .login-modal::-webkit-scrollbar {
        width: 6px;
    }

    .login-modal::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #FFD6E0, #E8D5F2);
        border-radius: 10px;
    }

/* Close Button */
.login-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    z-index: 10;
}

    .login-close-btn:hover {
        background: #E5E7EB;
        transform: rotate(90deg);
    }

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

/* Progress Steps */
.login-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F3F4F6;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.4s;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,157,0.3);
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.step-label {
    font-size: 0.7rem;
    color: #9CA3AF;
    font-weight: 600;
    transition: color 0.3s;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: #374151;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #F3F4F6;
    border-radius: 10px;
    transition: background 0.4s;
    margin-bottom: 20px;
}

    .progress-line.active {
        background: linear-gradient(90deg, #FF6B9D, #C44569);
    }

/* Steps */
.login-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Group */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    right: 16px;
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-align: left;
    direction: ltr;
}

    .login-input:focus {
        outline: none;
        border-color: #FF6B9D;
        box-shadow: 0 0 0 4px rgba(255,107,157,0.1);
    }

    .login-input.error {
        border-color: #EF4444;
        box-shadow: 0 0 0 4px rgba(239,68,68,0.1);
    }

.input-error {
    display: none;
    align-items: center;
    gap: 6px;
    color: #EF4444;
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 600;
}

    .input-error.show {
        display: flex;
    }

/* Terms Checkbox */
.login-terms {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #6B7280;
}

.custom-checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    background: white;
}

    .checkbox-custom::after {
        content: '';
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg) scale(0);
        transition: transform 0.2s;
        margin-top: -2px;
    }

.custom-checkbox-input:checked + .checkbox-custom {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    border-color: #FF6B9D;
}

    .custom-checkbox-input:checked + .checkbox-custom::after {
        transform: rotate(45deg) scale(1);
    }

.checkbox-text {
    line-height: 1.5;
}

/* Buttons */
.login-btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(255,107,157,0.3);
    position: relative;
    overflow: hidden;
}

    .login-btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.6s;
    }

    .login-btn-primary:hover:not(:disabled)::before {
        left: 100%;
    }

    .login-btn-primary:hover:not(:disabled) {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(255,107,157,0.45);
    }

    .login-btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

    .login-btn-primary.loading {
        pointer-events: none;
    }

/* OTP Inputs */
.otp-info {
    text-align: center;
    margin-bottom: 24px;
}

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    direction: ltr;
}

.otp-input {
    width: 50px;
    height: 60px;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.3s;
    color: #374151;
}

    .otp-input:focus {
        outline: none;
        border-color: #FF6B9D;
        box-shadow: 0 0 0 4px rgba(255,107,157,0.1);
        transform: scale(1.05);
    }

    .otp-input.filled {
        background: rgba(255,107,157,0.05);
        border-color: #FF6B9D;
    }

    .otp-input.error {
        border-color: #EF4444;
        box-shadow: 0 0 0 4px rgba(239,68,68,0.1);
        animation: shake 0.4s;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.otp-error {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #EF4444;
    font-size: 0.85rem;
    margin-bottom: 16px;
    font-weight: 600;
}

    .otp-error.show {
        display: flex;
    }

/* Resend Section */
.resend-section {
    text-align: center;
    margin-bottom: 20px;
}

.resend-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #9CA3AF;
    font-size: 0.85rem;
    font-weight: 600;
}

.resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255,107,157,0.1);
    color: #FF6B9D;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

    .resend-btn:hover {
        background: rgba(255,107,157,0.2);
        transform: scale(1.05);
    }

/* Success */
.success-content {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(16,185,129,0.3);
    animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.user-info-card {
    background: linear-gradient(135deg, rgba(255,214,224,0.3), rgba(232,213,242,0.3));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Loading */
.login-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

    .login-loading.active {
        display: flex;
    }

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,107,157,0.2);
    border-top-color: #FF6B9D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-weight: 700;
    color: #374151;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 32px 32px 0 0;
        max-height: 85vh;
        width: 100%;
        max-width: 100%;
    }

        .login-modal.active {
            transform: translateY(0);
        }

    .otp-input {
        width: 44px;
        height: 54px;
    }
}

