/* سيادة — الموقع العام. ألوان مطابقة للعبة. */
:root {
  --bg: #0B1220;
  --bg-2: #0E1628;
  --panel: #111A2B;
  --panel-2: #16223A;
  --line: #22314F;
  --line-2: #2C3E62;
  --text: #E8EDF6;
  --dim: #A7B3C9;
  --mute: #7C8AA5;
  --gold: #F59E0B;
  --gold-2: #FBBF24;
  --gold-ink: #1A1205;
  --teal: #14B8A6;
  --teal-2: #2DD4BF;
  --red: #F87171;
  --silver: #CBD5E1;
  --bronze: #D08A55;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --wrap: 1120px;
  --font: "Cairo", "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 85% -10%, rgba(245, 158, 11, .10), transparent 60%),
    radial-gradient(800px 500px at 0% 10%, rgba(20, 184, 166, .08), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.85;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 4.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.4em; }
li { margin-bottom: .35em; }
strong, b { color: #fff; font-weight: 700; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 10px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 1.3rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { background: linear-gradient(180deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 2px 4px; flex-wrap: wrap; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--dim); font-weight: 600; font-size: .95rem; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--gold-2); background: rgba(245, 158, 11, .10); }
.nav .nav-dl { background: var(--gold); color: var(--gold-ink); font-weight: 800; margin-inline-start: 6px; }
.nav .nav-dl:hover { background: var(--gold-2); color: var(--gold-ink); }
.site-header .header-dl { display: none; padding: 6px 16px; min-height: 40px; font-size: .95rem; border-radius: 10px; }
@media (max-width: 640px) {
  .site-header .wrap { justify-content: space-between; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { padding: 4px 8px; font-size: .9rem; }
  .nav .nav-dl { display: none; }
  .site-header .header-dl { display: inline-flex; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border-radius: 14px; border: 1px solid transparent;
  font-family: inherit; font-size: 1.05rem; font-weight: 800; line-height: 1.3;
  cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 8px 24px rgba(245, 158, 11, .28); }
.btn-gold:hover { box-shadow: 0 10px 30px rgba(245, 158, 11, .4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-2); }
.btn-lg { min-height: 60px; font-size: 1.18rem; padding: 14px 30px; }

/* ---------- hero ---------- */
.hero { padding: 44px 0 30px; text-align: center; }
.hero-emblem { width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 26px; box-shadow: 0 0 0 1px rgba(245, 158, 11, .25), 0 18px 50px rgba(245, 158, 11, .18); }
.hero h1 {
  font-size: clamp(3.4rem, 16vw, 6rem); font-weight: 900; line-height: 1.1; margin: 0 0 8px;
  background: linear-gradient(180deg, #FDE68A 0%, var(--gold-2) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 6px 40px rgba(245, 158, 11, .15);
}
.hero .pitch { font-size: clamp(1.12rem, 3.8vw, 1.45rem); font-weight: 700; color: var(--text); max-width: 760px; margin: 0 auto 10px; line-height: 1.75; }
.hero .pitch em { font-style: normal; color: var(--gold-2); }
.hero .sub { color: var(--dim); max-width: 640px; margin: 0 auto 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { color: var(--mute); font-size: .88rem; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-size: .92rem; font-weight: 600; }
.chips b { color: var(--gold-2); }

/* ---------- sections ---------- */
.section { padding: 34px 0; }
.section-head { margin-bottom: 18px; }
.section-head p { color: var(--dim); margin: 0; }
.eyebrow { display: inline-block; color: var(--teal-2); font-weight: 700; font-size: .9rem; letter-spacing: .02em; margin-bottom: 4px; }

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-gold { border-color: rgba(245, 158, 11, .35); }

/* ---------- live round ---------- */
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(20, 184, 166, .6); animation: pulse 2s infinite; vertical-align: middle; margin-inline-end: 6px; }
.live-dot.off { background: var(--mute); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .55); } 70% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); } }
.round-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.round-top h3 { margin: 0; font-size: 1.25rem; }
.round-phase { color: var(--teal-2); font-weight: 700; font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.stat .k { color: var(--mute); font-size: .85rem; font-weight: 600; display: block; }
.stat .v { color: var(--text); font-size: 1.3rem; font-weight: 800; display: block; line-height: 1.5; overflow-wrap: anywhere; }
.stat .v small { color: var(--dim); font-size: .85rem; font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin: 4px 0 16px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 99px; transition: width .6s ease; }
.board-title { font-size: 1rem; color: var(--dim); margin: 0 0 8px; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.board .pos { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--panel-2); color: var(--dim); }
.board li:nth-child(1) .pos { background: var(--gold); color: var(--gold-ink); }
.board li:nth-child(2) .pos { background: var(--silver); color: #1E293B; }
.board li:nth-child(3) .pos { background: var(--bronze); color: #2A1608; }
.board .who { min-width: 0; line-height: 1.5; }
.board .who b { display: block; overflow-wrap: anywhere; }
.board .who small { color: var(--dim); font-size: .85rem; overflow-wrap: anywhere; }
.board .pts { font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.board .pts small { color: var(--mute); font-weight: 600; font-size: .78rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 8px; border-radius: 99px; margin-inline-start: 6px; vertical-align: middle; line-height: 1.7; }
.tag-gold { background: rgba(245, 158, 11, .15); color: var(--gold-2); }
.tag-mute { background: rgba(124, 138, 165, .18); color: var(--dim); }
.empty { color: var(--dim); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 14px; text-align: center; margin: 0; }

/* ---------- prizes ---------- */
.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; counter-reset: prize; }
.prize-grid li { counter-increment: prize; margin: 0; display: flex; gap: 12px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; overflow-wrap: anywhere; }
.prize-grid li::before { content: counter(prize); flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--panel-2); color: var(--dim); border: 1px solid var(--line-2); }
.prize-grid li:nth-child(1) { border-color: rgba(245, 158, 11, .5); }
.prize-grid li:nth-child(1)::before { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.prize-grid li:nth-child(2)::before { background: var(--silver); color: #1E293B; border-color: transparent; }
.prize-grid li:nth-child(3)::before { background: var(--bronze); color: #2A1608; border-color: transparent; }
.prize-body { white-space: pre-line; color: var(--dim); }

/* ---------- champions ---------- */
.champs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.champ-round h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.champ-round h3 small { color: var(--mute); font-weight: 600; font-size: .85rem; }
.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.podium li { margin: 0; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.medal { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #1E293B; background: var(--panel-2); }
.medal.gold { background: radial-gradient(circle at 35% 30%, #FDE68A, var(--gold)); color: var(--gold-ink); }
.medal.silver { background: radial-gradient(circle at 35% 30%, #F1F5F9, #94A3B8); }
.medal.bronze { background: radial-gradient(circle at 35% 30%, #F5C9A0, #B4693A); color: #2A1608; }
.medal.laurel { background: rgba(20, 184, 166, .2); color: var(--teal-2); }
.podium .who { min-width: 0; line-height: 1.55; }
.podium .who b { overflow-wrap: anywhere; }
.podium .who small { display: block; color: var(--dim); font-size: .85rem; overflow-wrap: anywhere; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .2s ease, transform .2s ease; min-width: 0; }
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; background: rgba(245, 158, 11, .12); color: var(--gold-2); }
.feature:nth-child(even) .ic { background: rgba(20, 184, 166, .12); color: var(--teal-2); }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 6px; font-size: 1.08rem; }
.feature p { color: var(--dim); margin: 0; font-size: .97rem; line-height: 1.8; }

/* ---------- link cards / CTA ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.link-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); }
.link-card:hover { text-decoration: none; border-color: var(--teal); }
.link-card b { display: block; font-size: 1.08rem; margin-bottom: 4px; }
.link-card span { color: var(--dim); font-size: .95rem; }
.cta { text-align: center; padding: 30px 20px; }
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--dim); }

/* ---------- article pages ---------- */
.page-hero { padding: 36px 0 10px; }
.page-hero h1 { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 900; color: var(--gold-2); margin-bottom: 6px; }
.page-hero p { color: var(--dim); max-width: 720px; }
.layout { display: grid; gap: 22px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 960px) { .layout { grid-template-columns: 250px 1fr; align-items: start; } .toc { position: sticky; top: 84px; } }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.toc b { display: block; color: var(--dim); font-size: .9rem; margin-bottom: 6px; }
.toc ol { margin: 0; padding-inline-start: 1.2em; }
.toc li { margin: 0 0 2px; font-size: .95rem; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--teal-2); }
.article { min-width: 0; }
.article section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin-bottom: 16px; }
.article section > h2 { font-size: clamp(1.3rem, 4.2vw, 1.6rem); color: var(--text); display: flex; gap: 10px; align-items: center; }
.article section > h2 .num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(245, 158, 11, .14); color: var(--gold-2); font-size: 1rem; }
.article h3 { color: var(--teal-2); margin-top: 1.1em; }
.article p, .article li { color: #D3DBEA; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 46px; margin-bottom: 14px; min-height: 34px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #04201C; font-weight: 800; font-size: .95rem; }
.note { border-inline-start: 4px solid var(--gold); background: rgba(245, 158, 11, .07); padding: 12px 14px; border-radius: 8px; margin: 12px 0; color: #E9E2CF; }
.note.teal { border-color: var(--teal); background: rgba(20, 184, 166, .07); color: #CFE9E5; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); color: var(--dim); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.n { white-space: nowrap; font-weight: 700; color: var(--gold-2); direction: ltr; text-align: right; }
td.n.neg { color: var(--red); }
.updated { color: var(--mute); font-size: .92rem; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding-block: 70px 60px; }
.lost h1 { font-size: clamp(1.5rem, 6.5vw, 2.2rem); }
.lost .code { font-size: clamp(4.5rem, 22vw, 8rem); font-weight: 900; line-height: 1; color: var(--gold); opacity: .9; }
.lost p { color: var(--dim); max-width: 520px; margin: 10px auto 24px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 20px; padding: 28px 0 22px; color: var(--dim); font-size: .95rem; }
.footer-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.site-footer h4 { color: var(--text); font-size: 1rem; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 4px; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--teal-2); }
.tg-link { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-2) !important; font-weight: 700; }
.tg-link svg { width: 20px; height: 20px; }
.copy { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: .85rem; color: var(--mute); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }

@media (max-width: 480px) {
  .panel { padding: 16px; }
  .article section { padding: 18px 16px; }
  .stat { padding: 10px 12px; }
  .stat .v { font-size: 1.15rem; }
}
