:root {
  --bg-0: #040612;
  --bg-1: #09132d;
  --bg-2: #142859;
  --panel-line: rgba(96, 241, 255, 0.5);
  --panel-shadow: rgba(0, 0, 0, 0.42);
  --ink: #f7fbff;
  --muted: #c0ceff;
  --gold: #ffd76b;
  --lime: #d7ff64;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 16% 16%, rgba(98, 240, 255, 0.18), transparent 20%),
    radial-gradient(circle at 84% 12%, rgba(255, 93, 151, 0.18), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(215, 255, 100, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 42%, var(--bg-2));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0), black 30%, black 100%);
}

body::after {
  background:
    radial-gradient(circle, rgba(98, 240, 255, 0.18), transparent 62%),
    radial-gradient(circle, rgba(255, 215, 107, 0.16), transparent 72%);
  transform: translateY(44vh) scale(1.25);
  filter: blur(18px);
}

.page {
  width: min(100%, 1360px);
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(520px, 960px);
  gap: 28px;
  align-items: center;
}

.hero-panel {
  padding: 18px 8px 18px 0;
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-panel h1 {
  margin: 0;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Arial Black", sans-serif;
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow:
    0 0 28px rgba(98, 240, 255, 0.28),
    6px 6px 0 rgba(0, 0, 0, 0.22);
}

.subtitle {
  max-width: 30rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.cabinet {
  position: relative;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(18, 30, 72, 0.96), rgba(9, 16, 40, 0.98)),
    #0b1432;
  border: 1px solid rgba(96, 241, 255, 0.18);
  box-shadow:
    0 24px 70px var(--panel-shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.cabinet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.cabinet-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.stat-card,
.marquee,
.control-chip {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(8, 14, 35, 0.62);
  border: 1px solid rgba(98, 240, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.stat-card::after,
.marquee::after,
.control-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 48%);
  pointer-events: none;
}

.stat-card {
  padding: 10px 14px;
  text-align: center;
}

.stat-card span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  color: var(--gold);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.5rem;
}

.marquee {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 0 18px;
  color: var(--ink);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background:
    linear-gradient(90deg, rgba(98, 240, 255, 0.12), rgba(255, 93, 151, 0.12)),
    rgba(8, 14, 35, 0.72);
}

.screen-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #060c1f;
  box-shadow:
    inset 0 0 0 4px rgba(3, 6, 18, 0.42),
    inset 0 -14px 28px rgba(0, 0, 0, 0.26);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  touch-action: manipulation;
}

.screen-glow,
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen-glow {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(98, 240, 255, 0.08), transparent 24%);
}

.scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015) 0 3px,
    rgba(5, 10, 24, 0.18) 3px 7px
  );
  mix-blend-mode: overlay;
}

.control-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.control-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

kbd {
  min-width: 54px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .page {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 0;
    text-align: center;
  }

  .subtitle {
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  body {
    padding: 16px;
  }

  .cabinet {
    padding: 14px;
    border-radius: 22px;
  }

  .cabinet-header,
  .control-bar {
    grid-template-columns: 1fr;
  }
}
