:root {
  --bg: #0a0d12;
  --surface: #0f141f;
  --panel: #151c28;
  --text: #f4f7fb;
  --muted: #b7c2d4;
  --border: #1f2a3a;
  --primary: #f06b5a;
  --primary-600: #db5748;
  --secondary: #4cc4a6;
  --accent: #f1c453;
  --radius: 16px;
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  --font-sans: "Space Grotesk", "Noto Sans", sans-serif;
  --font-serif: "Space Grotesk", "Noto Sans", sans-serif;
  --header-h: 84px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; scroll-padding-top: var(--header-h, 84px); background: var(--bg); }
body {
  min-height: 100%;
  margin: 0;
  padding-top: 0;
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  background: transparent;
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.header-animate { transition: padding-top 0.22s ease; }
body.has-auto-header { padding-top: var(--header-h, 0px); }
body.header-hidden { padding-top: 0; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 900px at 10% 6%,
      rgba(240, 107, 90, 0.22) 0%,
      rgba(240, 107, 90, 0.12) 36%,
      rgba(240, 107, 90, 0.05) 58%,
      rgba(10, 13, 18, 0) 78%),
    radial-gradient(1200px 900px at 90% 0%,
      rgba(76, 196, 166, 0.20) 0%,
      rgba(76, 196, 166, 0.11) 38%,
      rgba(76, 196, 166, 0.05) 60%,
      rgba(10, 13, 18, 0) 80%),
    linear-gradient(180deg, #0a0d12 0%, #0f141d 100%);
  background-repeat: no-repeat;
  background-size: cover;
}
img { max-width: 100%; display: block; forced-color-adjust: none; }
svg { forced-color-adjust: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

h1, h2, h3 { font-family: var(--font-serif); letter-spacing: -0.01em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card.padded { padding: 22px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 26, 36, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
body.has-auto-header .site-header {
  position: fixed;
  left: 0;
  right: 0;
  transform: translateY(0);
  transition: transform 0.22s ease;
  will-change: transform;
}
body.has-auto-header .site-header.is-hidden { transform: translateY(-100%); }
.site-header .bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; }
.brand-icon { width: 26px; height: 26px; }
.site-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  font-weight: 600;
}
.site-nav a { opacity: 0.75; }
.site-nav a[aria-current="page"] { opacity: 1; color: var(--primary); }
.nav-actions { display: inline-flex; gap: 12px; align-items: center; justify-content: flex-end; }

.lang-picker { position: relative; }
.lang-picker summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
}
.lang-picker summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 6px;
  display: grid;
  gap: 4px;
  min-width: 120px;
  z-index: 50;
}
.lang-item { padding: 6px 10px; border-radius: 10px; font-weight: 600; color: var(--text); }
.lang-item:hover { background: #1d2432; }
.lang-item.is-active { opacity: 0.6; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(227, 107, 92, 0.25);
}
.btn.primary:hover { background: var(--primary-600); }
.btn.ghost { background: transparent; }
.btn:hover { transform: translateY(-1px); }

.hero { padding: 68px 0 36px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.hero-copy h1 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); margin: 10px 0 10px; }
.hero-copy .subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(76, 196, 166, 0.16);
  color: #6de5c7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}
.hero-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.hero-list li { display: flex; gap: 10px; align-items: flex-start; }
.hero-list li::before { content: "•"; color: var(--primary); font-size: 1.2rem; line-height: 1; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 18px; }
.stat { padding: 12px 14px; background: var(--panel); border-radius: 12px; border: 1px solid var(--border); }

.hero-art {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(241, 196, 83, 0.16), rgba(47, 143, 131, 0.12));
}

.section { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-subtitle { margin: 6px 0 0; color: var(--muted); max-width: 560px; }

.grid { display: grid; gap: 24px; align-items: stretch; }
.grid-2, .grid-3 { grid-auto-rows: 1fr; align-items: stretch; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feature-card {
  padding: 18px 20px;
  height: 150px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  align-self: stretch;
}
.feature-card { height: 150px; }
.feature-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; min-height: 1.3em; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.95rem; min-height: 3em; }
.feature-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }

.numbered { padding-left: 20px; margin: 0; }
.numbered li { margin-bottom: 8px; }

.game-card { transition: transform 0.2s ease, box-shadow 0.2s ease; height: 100%; }
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #2a3547; }
.game-link {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  align-items: center;
  color: inherit;
  height: 100%;
  padding: 6px;
  box-sizing: border-box;
}
.game-thumb { border-radius: 14px; background: transparent; border: 1px solid transparent; padding: 16px; margin-left: 4px; }
.game-thumb { display: flex; align-items: center; justify-content: center; }
.game-body { text-align: left; display: flex; flex-direction: column; justify-content: center; }
.game-body h3 { margin-top: 0; margin-bottom: 6px; }
.game-body p { margin: 0 0 8px; color: var(--muted); }
.game-body ul { margin: 0; padding-left: 18px; }
.game-body { align-self: stretch; }
.grid-2 .game-card { min-height: 220px; }

.pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: #1a2230; font-weight: 600; font-size: 0.85rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.post-card { overflow: hidden; height: 100%; display: grid; grid-template-rows: 210px 1fr; }
.post-card { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; }
.post-card:hover,
.post-card:focus-within { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #2a3547; }
.post-card a { display: grid; grid-template-rows: 210px 1fr; height: 100%; }
.post-card h3 { margin: 0 0 10px; line-height: 1.25; min-height: 2.5em; }
.post-card p { margin: 0; color: var(--muted); line-height: 1.55; min-height: 4.65em; }
.post-card h3,
.post-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card h3 { -webkit-line-clamp: 2; }
.post-card p { -webkit-line-clamp: 3; }
.post-thumb { position: relative; height: 210px; background: #161d28; }
.post-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-body p { max-width: none; }
.post-card .post-body { display: flex; flex-direction: column; gap: 6px; }
.post-thumb span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.faq-preview h3 { margin: 0 0 6px; }
.faq-preview p { margin: 0; color: var(--muted); }

.page { margin: 24px auto 48px; padding: 20px; }
.page header { margin-bottom: 18px; }
.page .grid { margin-top: 16px; }
.page > .grid + .card { margin-top: 24px; }
.page > .card + .card { margin-top: 24px; }
.page header h1 { margin: 0 0 6px; }
.page .subtitle { color: var(--muted); }

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--secondary); margin-bottom: 8px; }
.manual-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.game-hero { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.game-hero > img { justify-self: center; align-self: center; }
.category-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.cta-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px; background: linear-gradient(135deg, rgba(240, 107, 90, 0.2), rgba(76, 196, 166, 0.18)); }

.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.data-table th, .data-table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.data-table th { background: #1a2231; font-weight: 700; }

.store-badges { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; }
.store-badge img { height: 32px; width: auto; display: block; }

.faq-preview { padding: 14px 16px; }
.faq-preview h3 { margin: 0 0 8px; }
.faq-preview p { margin: 0; color: var(--muted); }

.grid-3 .post-card { min-height: 392px; }

#games .grid { margin-bottom: 16px; }

.article-links { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 10px; }
.article-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.article-aside { position: sticky; top: 96px; align-self: start; display: grid; gap: 16px; }
.article-widget { background: rgba(15, 20, 31, 0.68); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.article-widget-title { margin: 0 0 12px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }

.author-card { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.author-avatar { width: 44px; height: 44px; border-radius: 999px; background: #0f141f; border: 1px solid rgba(255, 255, 255, 0.08); }
.author-name { font-weight: 800; line-height: 1.15; }
.author-role { color: var(--muted); font-size: 0.95rem; line-height: 1.2; margin-top: 2px; }

.article-toc { display: grid; gap: 10px; padding-left: 14px; border-left: 2px solid rgba(240, 107, 90, 0.35); }
.article-toc a { color: var(--muted); font-weight: 650; line-height: 1.3; }
.article-toc a:hover { color: var(--text); }

.share-row { display: flex; gap: 12px; align-items: center; }
.share-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 13, 18, 0.35);
  color: var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.share-link svg { width: 18px; height: 18px; }
.share-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: #2a3547; }

.site-footer {
  margin-top: 40px;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 12px; }

[dir="rtl"] body { direction: rtl; }
[dir="rtl"] .lang-menu { left: 0; right: auto; }
[dir="rtl"] .hero-copy, [dir="rtl"] .section-head { text-align: right; }
[dir="rtl"] .hero-list li { flex-direction: row-reverse; }
[dir="rtl"] .game-hero { grid-template-columns: 1fr 160px; }
[dir="rtl"] .article-toc { border-left: 0; border-right: 2px solid rgba(240, 107, 90, 0.35); padding-left: 0; padding-right: 14px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .game-link { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .game-thumb { margin-left: 0; padding: 10px; }
  .game-hero { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

@media (max-width: 760px) {
  .site-header .bar { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .nav-actions { width: 100%; justify-content: center; }
  .site-nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
