:root {
  --bg: #ffffff;
  --ink: #171b2a;
  --muted: #5f6b83;
  --soft: #f5f6fb;
  --soft-2: #ecefff;
  --primary: #675be7;
  --primary-dark: #4d42bd;
  --cyan: #12b7d6;
  --line: #e3e6f1;
  --dark: #111426;
  --warning: #fcff00;
  --shadow: 0 18px 42px rgba(20, 24, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(227, 230, 241, 0.9);
  backdrop-filter: blur(14px);
}

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

.brand {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

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

.nav-links a {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--soft-2);
}

.menu-button {
  display: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--primary);
}

.play-section {
  padding: 18px 0 0;
  background: linear-gradient(180deg, #fff 0%, #fff 72%, var(--soft) 72%, var(--soft) 100%);
}

.intro,
.section-heading {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.intro {
  padding-bottom: 14px;
}

.crumb,
.section-kicker {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
}

.intro p {
  margin-bottom: 0;
  font-size: 15px;
}

.game-panel {
  width: 100vw;
  background: #0909d9;
  box-shadow: 0 18px 38px rgba(20, 24, 42, 0.13);
}

.game-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 128px);
  min-height: 430px;
  overflow: hidden;
  background: #0909d9;
}

.game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0909d9;
}

.game-toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px max(16px, calc((100vw - 1180px) / 2));
  background: #101426;
  color: #fff;
}

.game-label {
  font-weight: 900;
}

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

.tool-actions button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 800;
}

.tool-actions button:hover {
  background: var(--warning);
  color: var(--primary-dark);
}

.facts {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 24, 42, 0.06);
}

.facts div {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.facts div:last-child {
  border-right: 0;
}

.facts span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.facts strong {
  color: var(--ink);
}

.content-section,
.faq-section {
  padding: 72px 16px;
}

.content-section.muted,
.faq-section {
  background: var(--soft);
}

.content-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 42px;
  align-items: center;
}

.content-grid.reverse {
  grid-template-columns: 340px minmax(0, 1fr);
}

.content-grid p:last-child,
.note-panel p:last-child {
  margin-bottom: 0;
}

.note-panel,
.steps article,
.help-grid article,
details,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 24, 42, 0.06);
}

.note-panel {
  padding: 24px;
}

.note-panel.accent {
  border-color: rgba(103, 91, 231, 0.22);
  background: linear-gradient(135deg, #fff, #f2f0ff);
}

.section-heading {
  margin-bottom: 28px;
}

.steps,
.help-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.steps article,
.help-grid article {
  padding: 24px;
}

.steps span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--soft-2);
  color: var(--primary);
  font-weight: 900;
}

.table-wrap {
  width: min(960px, 100%);
  margin: 0 auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--soft);
}

td {
  color: var(--muted);
}

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

.plain-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.compact-list li + li {
  margin-top: 8px;
}

.plain-list li + li {
  margin-top: 10px;
}

.plain-list strong {
  color: var(--ink);
}

details {
  width: min(880px, 100%);
  margin: 0 auto 12px;
  padding: 0 22px;
}

summary {
  cursor: pointer;
  padding: 20px 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

details p {
  margin-bottom: 0;
  padding-bottom: 20px;
}

.footer {
  min-height: 86px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--dark);
  color: #fff;
}

.footer span {
  color: #b9c0d2;
}

@media (max-width: 920px) {
  .nav-wrap {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .game-shell {
    max-height: none;
    min-height: 360px;
  }

  .game-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-actions {
    justify-content: flex-start;
  }

  .facts,
  .content-grid,
  .content-grid.reverse,
  .steps,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .facts div,
  .facts div:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .facts div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .play-section {
    padding-top: 14px;
  }

  .game-shell {
    min-height: 300px;
  }

  .content-section,
  .faq-section {
    padding: 52px 16px;
  }

  .tool-actions button {
    flex: 1 1 auto;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}
