/* 1. تعریف فونت و تنظیمات پایه */
@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IranSansX/IRANSansX-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IranSansX/IRANSansX-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

:root {
    --background: #0D0D0D;
    --card-bg: #1A1A1A;
    --primary: #6C47FF;
    --primary-light: #8E72FF;
    --text-main: #FFFFFF;
    --text-secondary: #B3B3B3;
    --input-bg: #252525;
    --border-color: #333333;
}

.clickable {
    cursor: pointer;
}

/* 2. ریست کردن و اعمال فونت به تمام عناصر */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* اعمال فونت به همه جا حتی اینپوت‌ها */
    font-family: 'IRANSansX', Tahoma, sans-serif !important; 
}

body {
    background-color: #050505; /* رنگ پس‌زمینه بیرون از کادر در دسکتاپ */
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    display: flex;
    justify-content: center;
}

/* 3. اصلاح کادر موبایل (Mobile Wrapper) */
.mobile-wrapper {
    width: 100%;
    /* عرض را کمی بیشتر کردیم تا در دسکتاپ بهتر دیده شود */
    max-width: 500px; 
    min-height: 100vh;
    background-color: var(--background);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8); /* سایه برای جدا شدن از پس‌زمینه در دسکتاپ */
}

/* در گوشی‌های واقعی، سایه و محدودیت عرض حذف شود */
@media (max-width: 500px) {
    .mobile-wrapper {
        max-width: 100%;
        box-shadow: none;
    }
}

/* 4. استایل اینپوت‌ها و دکمه‌ها با فونت صحیح */
input, button, select, textarea {
    font-family: inherit; /* ارث‌بری فونت از والد */
    outline: none;
    border: none;
}

.input {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    transition: 0.3s;
}

.input:focus {
    border-color: var(--primary);
    background: #2a2a2a;
}

/* استایل مخصوص Placeholder (متن راهنما داخل اینپوت) */
::placeholder {
    color: var(--text-secondary);
    font-family: 'IRANSansX', sans-serif;
    opacity: 0.8;
}

.btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

/* نوربار عمومی */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 500px;
  height: 60px;
  background: var(--background);
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-around;
  align-items: center;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-secondary);
}

.nav-item .nav-text {
  font-weight: 400;
}

.nav-icon {
  width: 26px;
  height: 26px;
  filter: invert(100%);
  margin-bottom: 4px;
}

/* صفحه فعال */
.nav-item.active {
  color: #fff; /* سفید و بولد */
  font-weight: 700;
}

.nav-item.active .nav-text {
  font-weight: 700;
}


/* نمایش در دسکتاپ با هاور */
@media (hover:hover) {
    .badge-wrapper:hover .badge-tooltip {
        opacity: 1;
    }
}

.error {
    font-size: 12px;
    color: #e67a7a;
}
