/* ==========================================================================
   Quizy Games — الموقع الرسمي
   ثيم داكن/ذهبي مطابق للتطبيق، اتجاه RTL
   ========================================================================== */

:root {
  --bg:            #0A0A0F;
  --bg-elevated:   #12121A;
  --surface:       #16161F;
  --surface-2:     #1C1C27;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent:        #E8B84B;
  --accent-2:      #FBBF24;
  --accent-soft:   rgba(232, 184, 75, 0.10);
  --accent-border: rgba(232, 184, 75, 0.30);

  --text:          #F5F5F7;
  --text-2:        #B4B4C4;
  --text-muted:    #7C7C8C;

  --success:       #34D399;
  --danger:        #F87171;

  --radius:        18px;
  --radius-sm:     12px;
  --maxw:          860px;
  --shadow:        0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ============================ تبديل اللغة AR/EN ========================= */
:root[data-lang="ar"] .en { display: none !important; }
:root[data-lang="en"] .ar { display: none !important; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.lang-toggle:hover { background: var(--accent-soft); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Tajawal", "Segoe UI", "Noto Kufi Arabic", system-ui, -apple-system, sans-serif;
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* خلفية إشعاعية ذهبية خفيفة */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(760px 460px at 85% -8%, rgba(232, 184, 75, 0.10), transparent 60%),
    radial-gradient(680px 420px at 0% 0%, rgba(120, 90, 255, 0.06), transparent 55%);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================ الهيدر / التنقل ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--text);
  font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--accent-border);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

/* ================================= الهيرو ================================ */
.hero {
  text-align: center;
  padding: 70px 0 46px;
}
.hero .logo-badge {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff, #cfcfe0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--text-2);
  font-size: clamp(15px, 2.6vw, 18px);
  max-width: 620px;
  margin: 0 auto;
}

/* ================================= الأزرار ============================== */
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1A1200;
  box-shadow: 0 10px 26px rgba(232, 184, 75, 0.28);
}
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ================================= الأقسام ============================== */
section { padding: 26px 0; }

.section-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin: 0 0 8px;
}
.section-sub {
  color: var(--text-2);
  margin: 0 0 26px;
  font-size: 15px;
}

/* شبكة البطاقات */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}
.card .ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; }

/* رقاقات الأقسام */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* ============================ صفحات المستندات =========================== */
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 46px);
  margin: 34px 0;
  box-shadow: var(--shadow);
}
.doc h1 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 6px; font-weight: 800; }
.doc .updated { color: var(--text-muted); font-size: 13px; margin: 0 0 28px; }
.doc h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--accent);
}
.doc h2:first-of-type { border-top: none; padding-top: 0; }
.doc h3 { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.doc p, .doc li { color: var(--text-2); font-size: 15.5px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); }
.doc a { font-weight: 700; }

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
  color: var(--text);
  font-size: 14.5px;
}
.callout strong { color: var(--accent); }

.email-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  margin-top: 8px;
  direction: ltr;
}

/* خطوات مرقّمة */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 22px 0; }
.steps li {
  position: relative;
  padding: 16px 60px 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  color: var(--text-2);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1A1200;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================= الفوتر ============================== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 40px 0 60px;
  background: rgba(0, 0, 0, 0.25);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.footer-links a { color: var(--text-2); font-size: 14px; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .nav { height: auto; padding: 12px 0; flex-direction: column; gap: 10px; }
  .nav-links { justify-content: center; }
}
