@font-face {
  font-family: "Tajawal";
  src: url("/assets/Tajawal-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #071525;
  --navy: #0e2038;
  --navy-soft: #162b47;
  --cream: #fff5df;
  --muted: #aab9cb;
  --gold: #f5c463;
  --gold-deep: #bc792d;
  --green: #28c486;
  --red: #f26b72;
  --line: rgba(245, 196, 99, 0.2);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: "Tajawal", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 21, 37, 0.88); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.18rem; }
.brand img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 8px 24px rgba(245,196,99,.2); }
.nav-links { display: flex; align-items: center; gap: 24px; color: #d8e1ec; }
.nav-links a:hover { color: var(--gold); }
.lang-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: transparent; color: var(--cream); cursor: pointer; font: inherit; }
.hero { position: relative; overflow: hidden; padding: 70px 0 84px; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: rgba(40,196,134,.12); filter: blur(40px); inset: -240px auto auto -100px; }
.hero-grid { position: relative; display: grid; grid-template-columns: .78fr 1.22fr; gap: 44px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(3.2rem, 8vw, 6.8rem); line-height: .92; margin: 16px 0 22px; letter-spacing: -.04em; }
.hero-copy { max-width: 590px; color: #c7d2df; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 22px; border-radius: 16px; font-weight: 800; line-height: 1.15; text-align: center; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: #40280e; box-shadow: 0 16px 36px rgba(245,196,99,.18); }
.button-secondary { background: var(--navy); }
.hero-art { position: relative; min-width: 0; }
.hero-art::after { content: ""; position: absolute; inset: 12% 4% -8%; background: linear-gradient(130deg, var(--gold), var(--green)); filter: blur(70px); opacity: .2; z-index: -1; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: center; border-radius: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.section { padding: 84px 0; }
.section-kicker { color: var(--green); font-weight: 800; }
.section h2 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 8px 0 12px; line-height: 1.1; }
.section-lead { color: var(--muted); max-width: 670px; font-size: 1.1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.feature { padding: 28px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(22,43,71,.9), rgba(10,27,47,.9)); border-radius: 22px; }
.feature strong { display: block; font-size: 1.25rem; margin: 14px 0 8px; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon { font-size: 2rem; }
.rank-preview { display: grid; grid-template-columns: .8fr 1.2fr; gap: 38px; align-items: center; }
.rank-card { border-radius: 28px; border: 1px solid var(--line); background: #0c1d33; box-shadow: var(--shadow); padding: 18px; }
.rank-row { display: grid; grid-template-columns: 42px 48px 1fr auto; gap: 12px; align-items: center; padding: 13px 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.rank-row:last-child { border: 0; }
.rank-avatar { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; background: var(--navy-soft); }
.rank-points { color: var(--gold); font-weight: 800; }
.cta { padding: 40px; border-radius: 30px; background: linear-gradient(120deg, #1b513f, #163657 60%, #6b4820); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.cta h2 { margin: 0; }
.site-footer { padding: 34px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.page-hero { padding: 66px 0 34px; }
.page-hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
.leaderboard-panel, .legal-card { border: 1px solid var(--line); background: var(--navy); border-radius: 28px; box-shadow: var(--shadow); }
.leaderboard-panel { overflow: hidden; }
.leaderboard-head, .leaderboard-entry { display: grid; grid-template-columns: 70px 64px minmax(0,1fr) 90px 120px; gap: 14px; align-items: center; padding: 16px 22px; }
.leaderboard-head { color: var(--muted); background: rgba(255,255,255,.035); font-size: .9rem; }
.leaderboard-entry { border-top: 1px solid rgba(255,255,255,.065); }
.leaderboard-entry:nth-child(2) { background: rgba(245,196,99,.07); }
.leaderboard-entry .rank-avatar { width: 52px; height: 52px; }
.player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.country { color: var(--muted); }
.empty-state { padding: 52px 24px; text-align: center; color: var(--muted); }
.legal-card { padding: clamp(24px, 5vw, 58px); max-width: 900px; }
.legal-card h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
.legal-card h2 { margin-top: 34px; color: var(--gold); }
.legal-card p, .legal-card li { color: #c8d3df; }
.legal-card a { color: var(--gold); text-decoration: underline; }
.legal-card section + section { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 28px; }
[data-ar] { display: none; }
html[lang="ar"] [data-en] { display: none; }
html[lang="ar"] [data-ar] { display: revert; }
html[lang="ar"] body { direction: rtl; }
html[lang="ar"] .button[data-ar] { display: inline-flex; padding-top: 4px; padding-bottom: 0; }
@media (max-width: 820px) {
  .nav-links a:not(.keep-mobile) { display: none; }
  .hero { padding-top: 42px; }
  .hero-grid, .rank-preview { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { border-radius: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta { align-items: stretch; flex-direction: column; }
  h1 { font-size: clamp(3rem, 16vw, 5.2rem); }
  .leaderboard-head { display: none; }
  .leaderboard-entry { grid-template-columns: 42px 52px minmax(0,1fr) auto; padding: 14px 12px; }
  .leaderboard-entry .record { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
