/* AxisVPN Mini App - Unified Typography System */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-persian: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-latin: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-persian);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Persian Mode (RTL) */
html[dir="rtl"], body[dir="rtl"], [dir="rtl"] {
  font-family: var(--font-persian);
  direction: rtl;
  text-align: right;
  letter-spacing: normal;
}

/* English Mode (LTR) */
html[dir="ltr"], body[dir="ltr"], [dir="ltr"] {
  font-family: var(--font-latin);
  direction: ltr;
  text-align: left;
  letter-spacing: -0.01em;
}

/* Unified Font Rule for All Inputs & Buttons */
button, input, select, textarea, optgroup, option {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* LTR Isolated Containers (for code, raw URLs, etc.) */
.ltr-isolate {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

/* Typography Hierarchy Scale */
.text-2xs { font-size: 0.68rem; line-height: 1.2; }
.text-xs  { font-size: 0.76rem; line-height: 1.35; }
.text-sm  { font-size: 0.86rem; line-height: 1.45; }
.text-base{ font-size: 0.96rem; line-height: 1.5; }
.text-md  { font-size: 1.05rem; line-height: 1.4; }
.text-lg  { font-size: 1.18rem; line-height: 1.35; }
.text-xl  { font-size: 1.35rem; line-height: 1.3; }
.text-2xl { font-size: 1.65rem; line-height: 1.2; }
.text-3xl { font-size: 1.95rem; line-height: 1.15; }

/* Font Weights */
.font-normal    { font-weight: 400; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black     { font-weight: 900; }

/* Text Color Classes */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-brand     { color: var(--brand-purple); }
.text-eco       { color: var(--eco-tier); }
.text-vip       { color: var(--vip-tier); }
.text-danger    { color: var(--danger); }
.text-success   { color: var(--success); }
.text-white     { color: #FFFFFF; }
