:root {
  color-scheme: dark;
  --bg: #101112;
  --panel: #181a1d;
  --panel-2: #202329;
  --text: #f5f2ea;
  --muted: #aaa39a;
  --line: #34302b;
  --accent: #f28a2e;
  --accent-2: #d9492f;
  --good: #87c77b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 0%, rgba(242, 138, 46, 0.18), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(135, 199, 123, 0.13), transparent 24rem),
    linear-gradient(180deg, #101112 0%, #161719 46%, #101112 100%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 18, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: clamp(118px, 15vw, 150px);
  height: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.language-menu summary,
.chip,
.copy-code,
.button {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.nav-links a {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 14px;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  padding: 9px 10px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  width: min(330px, calc(100vw - 32px));
  max-height: min(420px, 70vh);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(18, 19, 21, 0.98);
  box-shadow: var(--shadow);
}

.language-options a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.language-options a:hover,
.language-options a[aria-current="page"] {
  background: rgba(242, 138, 46, 0.12);
  color: var(--text);
}

.language-options span {
  font-weight: 800;
  color: var(--text);
}

.language-options small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links a:hover,
.language-menu summary:hover,
.button:hover,
.copy-code:hover {
  border-color: rgba(242, 138, 46, 0.65);
  background: rgba(242, 138, 46, 0.12);
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: clamp(520px, 72vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 17, 18, 0.34), rgba(16, 17, 18, 0.98)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(0.94) contrast(1.05);
  transform: scale(1.01);
}

.hero-inner {
  position: relative;
  padding: 88px 0 58px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #f6b56d;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
}

.lead {
  max-width: 720px;
  color: #d5cec4;
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.55;
  margin: 22px 0 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 198, 122, 0.42);
  color: #160f0b;
}

.section {
  padding: 58px 0 72px;
}

.section h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 4vw, 44px);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.game-card {
  aspect-ratio: 16 / 9;
  min-height: 0;
  display: grid;
  align-content: end;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48) 55%, rgba(0, 0, 0, 0.9)),
    var(--card-image) center / cover no-repeat;
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
}

.game-card h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
}

.game-card p {
  margin: 0;
  color: #ded6cc;
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.45;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 26px;
  padding: 34px 0 70px;
}

.article-hero {
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article-hero img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}

.article-head {
  padding: 26px;
  background: linear-gradient(180deg, rgba(242, 138, 46, 0.14), rgba(24, 26, 29, 0));
}

.article-head h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.content {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(24, 26, 29, 0.9);
  overflow: hidden;
}

.content-inner {
  padding: clamp(22px, 4vw, 36px);
}

.content-inner > *:first-child {
  margin-top: 0;
}

.content-inner section {
  margin: 0 0 28px;
}

.content-inner p,
.content-inner li,
.content-inner section {
  color: #ded7cd;
  font-size: 17px;
  line-height: 1.7;
}

.content-inner h2 {
  margin: 38px 0 16px;
  font-size: clamp(25px, 3vw, 36px);
}

.content-inner h3 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.content-inner mark {
  color: #16110d;
  background: #f7b45e;
  border-radius: 4px;
  padding: 0 4px;
}

.content-inner a {
  color: #ffbd73;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content-inner img {
  margin: 18px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.codes-table,
.content-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(9, 10, 11, 0.52);
}

.codes-table th,
.codes-table td,
.content-table th,
.content-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  text-align: left;
}

.codes-table th,
.content-table th {
  color: #fff3dd;
  font-size: 13px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
}

.codes-table tr:last-child td,
.content-table tr:last-child td {
  border-bottom: 0;
}

.code-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-code {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  cursor: pointer;
  color: #f9c27a;
}

.copy-code::before {
  content: "Copy";
  font-size: 12px;
  font-weight: 800;
}

.copy-code[data-copied="true"]::before {
  content: "Copied";
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(24, 26, 29, 0.86);
  padding: 16px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

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

.site-footer small {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand language"
      "links links";
    align-items: center;
    padding: 12px 0;
    gap: 10px 12px;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
  }

  .nav-links {
    grid-area: links;
    justify-content: flex-start;
    width: 100%;
  }

  .nav-actions {
    display: contents;
  }

  .language-menu {
    grid-area: language;
    justify-self: end;
  }

  .language-options {
    right: 0;
    left: auto;
  }

  .nav-links a {
    font-size: 13px;
    padding: 8px 9px;
  }

  .hero {
    min-height: 610px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .article-head,
  .content-inner {
    padding: 20px;
  }

  .lang-list {
    display: none;
  }

  .codes-table,
  .content-table {
    min-width: 640px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
