:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-soft: #101216;
  --panel: #15171d;
  --panel-strong: #1d1b1f;
  --line: #34323a;
  --line-hot: #8f302b;
  --text: #f5efe6;
  --muted: #b9ada2;
  --dim: #7f7770;
  --red: #d34d43;
  --amber: #f2b35f;
  --green: #86d38f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --max-width: 1120px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(211, 77, 67, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(211, 77, 67, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(143, 48, 43, 0.22), transparent 34rem),
    var(--bg);
  background-size: 18px 18px, 18px 18px, auto, auto;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.025), transparent 2px);
  background-size: 100% 5px;
  opacity: 0.4;
  z-index: 0;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

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

h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 8vw, 5.8rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 11, 0.88);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.hero,
.content-section,
.play-section,
.site-footer {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--red);
  box-shadow: 5px 5px 0 rgba(242, 179, 95, 0.2);
}

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

.site-nav a {
  padding: 9px 11px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: rgba(211, 77, 67, 0.55);
  color: var(--text);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-lines::before {
  top: -6px;
}

.nav-toggle-lines::after {
  top: 6px;
}

.section-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
  min-height: 500px;
  padding: 60px 0 34px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  max-width: 820px;
}

.eyebrow {
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-weight: 900;
  text-decoration: none;
}

.button-primary {
  background: var(--red);
  color: #140908;
  box-shadow: 6px 6px 0 rgba(242, 179, 95, 0.16);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #ef655b;
}

.button-secondary,
.button-small {
  border-color: rgba(242, 179, 95, 0.35);
  background: rgba(242, 179, 95, 0.08);
  color: var(--text);
}

.button-small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.hero-panel,
.info-card,
.step-card,
.control-card,
.tip-card,
.wide-card,
.game-card,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
}

.hero-panel {
  align-self: center;
  min-height: 430px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(143, 48, 43, 0.2), rgba(0, 0, 0, 0)),
    var(--panel);
}

.screen-lines {
  height: 190px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(211, 77, 67, 0.65) 12px 16px, transparent 16px 100%),
    linear-gradient(180deg, rgba(245, 239, 230, 0.08), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 9px),
    #0d0e11;
  background-size: 34px 100%, auto, auto, auto;
}

.hero-panel dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.hero-panel div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.hero-panel dt {
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-panel dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.play-section,
.content-section {
  padding: 58px 0;
}

.game-card {
  overflow: hidden;
  border-color: rgba(211, 77, 67, 0.55);
  background: var(--panel-strong);
}

.game-player-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 54px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #171a24, #11131a);
  color: var(--muted);
}

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

.game-action {
  border: 1px solid rgba(242, 179, 95, 0.32);
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.72);
  color: var(--amber);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 12px;
}

.game-action:hover,
.game-action:focus-visible {
  border-color: rgba(242, 179, 95, 0.62);
  color: var(--text);
  outline: none;
}

.game-action-primary {
  border-color: rgba(211, 77, 67, 0.58);
  background: rgba(211, 77, 67, 0.18);
  color: var(--text);
}

.iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  background: #050505;
}

.iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#gameShell:fullscreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
}

#gameShell:fullscreen .game-player-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.86);
}

#gameShell:fullscreen .iframe-wrap {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
}

#gameShell:fullscreen iframe {
  width: 100vw;
  height: 100vh;
}

#gameShell:-webkit-full-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
}

#gameShell:-webkit-full-screen .game-player-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.86);
}

#gameShell:-webkit-full-screen .iframe-wrap {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  aspect-ratio: auto;
}

#gameShell:-webkit-full-screen iframe {
  width: 100vw;
  height: 100vh;
}

.card-grid,
.control-layout,
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fact-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 23, 29, 0.78);
}

.fact-card span {
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-card strong {
  color: var(--text);
  font-size: 1rem;
}

.info-card,
.control-card,
.tip-card,
.step-card,
.wide-card {
  padding: 20px;
}

.info-card,
.control-card,
.tip-card,
.step-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.info-card p,
.control-card p,
.tip-card p,
.step-card p,
.wide-card p,
.faq-list p {
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step-number {
  color: var(--red);
  font-weight: 950;
  letter-spacing: 0.12em;
}

.tip-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.survival-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.survival-list li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 23, 29, 0.78);
  color: var(--muted);
}

.wide-card {
  max-width: 900px;
}

.inline-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--amber);
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 0;
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 900;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--amber);
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list details p {
  padding: 0 20px 20px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #060608;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}

.footer-inner p {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

@media (max-width: 900px) {
  .site-header {
    padding-inline: 20px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(13, 14, 17, 0.98);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .hero-panel {
    min-height: 0;
  }

  .card-grid,
  .control-layout,
  .help-grid,
  .fact-grid,
  .steps,
  .tip-list {
    grid-template-columns: 1fr 1fr;
  }

  .iframe-wrap {
    min-height: 340px;
  }

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

@media (max-width: 640px) {
  :root {
    --header-height: 66px;
  }

  body {
    background-size: 14px 14px, 14px 14px, auto, auto;
  }

  .section-shell {
    width: min(100% - 28px, var(--max-width));
  }

  .brand span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding: 38px 0 26px;
  }

  .screen-lines {
    height: 140px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .game-player-bar {
    min-height: 52px;
    padding: 8px;
  }

  .game-actions {
    gap: 6px;
  }

  .game-action {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.85rem;
    text-align: center;
  }

  .button {
    width: 100%;
  }

  .play-section,
  .content-section {
    padding: 42px 0;
  }

  .card-grid,
  .control-layout,
  .help-grid,
  .fact-grid,
  .steps,
  .tip-list {
    grid-template-columns: 1fr;
  }

  .iframe-wrap {
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }

  .hero-panel div {
    grid-template-columns: 84px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
