/* ================================================================
   TableEx / BlindGamers — Stylesheet
   Design system: dark, accessible, professional
   ================================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #0b1020;
  --bg-elev: #131933;
  --bg-elev-2: #1a2148;
  --surface: #161c39;
  --surface-2: #1f2750;
  --border: #283366;
  --border-strong: #3a4a8a;

  --text: #e7ecff;
  --text-muted: #9aa3c7;
  --text-dim: #6b73a0;

  --primary: #6366f1;
  --primary-hover: #7c7fff;
  --primary-glow: rgba(99,102,241,0.45);
  --accent: #22d3ee;
  --accent-2: #f472b6;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 8px 24px rgba(8,12,30,0.5);
  --shadow-lg: 0 18px 60px rgba(8,12,30,0.55);

  --font-en: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', 'Inter', system-ui, sans-serif;

  --container: 1200px;
  --container-narrow: 820px;

  --header-h: 70px;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(34,211,238,0.1) 100%);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.18), transparent),
    radial-gradient(900px 500px at 100% 0%, rgba(34,211,238,0.10), transparent);
  background-attachment: fixed;
  min-height: 100vh;
}
body.rtl { font-family: var(--font-ar); }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
h1,h2,h3,h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 1em; }

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--primary); color: white;
  padding: .5rem 1rem; z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); }

.section { padding: 80px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(99,102,241,0.04) 50%, transparent); }
.section-head { margin-bottom: 48px; }
.section-head--center { text-align: center; }
.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: inline-block;
}
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.section-subtitle { font-size: 1.4rem; margin: 56px 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,16,32,0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 1.15rem; color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  object-fit: cover;
  background: var(--gradient-primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800;
  box-shadow: 0 6px 18px var(--primary-glow);
}
.brand-logo--text { font-size: 1rem; letter-spacing: -.02em; }

.site-nav {
  display: flex; align-items: center; gap: 24px; flex: 1;
  justify-content: flex-end;
}
.nav-list { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-list a {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500; color: var(--text-muted);
  transition: background .2s, color .2s;
  display: inline-block;
}
.nav-list a:hover { background: var(--surface); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; }
.lang-btn {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 10px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .2s, transform .1s;
}
.lang-btn:hover { border-color: var(--primary); }
.lang-btn:active { transform: scale(0.97); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  width: 44px; height: 44px; border-radius: 10px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: rgba(11,16,32,0.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-list a { padding: 14px 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 100px;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .6;
  animation: float 12s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: #6366f1; top: -120px; left: -120px; }
.orb-2 { width: 360px; height: 360px; background: #22d3ee; bottom: -120px; right: -100px; animation-delay: -4s; }
.orb-3 { width: 280px; height: 280px; background: #ec4899; top: 40%; left: 40%; opacity: .35; animation-delay: -8s; }
@keyframes float {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(30px,-40px); }
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: 60px;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.35);
  color: var(--accent); font-weight: 600; font-size: .85rem;
  margin-bottom: 20px;
}
.hero-brand {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800; letter-spacing: -.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
  line-height: 1;
}
.hero-tagline {
  font-size: 1.2rem; color: var(--text); font-weight: 500; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 1.05rem; color: var(--text-muted); max-width: 560px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Online stat card */
.hero-stats { display: flex; justify-content: center; }
.stat-card {
  position: relative;
  width: 100%; max-width: 360px;
  background: linear-gradient(155deg, rgba(99,102,241,0.18), rgba(34,211,238,0.1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px 32px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.rtl .stat-card { padding: 28px 32px 28px 28px; }
.stat-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(52,211,153,0.18);
  color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  position: relative;
}
.stat-icon::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--success); opacity: .6;
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(.8); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.stat-body { flex: 1; }
.stat-label { font-size: .9rem; color: var(--text-muted); margin-bottom: 4px; }
.stat-value {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
  transition: transform .25s;
}
.stat-value.bump { animation: bump .35s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600; font-size: .95rem;
  background: var(--surface); color: var(--text);
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 22px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 10px 30px var(--primary-glow); color: white; }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); color: var(--text); }

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface); border-color: var(--primary); color: var(--text); }

.btn-lg { padding: 16px 28px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }

/* ---------- Cards / Games grid ---------- */
.games-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.game-cover {
  height: 180px;
  background: var(--gradient-soft);
  background-size: cover; background-position: center;
}
.game-cover--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--primary);
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(34,211,238,0.1));
}
.game-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-title { font-size: 1.25rem; }
.game-desc { color: var(--text-muted); flex: 1; margin: 0; font-size: .95rem; }
.game-card .btn { align-self: flex-start; margin-top: 4px; }
.rtl .game-card .btn { align-self: flex-start; }

/* ---------- Download cards ---------- */
.download-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 40px;
}
.download-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.download-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 14px 40px rgba(99,102,241,0.18);
  color: var(--text);
}
.download-card[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.download-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gradient-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--primary);
  flex-shrink: 0;
}
.download-body { flex: 1; display: flex; flex-direction: column; }
.download-eyebrow { font-size: .8rem; color: var(--text-dim); }
.download-name { font-size: 1.2rem; font-weight: 700; }
.download-arrow { color: var(--text-muted); }

/* ---------- Page header ---------- */
.page-header {
  padding: 70px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.page-sub { color: var(--text-muted); font-size: 1.05rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); margin-bottom: 16px; font-weight: 500;
}
.back-link:hover { color: var(--primary); }

/* ---------- Rich content (HTML body from CKEditor) ---------- */
.rich-content {
  font-size: 1.05rem; line-height: 1.85; color: var(--text);
}
.rich-content h1,.rich-content h2,.rich-content h3,.rich-content h4 { margin: 1.5em 0 .6em; }
.rich-content h2 { font-size: 1.6rem; }
.rich-content h3 { font-size: 1.3rem; }
.rich-content p { margin: 0 0 1em; color: var(--text); }
.rich-content ul,.rich-content ol { margin: 0 0 1em; padding-inline-start: 1.6em; }
.rich-content li { margin-bottom: .4em; }
.rich-content a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(34,211,238,.4); }
.rich-content a:hover { text-decoration-color: var(--accent); }
.rich-content code { background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.rich-content pre {
  background: var(--bg-elev); padding: 16px; border-radius: 12px;
  overflow-x: auto; border: 1px solid var(--border);
}
.rich-content blockquote {
  border-inline-start: 4px solid var(--primary);
  padding-inline-start: 18px; color: var(--text-muted);
  margin: 1em 0;
}
.rich-content img { border-radius: 12px; margin: 1em 0; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.rich-content th, .rich-content td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: start;
}
.rich-content th { background: var(--surface); }

.game-hero-cover { margin-bottom: 28px; border-radius: var(--radius-lg); overflow: hidden; }
.game-hero-cover img { width: 100%; height: auto; }

.cta-row {
  margin-top: 40px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* ---------- Top-Up ---------- */
.topup-wrap { max-width: 920px; margin: 0 auto; }
.topup-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.topup-step-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.3rem; margin-bottom: 24px;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-primary); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.package-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.package-card {
  position: relative;
  background: var(--bg-elev);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform .15s, border-color .2s, box-shadow .2s;
  color: var(--text);
}
.package-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 28px rgba(99,102,241,0.25);
}
.package-card.is-selected {
  border-color: var(--primary);
  background: linear-gradient(155deg, rgba(99,102,241,0.18), rgba(34,211,238,0.05));
  box-shadow: 0 12px 32px rgba(99,102,241,0.3);
}
.package-card--featured { border-color: var(--accent-2); }
.badge-best {
  position: absolute; top: -12px; inset-inline-end: 14px;
  background: var(--accent-2); color: white;
  padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.pkg-coins {
  font-size: 1.8rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.pkg-coins i { color: var(--warning); -webkit-background-clip: initial; background-clip: initial; }
.pkg-name { color: var(--text-muted); font-size: .95rem; margin-bottom: 8px; }
.pkg-bonus {
  background: rgba(52,211,153,0.15); color: var(--success);
  padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  display: inline-block; margin-bottom: 10px;
}
.pkg-price { font-size: 1.4rem; font-weight: 700; color: var(--text); }

.method-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.method-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 16px;
  background: var(--bg-elev);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.method-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.method-card.is-selected {
  border-color: var(--primary);
  background: linear-gradient(155deg, rgba(99,102,241,0.18), rgba(34,211,238,0.05));
}
.method-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gradient-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--primary);
}
.method-name { font-weight: 600; text-align: center; }

.payment-info {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
}
.info-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); min-width: 140px; }
.info-value { font-weight: 600; }
.info-value--account { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-value code {
  background: var(--surface-2); padding: 6px 10px; border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .9rem; word-break: break-all;
}

/* ---------- Forms ---------- */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; margin-bottom: 8px; font-weight: 600; color: var(--text);
}
.form-input, .topup-form input, .contact-form input, .contact-form textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .topup-form input:focus, .contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { resize: vertical; min-height: 120px; }

.form-actions {
  display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  margin-top: 8px;
}
.form-error {
  background: rgba(248,113,113,0.12);
  color: var(--danger);
  border: 1px solid rgba(248,113,113,0.35);
  padding: 12px 14px; border-radius: 10px;
  margin: 12px 0;
}
.field-error { color: var(--danger); margin-top: 6px; font-size: .9rem; }
.muted { color: var(--text-muted); font-size: .9rem; }

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

/* ---------- Topup success ---------- */
.topup-success { text-align: center; }
.success-icon {
  font-size: 4rem; color: var(--success);
  margin-bottom: 12px;
}

/* ---------- Alerts ---------- */
.messages-wrap { padding-top: 16px; }
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.alert-success { color: var(--success); background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.35); }
.alert-error, .alert-danger { color: var(--danger); background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.35); }
.alert-warning { color: var(--warning); background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.35); }
.alert-info { color: var(--accent); background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.35); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; color: var(--text-muted);
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ---------- Changelog / version ---------- */
.version-tag {
  background: var(--surface-2); padding: 3px 10px;
  border-radius: 999px; font-family: ui-monospace, monospace;
  font-size: .9em; color: var(--accent);
}
.changelog-card { margin-top: 30px; }
.changelog-title { font-size: 1.3rem; margin-bottom: 16px; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.history-item summary {
  cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  list-style: none;
}
.history-item summary::-webkit-details-marker { display: none; }
.history-item[open] { padding-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.footer-inner {
  display: grid; gap: 40px;
  grid-template-columns: 1.5fr 1fr 1fr;
  padding: 60px 24px 40px;
}
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr; padding-block: 40px; }
}
.footer-tagline { color: var(--text-muted); margin-top: 12px; max-width: 360px; }
.footer-title {
  font-size: 1rem; color: var(--text);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--text); }

.social-list { display: flex; flex-direction: column; gap: 10px; }
.social-list a {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .15s;
  color: var(--text);
}
.social-list a:hover { border-color: var(--primary); transform: translateX(0); color: var(--text); }
.rtl .social-list a:hover { transform: translateX(0); }
.social-list i { color: var(--primary); width: 20px; text-align: center; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  text-align: center;
  font-size: .9rem;
  color: var(--text-dim);
}
.footer-bottom p { margin: 0; }

/* ---------- Page header for game detail (slight tweak) ---------- */
.page-header--game { background: var(--gradient-soft); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .hero-bg { display: none; }
  body { background: white; color: black; }
}
