/* HadiSoft — design system. Logical properties everywhere so RTL (fa/ar/ur) and LTR share one stylesheet. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn.woff2") format("woff2-variations"), url("/fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f8fc;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f3f5fb;
  --glass: rgba(255, 255, 255, .72);
  --border: rgba(15, 23, 42, .09);
  --border-strong: rgba(15, 23, 42, .16);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --brand-ink: #ffffff;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --gold: #f59e0b;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 30px 60px -20px rgba(30, 27, 75, .35);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070a14; --bg-2: #0c1122; --surface: #0f1528; --surface-2: #141b33; --glass: rgba(12, 17, 34, .72);
    --border: rgba(148, 163, 184, .12); --border-strong: rgba(148, 163, 184, .22);
    --text: #e8ecf6; --text-2: #a7b0c6; --text-3: #7d879e; --brand: #818cf8;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070a14; --bg-2: #0c1122; --surface: #0f1528; --surface-2: #141b33; --glass: rgba(12, 17, 34, .72);
  --border: rgba(148, 163, 184, .12); --border-strong: rgba(148, 163, 184, .22);
  --text: #e8ecf6; --text-2: #a7b0c6; --text-3: #7d879e; --brand: #818cf8;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Vazirmatn", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.75; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .7); }
.btn-primary:hover { box-shadow: 0 16px 32px -12px rgba(99, 102, 241, .8); }
.btn-accent { background: linear-gradient(135deg, var(--accent, var(--brand)), var(--accent2, var(--brand-2))); color: #fff; box-shadow: 0 12px 26px -12px var(--accent, var(--brand)); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.btn-danger { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.btn-disabled, .btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { padding: .5em 1em; font-size: .85rem; border-radius: 11px; }
.btn-lg { padding: 1em 1.8em; font-size: 1.05rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn .ver { font-weight: 500; opacity: .8; font-size: .85em; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 40px; height: 40px; padding: 0 9px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 3px; inset-inline-end: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.lang-code { font-size: .75rem; font-weight: 800; letter-spacing: .04em; }

/* ---------- Header ---------- */
.announce { background: var(--grad); color: #fff; text-align: center; font-size: .9rem; padding: 8px 16px; font-weight: 600; }
.announce .ic { width: 16px; height: 16px; }
.topbar { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; direction: ltr; }
.brand .logo svg { width: 34px; height: 34px; display: block; filter: drop-shadow(0 6px 12px rgba(99, 102, 241, .35)); }
.brand .word b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .95rem; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav .nav-admin { color: var(--brand); }
.tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.menu-btn, .show-sm { display: none; }
.dropdown { position: relative; }
.dropdown .menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 210px; padding: 8px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  animation: pop .18s var(--ease);
}
.dropdown .menu a, .dropdown .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer; text-align: start; }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown .menu a.on { color: var(--brand); font-weight: 700; }
.dropdown .menu .ic { width: 18px; height: 18px; }
.menu-head { padding: 8px 12px 10px; font-size: .8rem; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: inline-block; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 90; inset-block-end: 24px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg); animation: toast 5s var(--ease) forwards; max-width: calc(100vw - 32px); }
[dir="rtl"] .toast { transform: translateX(50%); }
.toast .ic { color: #34d399; }
.toast-err .ic { color: #f87171; }
@keyframes toast { 0% { opacity: 0; translate: 0 20px; } 6%, 88% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 20px; visibility: hidden; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
.orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 16s ease-in-out infinite; }
.orb.o1 { width: 460px; height: 460px; background: #6366f1; top: -160px; inset-inline-start: -120px; }
.orb.o2 { width: 380px; height: 380px; background: #06b6d4; top: 40px; inset-inline-end: -120px; animation-delay: -5s; }
.orb.o3 { width: 300px; height: 300px; background: #a855f7; bottom: -160px; inset-inline-start: 40%; animation-delay: -9s; opacity: .35; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.06); } 66% { transform: translate(-20px, 25px) scale(.96); } }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .85rem; font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-sm); }
[dir="rtl"] .eyebrow { padding: 6px 8px 6px 14px; }
.eyebrow .pill { background: var(--grad); color: #fff; padding: 2px 10px; border-radius: 999px; font-size: .75rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 900; margin: 22px 0 18px; line-height: 1.15; }
[dir="rtl"] .hero h1 { line-height: 1.35; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 36em; }
.search { position: relative; max-width: 520px; margin-top: 28px; }
.search input { width: 100%; height: 58px; padding-inline: 52px 130px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow); }
.search > .ic { position: absolute; top: 50%; inset-inline-start: 18px; transform: translateY(-50%); color: var(--text-3); }
.search .btn { position: absolute; top: 7px; inset-inline-end: 7px; height: 44px; }
.stats { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 36px; }
.stat b { display: block; font-size: 1.8rem; font-weight: 900; line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--text-3); }

.hero-art { position: relative; height: 420px; }
.hero-art .tile { position: absolute; width: 104px; height: 104px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg); padding: 14px; border: 1px solid var(--border); animation: bob 7s ease-in-out infinite; transition: transform .3s var(--ease); }
.hero-art .tile img { width: 100%; height: 100%; border-radius: 18px; object-fit: cover; }
.hero-art .tile:hover { transform: scale(1.08) rotate(-3deg); z-index: 2; }
.hero-art .t0 { top: 10%; inset-inline-start: 38%; width: 136px; height: 136px; border-radius: 34px; animation-delay: 0s; }
.hero-art .t1 { top: 0; inset-inline-start: 4%; animation-delay: -1s; }
.hero-art .t2 { top: 2%; inset-inline-end: 0; animation-delay: -2s; }
.hero-art .t3 { top: 44%; inset-inline-start: 0; animation-delay: -3s; }
.hero-art .t4 { top: 48%; inset-inline-start: 30%; animation-delay: -4s; }
.hero-art .t5 { top: 40%; inset-inline-end: 4%; width: 120px; height: 120px; animation-delay: -5s; }
.hero-art .t6 { bottom: 0; inset-inline-start: 14%; animation-delay: -2.5s; }
.hero-art .t7 { bottom: 2%; inset-inline-end: 22%; animation-delay: -3.5s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; margin: 0; }
.section-head p { color: var(--text-3); margin: 6px 0 0; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
[dir="rtl"] .kicker { letter-spacing: 0; }

/* Featured */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px; min-height: 260px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(140deg, var(--accent), var(--accent2)); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); isolation: isolate; }
.feat-card::after { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .14); top: -90px; inset-inline-end: -80px; transition: transform .6s var(--ease); }
.feat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feat-card:hover::after { transform: scale(1.25); }
.feat-card img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); background: #fff; }
.feat-card h3 { font-size: 1.45rem; margin: 18px 0 4px; font-weight: 900; }
.feat-card p { opacity: .9; margin: 0; }
.feat-card .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-top: 18px; }
[dir="rtl"] .go .ic, [dir="rtl"] .card-cta .ic, [dir="rtl"] .btn .ic-flip { transform: scaleX(-1); }

/* Filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; color: var(--text-2); transition: all .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-size: .75rem; opacity: .7; }

/* App grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; margin-top: 24px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; gap: 14px; align-items: center; }
.app-icon { width: 64px; height: 64px; border-radius: 18px; flex: none; object-fit: cover; box-shadow: 0 8px 18px -8px var(--accent, rgba(0, 0, 0, .3)); background: var(--surface-2); }
.card h3 { font-size: 1.12rem; margin: 0; font-weight: 800; }
.card .meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text-3); flex-wrap: wrap; }
.card .tag { color: var(--text-2); min-height: 3.2em; margin: 0; font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--border); }
.card-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent); font-size: .9rem; }
.plats { display: inline-flex; gap: 6px; color: var(--text-3); }
.plats .ic { width: 16px; height: 16px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; line-height: 1.6; white-space: nowrap; }
.badge-free { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.badge-price { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.badge-soon { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge-ver { background: var(--surface-2); color: var(--text-3); font-weight: 700; direction: ltr; }
.badge-owned { background: var(--grad); color: #fff; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-weight: 700; font-size: .85rem; }
.rating .ic { width: 15px; height: 15px; }
.strike { text-decoration: line-through; opacity: .55; font-size: .85em; margin-inline-end: 4px; }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); border: 2px dashed var(--border-strong); border-radius: var(--r-lg); }
.card.soon-card { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--text-3); min-height: 240px; background: transparent; }
.soon-card .plus { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: var(--surface-2); }

/* Value props */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.value .vi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 16px; }
.value h3 { font-size: 1.05rem; font-weight: 800; }
.value p { color: var(--text-2); font-size: .93rem; margin: 0; }

.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 56px; background: var(--grad); color: #fff; text-align: center; box-shadow: var(--shadow-lg); isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent); }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; }
.cta-band p { opacity: .9; max-width: 560px; margin: 0 auto 24px; }
.cta-band .btn { background: #fff; color: #312e81; }

/* ---------- App details ---------- */
.app-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 0 120px; background: linear-gradient(135deg, var(--accent), var(--accent2)); isolation: isolate; }
.app-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .22), transparent 40%), radial-gradient(circle at 10% 90%, rgba(0, 0, 0, .25), transparent 45%); }
.app-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .88rem; opacity: .85; margin-bottom: 26px; }
.crumbs a:hover { text-decoration: underline; }
.app-head { display: flex; gap: 28px; align-items: center; }
.app-head .big-icon { width: 128px; height: 128px; border-radius: 34px; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .55); background: #fff; flex: none; }
.app-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 900; margin: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-head .ver { font-size: .95rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); direction: ltr; }
.app-head .tagline { font-size: 1.2rem; opacity: .92; margin: 8px 0 14px; }
.app-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.fact { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); }
.fact .ic { width: 16px; height: 16px; }
.fact .plats { color: inherit; }
.stat b { direction: ltr; unicode-bidi: isolate; }
.app-body { margin-top: -80px; position: relative; z-index: 2; }
.app-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.35rem; font-weight: 900; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.panel h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--accent, var(--brand)), var(--accent2, var(--brand-2))); }
.desc { font-size: 1.05rem; color: var(--text-2); white-space: pre-line; }
.buy-box { position: sticky; top: 92px; }
.price { font-size: 2rem; font-weight: 900; line-height: 1.2; }
.price small { font-size: .9rem; font-weight: 600; color: var(--text-3); }
.buy-box .btn { width: 100%; margin-top: 10px; }
.buy-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: .9rem; color: var(--text-2); }
.buy-list li { display: flex; gap: 10px; align-items: center; }
.buy-list .ic { width: 18px; height: 18px; color: var(--ok); }
.stores { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature { display: flex; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid transparent; transition: border-color .25s, transform .25s var(--ease); }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); }
.f-icon { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.feature h4 { font-size: 1rem; margin: 2px 0 4px; font-weight: 800; }
.feature p { font-size: .9rem; color: var(--text-2); margin: 0; line-height: 1.65; }
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.shots a { flex: none; scroll-snap-align: start; }
.shots img { height: 420px; width: auto; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.video { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: var(--r); }
.releases { display: grid; gap: 10px; }
.release { border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px; background: var(--surface-2); }
.release summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; font-weight: 700; }
.release summary::-webkit-details-marker { display: none; }
.release .notes { margin-top: 10px; color: var(--text-2); white-space: pre-line; font-size: .93rem; }
.reviews { display: grid; gap: 14px; }
.review { padding: 18px; border-radius: var(--r); background: var(--surface-2); }
.review-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.review .who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--accent, #6366f1), var(--accent2, #06b6d4)); }
.reply { margin-top: 10px; padding: 10px 14px; border-inline-start: 3px solid var(--accent, var(--brand)); background: var(--surface); border-radius: 10px; font-size: .9rem; }
.rating-sum { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.rating-sum b { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
[dir="rtl"] .stars-input { flex-direction: row-reverse; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { cursor: pointer; color: var(--border-strong); font-size: 1.7rem; line-height: 1; transition: color .15s, transform .15s; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: var(--gold); }
.stars-input label:hover { transform: scale(1.15); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .9rem; }
.input, .form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form input[type=url], .form input[type=search], .form select, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 120px; resize: vertical; }
.input:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.field-validation-error, .validation-summary-errors, .text-err { color: var(--err); font-size: .85rem; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.validation-summary-valid { display: none; }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.auth { min-height: calc(100vh - 68px - 220px); display: grid; place-items: center; padding: 56px 20px; position: relative; overflow: hidden; isolation: isolate; }
.auth-card { width: 100%; max-width: 440px; padding: 40px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.7rem; font-weight: 900; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-3); margin-bottom: 26px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: .92rem; color: var(--text-3); }
.auth-alt a, .link { color: var(--brand); font-weight: 700; }

/* ---------- Pages ---------- */
.page-head { padding: 64px 0 36px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; }
.page-head p { color: var(--text-2); max-width: 640px; margin-inline: auto; font-size: 1.1rem; }
.prose { max-width: 780px; margin: 0 auto; font-size: 1.04rem; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 1.35rem; margin-top: 1.8em; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 800; }
.table tr:hover td { background: var(--surface-2); }
.status { font-weight: 800; font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.status-Paid, .status-Approved { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.status-Pending { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.status-Failed, .status-Cancelled, .status-Rejected, .status-Refunded { color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.lib-card { display: grid; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.key { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: .85rem; }
.copy { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 4px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs a, .tabs button { padding: 10px 16px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--text-3); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tabs .on { color: var(--brand); border-color: var(--brand); }
.err-page { text-align: center; padding: 120px 20px; }
.err-page .code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; }
.qr { display: inline-block; padding: 14px; background: #fff; border-radius: 16px; }
.qr img, .qr svg { width: 200px; height: 200px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codes span { padding: 8px; text-align: center; background: var(--surface-2); border-radius: 8px; }

/* ---------- Footer ---------- */
.footer { margin-top: 80px; border-top: 1px solid var(--border); background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding-block: 56px 36px; }
.footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 14px; }
[dir="rtl"] .footer h4 { letter-spacing: 0; }
.footer a:not(.brand) { display: block; color: var(--text-2); padding: 4px 0; font-size: .95rem; transition: color .2s; }
.footer a:hover { color: var(--brand); }
.foot-brand p { color: var(--text-3); margin-top: 14px; max-width: 320px; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid !important; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); padding: 0 !important; }
.trust { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .92rem; margin-bottom: 8px; }
.trust .ic { color: var(--ok); width: 18px; height: 18px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; padding-block: 20px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-3); flex-wrap: wrap; }
.foot-bottom a { display: inline !important; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 300px; max-width: 520px; width: 100%; margin-inline: auto; }
  .featured { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .buy-box { position: static; order: -1; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-btn, .show-sm { display: inline-flex; }
  .hide-sm { display: none; }
  .nav { position: fixed; inset: 68px 0 auto; flex-direction: column; padding: 12px 20px 20px; margin: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .bar { gap: 8px; }
  .hero { padding: 48px 0 40px; }
  .hero-art { display: none; }
  .section { padding: 56px 0; }
  .featured, .values, .features, .row-2 { grid-template-columns: 1fr; }
  .app-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .app-head .big-icon { width: 96px; height: 96px; border-radius: 26px; }
  .panel { padding: 22px; }
  .shots img { height: 340px; }
  .cta-band { padding: 36px 22px; }
  .auth-card { padding: 28px 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .search input { padding-inline-end: 16px; }
  .search .btn { display: none; }
}

/* Ads: progress meter + advertiser report page */
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.ad-report { padding-block: 28px 60px; }
.ad-report .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.ad-report .kpi { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.ad-report .kpi .k { font-size: .82rem; color: var(--text-3); font-weight: 700; }
.ad-report .kpi .v { font-size: 1.7rem; font-weight: 900; margin-top: 4px; line-height: 1.2; }
.ad-report .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.ad-report .two .panel + .panel { margin-top: 0; }
.kpi .v.small-v { font-size: 1.1rem; }
@media (max-width: 760px) { .ad-report .kpis, .ad-report .two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ad-report .kpis, .ad-report .two { grid-template-columns: 1fr; } }
.ad-preview { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px dashed var(--border); border-radius: var(--r-lg); max-width: 420px; }
.ad-preview img { max-width: 100%; border-radius: 8px; }
.ad-preview .tag { font-size: .7rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-3); }
