* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:'Vazirmatn';
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 32px;
    padding: 40px 30px;
    position: relative;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: bold;
}

h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 10px;
}

p.subtitle {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
    display: block !important;
    visibility: visible !important;
}

label {
    display: block !important;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    visibility: visible !important;
}

input[type="text"],
input[type="tel"],
input[type="password"] {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500; /* وزن متوسط برای ظاهری مدرن و خوانا */
    letter-spacing: 0.5px; /* فاصله جزئی برای زیبایی و امنیت بصری */
    width: 100% !important;
    padding: 16px 20px;
    font-size: 15px;
    border: none;
    border-radius: 16px;
    background: #f5f5f5;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 
        inset 4px 4px 10px rgba(0, 0, 0, 0.05),
        inset -4px -4px 10px rgba(255, 255, 255, 0.9);
    display: block !important;
    visibility: visible !important;
}

input:focus {
    outline: none;
    background: #ebebeb;
    box-shadow: 
        inset 6px 6px 12px rgba(0, 0, 0, 0.08),
        inset -6px -6px 12px rgba(255, 255, 255, 1);
}

input::placeholder {
    color: #999;
}

.btn {
    width: 100%;
    padding: 18px;
        font-family:'Vazirmatn';

    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.15),
        -8px -8px 20px rgba(255, 255, 255, 0.7);
}

.btn-primary:hover:not(:disabled) {
    background: #2d2d2d;
    transform: translateY(-2px);
    box-shadow: 
        10px 10px 25px rgba(0, 0, 0, 0.2),
        -10px -10px 25px rgba(255, 255, 255, 0.8);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
    box-shadow: 
        6px 6px 15px rgba(0, 0, 0, 0.08),
        -6px -6px 15px rgba(255, 255, 255, 0.9);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #ebebeb;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-group label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
}

.checkbox-group a {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
    direction: ltr;
}

.otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    background: #f5f5f5;
    color: #1a1a1a;
    box-shadow: 
        inset 4px 4px 10px rgba(0, 0, 0, 0.05),
        inset -4px -4px 10px rgba(255, 255, 255, 0.9);
}

.otp-input:focus {
    outline: none;
    background: #ebebeb;
    box-shadow: 
        inset 6px 6px 12px rgba(0, 0, 0, 0.08),
        inset -6px -6px 12px rgba(255, 255, 255, 1);
}

.back-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 
        4px 4px 10px rgba(0, 0, 0, 0.05),
        -4px -4px 10px rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #ebebeb;
    transform: translateY(-1px);
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.text-link {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 12px 20px;
    display: inline-block;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.text-link:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.link-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
}

.dot.active {
    background: #1a1a1a;
}

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
        border-radius: 24px;
    }
    
    .logo {
        width: 112px;
        height: 117px;
        font-size: 40px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}




.logo img {
    animation: fadeIn 1.2s ease-in-out;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.otp-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.otp-subtitle {
    text-align: center;
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
}

/* استایل بیضی شماره تلفن */
.phone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f3f5f6;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    border-radius: 100px;
    padding: 8px 16px;
    margin: 0 auto 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.05), inset -4px -4px 10px rgba(255, 255, 255, 0.9);

    width: fit-content;              /* برای عرض خودکار */
    display: flex;                   /* برای وسط‌چین شدن */
    justify-content: center;
    width: 50%;
}

#editPhoneBtn {
    display: flex;
    justify-content: center;
}

.phone-badge:hover {
    background: #e9ecee;
}

.phone-badge .material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
    margin-bottom: 25px;
}

.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-group input {
    width: 100%;
    padding-right: 20px; /* جا برای آیکون چشم */
}

.toggle-password {
    position: absolute;
    right: 90%;
    cursor: pointer;
    color: #777;
    font-size: 22px;
    user-select: none;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #000;
}






/* فونت انگلیسی مدرن برای اعداد */
input[type="tel"],
input[type="text"][class*="otp-input"],
#resendTimer,
#displayPhone {
    font-family: 'Inter', sans-serif !important; /* فونت انگلیسی مدرن */
    font-variant-numeric: tabular-nums; /* هم‌تراز عمودی اعداد برای خوانایی بهتر */
    font-weight: 500; /* وزن متوسط برای ظاهری مدرن */
    letter-spacing: 0.5px; /* فاصله جزئی برای زیبایی */
}

/* برای placeholderهای عددی */
input[type="tel"]::placeholder,
input[type="text"][class*="otp-input"]::placeholder {
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}
/* اصلاح فونت برای کلاس text-link (و ترکیب با text-center) */
.text-link.text-center,
.text-link {
    font-family: 'Vazirmatn', 'Yekan', tahoma, sans-serif !important; /* اولویت فونت فارسی مدرن */
    font-weight: 500 !important; /* وزن متوسط برای خوانایی بهتر در دکمه‌های متنی */
    font-size: 14px !important; /* اندازه ثابت برای consistency */
    line-height: 1.5 !important; /* خطوط نرم برای RTL */
    color: #1a1a1a !important; /* حفظ رنگ اصلی، اما قابل تنظیم */
}

/* برای حالت hover، فونت را حفظ کنید */
.text-link.text-center:hover,
.text-link:hover {
    font-family: 'Vazirmatn', 'Yekan', tahoma, sans-serif !important;
}