/* ══════════════════════════════════════════════════════════════════════════════════════
   EPIC — تصميم الموقع العام
   ──────────────────────────────────────────────────────────────────────────────────────
   لتغيير الهوية البصرية عدّل المتغيّرات في :root فقط — كل الصفحة تُبنى منها.
   --accent يتغيّر تلقائياً للون الفرع المختار (من config.js).
   ══════════════════════════════════════════════════════════════════════════════════════ */

@property --accent { syntax: '<color>'; inherits: true; initial-value: #22d3ee; }

:root {
  --bg: #05060d;
  --bg-2: #0a0d1a;
  --bg-3: #10142a;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --text: #eef2ff;
  --text-2: #a8b0cf;
  --text-3: #6b7394;

  --accent: #22d3ee;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;

  --radius: 24px;
  --radius-sm: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 72px;

  --font-display: 'Changa', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Changa', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
  transition: --accent .7s ease;
}

/* ── أساسيات ─────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 85% -5%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(900px 520px at 0% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.75 var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--bg); font-weight: 700; }
.skip:focus { top: 12px; }

/* ── الأزرار ─────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .72em 1.3em; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .98rem; line-height: 1.2;
  white-space: nowrap; position: relative; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s, border-color .3s, color .3s;
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: .95em 1.7em; font-size: 1.08rem; }
.btn-sm { padding: .5em 1em; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-primary {
  color: #04050b;
  background: linear-gradient(115deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--violet)));
  box-shadow: 0 10px 34px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: translateY(-2px); }
.btn.is-busy { pointer-events: none; color: transparent; }
.btn.is-busy::after {
  content: ''; position: absolute; width: 1.2em; height: 1.2em; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .25); border-top-color: #04050b; animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after { border-color: var(--line-2); border-top-color: var(--text); }

/* زر بوابة الموظفين: إطار متدرّج يدور ببطء */
.btn-staff {
  color: var(--text); background: rgba(5, 6, 13, .6); border: 1px solid transparent;
  background-image: linear-gradient(rgba(10, 13, 26, .92), rgba(10, 13, 26, .92)),
    conic-gradient(from var(--spin, 0deg), var(--accent), var(--violet), var(--pink), var(--accent));
  background-origin: border-box; background-clip: padding-box, border-box;
  animation: staffSpin 6s linear infinite;
}
.btn-staff:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px var(--accent); }
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes staffSpin { to { --spin: 360deg; } }

/* ── الشريط العلوي ───────────────────────────────────────────────────────────────── */
.nav { position: fixed; inset-inline: 0; top: 0; z-index: 50; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(5, 6, 13, .74); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; height: var(--nav-h); }
.logo { display: flex; flex-direction: column; line-height: 1; direction: ltr; }
.logo-mark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: .08em;
  background: linear-gradient(100deg, #fff 10%, var(--accent) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-sub { font-family: var(--font-display); font-size: .58rem; letter-spacing: .42em; color: var(--text-3); margin-top: 3px; }
.nav-links { display: flex; gap: 2px; margin-inline-start: auto; }
.nav-links a { padding: .45em .9em; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: .95rem; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── الواجهة ─────────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: calc(var(--nav-h) + 40px) 0 120px; text-align: center; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-scan {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(5, 6, 13, .85) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
.hero-in { display: flex; flex-direction: column; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: .45em 1.1em; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text); font-size: .92rem; font-weight: 500; backdrop-filter: blur(6px);
}
.kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s infinite; }
.hero-title { margin-top: 18px; display: flex; flex-direction: column; align-items: center; }
.hero-line { font-size: clamp(1.7rem, 4.6vw, 3.1rem); font-weight: 700; margin-top: 4px; }
.hero-sub { max-width: 640px; margin-top: 18px; color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }

/* شعار متوهّج مع تشويش «جلتش» عابر */
.glitch {
  position: relative; display: inline-block; direction: ltr;
  font-size: clamp(5rem, 19vw, 12.5rem); font-weight: 800; line-height: .9; letter-spacing: .04em;
  background: linear-gradient(100deg, #fff 15%, var(--accent) 45%, var(--violet) 72%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 36px color-mix(in srgb, var(--accent) 45%, transparent));
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  -webkit-background-clip: initial; background: none; mix-blend-mode: screen; opacity: 0;
}
.glitch::before { color: var(--accent); animation: glitchA 5s infinite steps(1); }
.glitch::after { color: var(--pink); animation: glitchB 5s infinite steps(1); }
@keyframes glitchA {
  0%, 88%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
  89% { opacity: .9; transform: translate(-6px, 2px); clip-path: inset(10% 0 60% 0); }
  91% { opacity: .9; transform: translate(5px, -2px); clip-path: inset(55% 0 15% 0); }
  93% { opacity: .9; transform: translate(-3px, 1px); clip-path: inset(30% 0 40% 0); }
}
@keyframes glitchB {
  0%, 88%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
  90% { opacity: .8; transform: translate(6px, -1px); clip-path: inset(65% 0 5% 0); }
  92% { opacity: .8; transform: translate(-5px, 2px); clip-path: inset(5% 0 70% 0); }
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 44px 0 0; width: min(780px, 100%); }
.stat {
  display: flex; flex-direction: column-reverse; gap: 2px; padding: 16px 12px; border-radius: var(--radius-sm);
  background: rgba(10, 13, 26, .55); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.stat dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.1; color: var(--text); }
.stat dt { color: var(--text-3); font-size: .85rem; }

.ticker {
  position: absolute; bottom: 0; inset-inline: 0; overflow: hidden; padding-block: 15px;
  border-block: 1px solid var(--line); background: rgba(5, 6, 13, .6); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; align-items: center; gap: 34px; width: max-content; direction: ltr; animation: marquee 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .06em; color: var(--text-2); text-transform: uppercase; white-space: nowrap; }
.ticker-track i { font-style: normal; color: var(--accent); font-size: .8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── الأقسام ─────────────────────────────────────────────────────────────────────── */
main, .footer { position: relative; z-index: 2; }
.sec { padding-block: clamp(76px, 10vw, 130px); position: relative; }
.sec-glow::before {
  content: ''; position: absolute; inset: 10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(700px 380px at 50% 30%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.sec-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.sec-head p { color: var(--text-2); margin-top: 12px; font-size: 1.05rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .38em; color: var(--accent); direction: ltr;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.eyebrow::after { transform: scaleX(-1); }

.card {
  position: relative; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 20, 42, .75), rgba(10, 13, 26, .75));
  border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin-bottom: 20px; }
.card-title .ic { color: var(--accent); width: 1.3em; height: 1.3em; }
.empty { color: var(--text-3); text-align: center; padding: 20px 8px; }
.empty.err { color: var(--red); }
.note { text-align: center; color: var(--text-3); margin-top: 22px; font-size: .92rem; }

/* ── زر مقسَّم (فروع / تبويبات) ──────────────────────────────────────────────────── */
.seg {
  position: relative; display: flex; width: max-content; max-width: 100%; margin: 0 auto; padding: 5px; gap: 2px;
  border-radius: 999px; background: rgba(10, 13, 26, .7); border: 1px solid var(--line-2);
  overflow-x: auto; scrollbar-width: none; backdrop-filter: blur(10px);
}
.seg::-webkit-scrollbar { display: none; }
.seg-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; z-index: 0;
  background: var(--c, var(--accent)); box-shadow: 0 6px 26px -6px var(--c, var(--accent));
  transition: transform .5s var(--ease), width .5s var(--ease), background .5s, box-shadow .5s;
}
.seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  padding: .62em 1.35em; border-radius: 999px; color: var(--text-2);
  font-family: var(--font-display); font-weight: 700; white-space: nowrap; transition: color .35s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { color: #04050b; }
.seg .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); transition: background .3s; }
.seg button[aria-selected="true"] .dot, .seg button[aria-checked="true"] .dot { background: #04050b; box-shadow: none; }
.seg-sm { margin: 0; }
.seg-sm button { padding: .48em 1.1em; font-size: .92rem; }

/* ── عروض الوقت ──────────────────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; max-width: 940px; margin: 40px auto 0; perspective: 1000px; }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; transform-style: preserve-3d; }
.tilt::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c, var(--accent)) 16%, transparent), transparent 60%);
}
.tilt:hover::after { opacity: 1; }
.tier {
  position: relative; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 25, 50, .8), rgba(10, 13, 26, .85));
  border: 1px solid var(--line);
}
.tier:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tier-vip {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(24, 20, 48, .95), rgba(12, 10, 28, .95)) padding-box,
    linear-gradient(135deg, var(--amber), var(--pink) 45%, var(--violet)) border-box;
  box-shadow: 0 30px 80px -40px rgba(244, 114, 182, .55);
}
.tier-vip:hover { border-color: transparent; }
.tier-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tier-head h3 { font-size: 1.45rem; }
.tier-head p { color: var(--text-3); font-size: .92rem; }
.tier-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tier-ic .ic { width: 26px; height: 26px; }
.tier-vip .tier-ic { background: rgba(251, 191, 36, .12); color: var(--amber); }
.tier-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tier-rows li {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
}
.hrs { color: var(--text-2); font-weight: 500; }
.hrs b { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); margin-inline-end: 4px; }
.price { display: flex; align-items: baseline; gap: 6px; grid-row: span 2; }
.price b { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 4vw, 2.6rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.tier-vip .price b { background: linear-gradient(120deg, var(--amber), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price small { color: var(--text-3); }
.per { color: var(--text-3); font-size: .82rem; }
.badge {
  position: absolute; top: -10px; inset-inline-start: 14px; font-style: normal; font-size: .72rem; font-weight: 700;
  padding: .2em .8em; border-radius: 999px; color: #04050b; background: linear-gradient(120deg, var(--amber), var(--pink));
  box-shadow: 0 6px 18px -6px var(--pink);
}
.points { margin-top: 40px; text-align: center; }
.points h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; color: var(--text-2); }
.points h3 .ic { color: var(--amber); }
.points-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 14px; }
.point { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 16px; border: 1px dashed var(--line-2); background: rgba(251, 191, 36, .04); }
.point b { font-family: var(--font-display); font-size: 1.5rem; color: var(--amber); }
.point .ic-arrow { color: var(--text-3); }

/* ── خدماتنا ─────────────────────────────────────────────────────────────────────── */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 18px; }
.service { position: relative; padding: 26px 22px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(16, 20, 42, .7), rgba(10, 13, 26, .7)); border: 1px solid var(--line); }
.service:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.service-ic {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; margin-bottom: 18px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.service:hover .service-ic { transform: translateY(-4px) rotate(-6deg); box-shadow: inset 0 0 0 1px var(--accent), 0 12px 30px -10px var(--accent); }
.service-ic .ic { width: 26px; height: 26px; }
.service h3 { font-size: 1.15rem; margin-bottom: 6px; }
.service p { color: var(--text-2); font-size: .94rem; }

/* ── شحن الألعاب ─────────────────────────────────────────────────────────────────── */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 14px; margin-top: 34px; }
.pack {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 12px 16px;
  border-radius: 18px; background: linear-gradient(180deg, rgba(16, 20, 42, .7), rgba(10, 13, 26, .7)); border: 1px solid var(--line);
  animation: packIn .5s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms);
}
.pack:hover, .pack[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 14px 40px -18px var(--c); }
.pack[aria-pressed="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(10, 13, 26, .8)); }
.pack-amt { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; direction: ltr; }
.pack-unit { font-family: var(--font-display); font-size: .8rem; letter-spacing: .2em; color: var(--c); }
.pack-price { margin-top: 10px; padding: .25em .9em; border-radius: 999px; background: var(--surface-2); font-weight: 700; }
.pack-price small { color: var(--text-3); font-weight: 400; }
.pack-hint { grid-column: 1 / -1; text-align: center; color: var(--text-2); margin-top: 6px; min-height: 1.8em; }
.pack-hint b { color: var(--c); }
@keyframes packIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ── طلب لعبة ────────────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0 auto 32px; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.steps b { font-family: var(--font-display); }
.steps p { color: var(--text-3); font-size: .9rem; }
.step-n {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 800; color: #04050b;
  background: linear-gradient(135deg, var(--accent), var(--violet));
}
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }

/* ── النماذج ─────────────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form .card-title { margin-bottom: 2px; }
.form-wide { max-width: 860px; margin: 32px auto 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field small { color: var(--text-3); font-weight: 400; font-size: .82rem; }
.req-mark { color: var(--pink); }
.counter { float: inline-end; font-variant-numeric: tabular-nums; }
input, textarea, select {
  width: 100%; padding: .78em 1em; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(5, 6, 13, .55); color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: 18px 55%, 12px 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-end: 2.4em; }
select option { background: var(--bg-2); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .25); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: rgba(5, 6, 13, .8); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); box-shadow: 0 0 0 4px rgba(248, 113, 113, .15); animation: shake .4s; }
.hp { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .42em .95em; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text-2); font-size: .9rem; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip[aria-checked="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 18px -6px var(--accent); }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; min-width: 0; }
.privacy { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: .9rem; }
.privacy .ic { color: var(--green); }

.result:empty { display: none; }
.ok-box {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .35); animation: pop .45s var(--ease);
}
.ok-box > .ic { color: var(--green); width: 26px; height: 26px; margin-top: 2px; }
.ok-box b { font-family: var(--font-display); font-size: 1.1rem; }
.ok-box p { color: var(--text-2); margin-top: 2px; }
.cmp-id-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.cmp-id { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; direction: ltr; padding: .3em .7em; border-radius: 10px; background: rgba(5, 6, 13, .6); border: 1px dashed var(--line-2); color: var(--text); }
.ok-box-big .cmp-id { font-size: 1.35rem; color: var(--green); }

/* متابعة طلبات الألعاب */
.track-list { display: grid; gap: 10px; margin-top: 16px; max-height: 460px; overflow-y: auto; padding-inline-end: 4px; }
.req { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); animation: pop .35s var(--ease) both; }
.req-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.req-top b { font-family: var(--font-display); font-size: 1.05rem; }
.req-meta { color: var(--text-3); font-size: .82rem; margin-top: 2px; }
.req-reply { display: flex; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(5, 6, 13, .5); color: var(--text-2); font-size: .92rem; }
.req-reply .ic { color: var(--accent); margin-top: 4px; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: .2em .8em; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pending { color: var(--amber); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.pill-reviewing { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pill-done { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.pill-rejected { color: var(--red); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .08); }
.pill-reviewing::before { animation: pulse 1.6s infinite; }
.skeleton { height: 64px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton + .skeleton { margin-top: 10px; }
.skeleton-lg { height: 140px; }

/* ── الشكاوى ─────────────────────────────────────────────────────────────────────── */
.saved { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: .88rem; }
.saved:empty { display: none; }
.saved .chip { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
#cmpTrackRes { margin-top: 18px; }
.cmp-detail { display: grid; gap: 14px; animation: pop .4s var(--ease); }
.cmp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bubble { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-result { padding: 16px 18px; border-radius: var(--radius-sm); background: rgba(52, 211, 153, .07); border: 1px solid rgba(52, 211, 153, .3); }
.admin-result b { display: flex; align-items: center; gap: 6px; color: var(--green); font-family: var(--font-display); }
.admin-result p { margin-top: 6px; white-space: pre-wrap; }
.cmp-detail h4 { font-size: 1.05rem; margin-top: 8px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.thread li { max-width: 86%; padding: 12px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.thread li p { white-space: pre-wrap; }
.thread .mine { justify-self: start; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-start-start-radius: 4px; }
.thread .staff { justify-self: end; background: rgba(52, 211, 153, .07); border: 1px solid rgba(52, 211, 153, .28); border-start-end-radius: 4px; }
.thread .who { display: block; font-size: .8rem; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.thread time { display: block; font-size: .75rem; color: var(--text-3); margin-top: 6px; }
.cmp-comment { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.cmp-comment .btn { justify-self: start; }

/* ── فروعنا ──────────────────────────────────────────────────────────────────────── */
.branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; max-width: 940px; margin-inline: auto; }
.branch { position: relative; overflow: hidden; padding: 30px 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(16, 20, 42, .8), rgba(10, 13, 26, .85)); border: 1px solid var(--line); }
.branch:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.branch-glow { position: absolute; width: 260px; height: 260px; top: -130px; inset-inline-end: -80px; border-radius: 50%; background: var(--c); filter: blur(90px); opacity: .28; pointer-events: none; }
.branch-label { color: var(--c); font-weight: 600; font-size: .9rem; }
.branch-name { font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: .05em; direction: ltr; text-align: right; line-height: 1.1; margin-top: 4px; }
.branch-from { color: var(--text-2); margin-top: 6px; }
.branch-from b { font-family: var(--font-display); font-size: 1.3rem; color: var(--c); }
.branch-info { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--text-2); }
.branch-info li { display: flex; align-items: center; gap: 10px; }
.branch-info .ic { color: var(--c); }
.branch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.branch .btn-ghost:hover { border-color: var(--c); }

/* ── الأسئلة ─────────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; }
.qa { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.qa[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--surface-2); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.02rem; }
.qa summary::-webkit-details-marker { display: none; }
.chev { flex: none; width: 12px; height: 12px; border-inline-end: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform .3s var(--ease); margin-top: -4px; }
.qa[open] .chev { transform: rotate(225deg); margin-top: 4px; }
.qa-a { padding: 0 20px 18px; color: var(--text-2); }
.qa[open] .qa-a { animation: pop .35s var(--ease); }

/* ── التذييل ─────────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: rgba(5, 6, 13, .7); margin-top: 40px; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-block: 44px 28px; }
.footer-brand p { color: var(--text-3); margin-top: 6px; max-width: 340px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text-2); transition: all .25s; }
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: start; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 18px 26px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .85rem; }
.credit { direction: ltr; }
.credit a { color: var(--text-2); }
.credit a:hover { color: var(--accent); }

/* ── عناصر عائمة ─────────────────────────────────────────────────────────────────── */
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; z-index: 1; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%);
  opacity: 0; transition: opacity .6s;
}
.cursor-glow.on { opacity: 1; }
.wa-float {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 40; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; color: #fff; background: #22c55e;
  box-shadow: 0 12px 30px -8px rgba(34, 197, 94, .7); transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .ic { width: 28px; height: 28px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  padding: 12px 18px; border-radius: 14px; background: rgba(16, 20, 42, .95); border: 1px solid var(--line-2);
  backdrop-filter: blur(12px); box-shadow: 0 20px 40px -20px #000; text-align: center; font-weight: 500;
  opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease);
}
.toast.in { opacity: 1; transform: none; }
.toast-error { border-color: rgba(248, 113, 113, .5); color: #fecaca; }
.toast-ok { border-color: rgba(52, 211, 153, .5); color: #bbf7d0; }
.burst { position: fixed; z-index: 95; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 13px; border-radius: 2px; animation: confetti 1.15s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  65% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 1.15), calc(var(--y) + 150px)) rotate(calc(var(--r) * 1.6)); opacity: 0; }
}

/* ── الظهور عند التمرير (يعمل فقط مع JavaScript) ─────────────────────────────────── */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s ease, translate .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ── حركات مشتركة ────────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ── الشاشات المتوسطة والصغيرة ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .burger { display: flex; }
  .nav-links {
    position: fixed; top: calc(var(--nav-h) - 4px); inset-inline: 12px; flex-direction: column; gap: 4px; padding: 12px;
    border-radius: 20px; background: rgba(10, 13, 26, .96); border: 1px solid var(--line-2); backdrop-filter: blur(16px);
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
  }
  .nav-links a { padding: .8em 1em; font-size: 1.05rem; }
  .menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .menu-open .nav { background: rgba(5, 6, 13, .92); }
  .nav-in > .btn-staff { margin-inline-start: auto; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 34px; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-bottom: 100px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .tier-rows li { padding: 14px; }
  .thread li { max-width: 100%; }
  .footer-in { flex-direction: column; }
}
@media (max-width: 350px) {
  .nav-in { gap: 10px; }
  .btn-staff span { display: none; }
  .btn-staff { padding: .7em; }
  .logo-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker-track { animation: none; }
  .glitch::before, .glitch::after { display: none; }
}
