/* Over Play site: the app's graphite + turquoise palette (constants/app-theme.ts). */
:root {
  --bg: #0E1011;
  --surface: #191C1E;
  --surface-raised: #212527;
  --border: #2C3134;
  --text: #F5F7F7;
  --text-soft: #C3CACB;
  --accent: #40E0D0;
  --accent-strong: #00968B;
  --accent-soft: #143331;
  --gold: #F1B958;
  --danger: #F07A7A;
  --radius: 18px;
  --font: "Segoe UI", "SF Arabic", "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F5F7F7;
    --surface: #FFFFFF;
    --surface-raised: #ECF0F1;
    --border: #DCE2E3;
    --text: #161A1C;
    --text-soft: #4A5457;
    --accent: #0B7F75;
    --accent-strong: #08695F;
    --accent-soft: #DDF3F0;
    --gold: #A66F12;
    --danger: #B42318;
    color-scheme: light;
  }
}

/* One language at a time once lang.js has run; both stay visible without it. */
html[data-active-lang="ar"] [data-lang="en"],
html[data-active-lang="en"] [data-lang="ar"] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

[lang="en"] {
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 780px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  margin-inline-end: auto;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-raised);
}

.lang-switch {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  min-height: 36px;
  cursor: pointer;
}

.lang-switch:hover {
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }
}

/* Main content */
main {
  flex: 1;
  padding: 40px 0 64px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0;
}

h1 {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.doc h2 {
  scroll-margin-top: 80px;
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 8px;
  padding-top: 8px;
}

.doc h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 4px;
}

.doc p,
.doc ul,
.doc ol {
  margin: 10px 0;
  color: var(--text-soft);
}

.doc strong {
  color: var(--text);
}

.doc ul,
.doc ol {
  padding-inline-start: 22px;
}

.doc li {
  margin: 6px 0;
}

.doc-meta {
  color: var(--text-soft);
  font-size: 15px;
  margin-top: 8px;
}

.lead {
  font-size: 19px;
  color: var(--text-soft);
  margin-top: 14px;
}

.note {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
}

.note p {
  margin: 4px 0;
  color: var(--text);
}

.toc {
  margin: 24px 0 8px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.toc ol {
  margin: 6px 0 0;
  columns: 2 260px;
  column-gap: 24px;
}

.toc a {
  text-decoration: none;
}

.table-scroll {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 700;
}

td {
  color: var(--text-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
}

.steps li {
  position: relative;
  padding-inline-start: 46px;
  margin: 14px 0;
  min-height: 34px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0E1011;
  font-weight: 800;
  font-size: 15px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  color: #0E1011;
  border: 1px solid transparent;
}

.button:hover {
  color: #0E1011;
  background: color-mix(in srgb, var(--accent) 85%, white);
}

.button.secondary {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.button[aria-disabled="true"] {
  cursor: default;
}

/* Home */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding: 24px 0 8px;
}

.hero-icon {
  width: 220px;
  height: 220px;
  border-radius: 48px;
  box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--accent) 45%, transparent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .hero-icon {
    order: -1;
    margin: 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 34px;
  }

  .hero-actions {
    justify-content: center;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h2,
.card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.games {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.games li {
  font-size: 14px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.link-grid a {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.link-grid a:hover {
  border-color: var(--accent);
}

.section-title {
  font-size: 22px;
  margin-top: 56px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 14px;
  padding: 28px 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
