/* ============================================= */
/* تنظیمات پایه و متغیرها */
/* ============================================= */
:root {
    /* رنگ‌های قرمز (تم اصلی) */
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --primary-light: #f8d7da;
    --primary-gradient: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    
    /* رنگ‌های ثانویه */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* رنگ‌های خنثی */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #e9ecef;
    --dark-gray: #495057;
    --black: #212529;
    
    /* سایه‌ها */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-primary: 0 4px 15px rgba(220, 53, 69, 0.3);
    
    /* بوردر */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    /* فونت */
    --font-family: 'Vazirmatn', sans-serif;
}

/* ============================================= */
/* ریست و تنظیمات عمومی */
/* ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 50%, #fff5f5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* ============================================= */
/* حباب‌های پس‌زمینه انیمیشنی */
/* ============================================= */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(220, 53, 69, 0.1) 0%, 
        rgba(220, 53, 69, 0.05) 100%);
    animation: float 15s infinite ease-in-out;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    bottom: 15%;
    right: 10%;
    animation-delay: 6s;
}

.bubble:nth-child(5) {
    width: 50px;
    height: 50px;
    top: 50%;
    left: 5%;
    animation-delay: 8s;
}

.bubble:nth-child(6) {
    width: 90px;
    height: 90px;
    top: 70%;
    right: 25%;
    animation-delay: 10s;
}

.bubble:nth-child(7) {
    width: 70px;
    height: 70px;
    top: 5%;
    right: 40%;
    animation-delay: 12s;
}

.bubble:nth-child(8) {
    width: 110px;
    height: 110px;
    bottom: 5%;
    left: 40%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.8;
    }
}

/* ============================================= */
/* کانتینر اصلی فرم */
/* ============================================= */
.register-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================= */
/* هدر فرم */
/* ============================================= */
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-primary);
}

.logo-wrapper i {
    font-size: 36px;
    color: var(--white);
}

.register-header h1 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 10px;
    font-weight: 700;
}

.register-header p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ============================================= */
/* نشانگر مراحل */
/* ============================================= */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step span {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gray);
    color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step p {
    font-size: 0.7rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.step.active span {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.step.active p {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed span {
    background: var(--success-color);
    color: var(--white);
}

.step-line {
    width: 30px;
    height: 3px;
    background: var(--gray);
    border-radius: 2px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.step-line.active {
    background: var(--primary-color);
}

/* ============================================= */
/* فرم استپ‌ها */
/* ============================================= */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================= */
/* گروه اینپوت */
/* ============================================= */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.input-group label i {
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 14px;
    border: 2px solid var(--gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.input-wrapper input.error {
    border-color: var(--danger-color);
    background: #fff5f5;
}

.input-wrapper input.success {
    border-color: var(--success-color);
    background: #f0fff4;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 5px;
}

.error-message {
    display: block;
    font-size: 0.8rem;
    color: var(--danger-color);
    margin-top: 5px;
    min-height: 20px;
}

/* ============================================= */
/* اینپوت‌های OTP */
/* ============================================= */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
}

.otp-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--gray);
    border-radius: var(--border-radius);
    background: var(--light-gray);
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.otp-input.filled {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

/* ============================================= */
/* اطلاعات OTP */
/* ============================================= */
.otp-info {
    text-align: center;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.otp-info i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.otp-info p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.otp-info #displayPhone {
    font-weight: 700;
    color: var(--primary-color);
    direction: ltr;
    display: inline-block;
}

.btn-edit-phone {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 10px;
    font-family: var(--font-family);
    transition: color 0.3s ease;
}

.btn-edit-phone:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================= */
/* تایمر */
/* ============================================= */
.timer-wrapper {
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.timer {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 5px;
    direction: ltr;
    display: inline-block;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.btn-resend:hover {
    text-decoration: underline;
}

/* ============================================= */
/* نشان موفقیت */
/* ============================================= */
.success-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    color: var(--success-color);
    font-weight: 600;
}

.success-badge i {
    font-size: 1.2rem;
}

/* ============================================= */
/* نوار قدرت رمز عبور */
/* ============================================= */
.password-strength {
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.weak {
    width: 33%;
    background: var(--danger-color);
}

.strength-bar.medium {
    width: 66%;
    background: var(--warning-color);
}

.strength-bar.strong {
    width: 100%;
    background: var(--success-color);
}

/* ============================================= */
/* دکمه‌ها */
/* ============================================= */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary.btn-success:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-loader {
    display: flex;
    align-items: center;
}

/* ============================================= */
/* فوتر فرم */
/* ============================================= */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}

.form-footer p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================= */
/* مودال */
/* ============================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.modal-icon.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: var(--success-color);
}

.modal-icon i {
    font-size: 40px;
}

.modal-content h2 {
    color: var(--black);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.modal-content p {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.modal-content .btn-primary {
    display: inline-flex;
    width: auto;
    padding: 12px 30px;
}

/* ============================================= */
/* کلاس‌های کمکی */
/* ============================================= */
.hidden {
    display: none !important;
}

/* ============================================= */
/* ریسپانسیو */
/* ============================================= */
@media (max-width: 480px) {
    .register-container {
        padding: 25px 20px;
    }
    
    .register-header h1 {
        font-size: 1.2rem;
    }
    
    .step-indicator {
        gap: 5px;
    }
    
    .step span {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step p {
        font-size: 0.6rem;
    }
    
    .step-line {
        width: 20px;
    }
    
    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .otp-inputs {
        gap: 6px;
    }
}