:root {
  --bg: #081612;
  --panel: #10231f;
  --panel-soft: #163b33;
  --green: #2f5d50;
  --mint: #8cd5bf;
  --gold: #d6a94a;
  --white: #ffffff;
  --muted: #b9c9c2;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(8, 22, 18, 0.92), rgba(8, 22, 18, 1)),
    #0b1d18;
  line-height: 1.6;
}

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

button {
  font: inherit;
}

.game-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 22, 18, 0.9);
  backdrop-filter: blur(14px);
}

.game-nav,
.interactive-main {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

.game-nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-logo {
  color: var(--white);
  font-weight: 850;
}

.game-nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.game-nav-links a {
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  font-weight: 750;
}

.game-nav-links a:hover,
.game-nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  outline: none;
}

.interactive-main {
  padding: 1.75rem 0 3rem;
}

.game-shell {
  display: grid;
  gap: 1.25rem;
}

.game-heading {
  max-width: 56rem;
}

.eyebrow,
.hud-label,
.panel-kicker {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-heading h1 {
  margin: 0;
  max-width: 16ch;
  font-size: 2.4rem;
  line-height: 1.04;
}

.game-heading p:not(.eyebrow) {
  max-width: 42rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.game-layout {
  display: grid;
  gap: 1rem;
}

.game-card,
.resume-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 35, 31, 0.88);
  box-shadow: var(--shadow);
}

.game-card {
  overflow: hidden;
}

.game-hud {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.game-hud strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
}

.progress-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  width: 0%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  transition: width 240ms ease;
}

.game-viewport {
  height: min(48vw, 350px);
  min-height: 290px;
  overflow: hidden;
  outline: none;
  background:
    linear-gradient(180deg, #0d3029 0%, #122923 58%, #071511 58%, #071511 100%);
}

.game-viewport:focus-visible {
  box-shadow: inset 0 0 0 3px var(--gold);
}

.game-world {
  position: relative;
  width: 2520px;
  height: 100%;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 7% 18%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 30%, rgba(214, 169, 74, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 12%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 28%, rgba(140, 213, 191, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px);
  background-size: 620px 260px;
}

.city {
  position: absolute;
  bottom: 94px;
  width: 560px;
  height: 110px;
  opacity: 0.42;
  background:
    linear-gradient(90deg, transparent 0 28px, rgba(140, 213, 191, 0.12) 28px 31px, transparent 31px 70px),
    linear-gradient(180deg, transparent 0 28px, rgba(255, 255, 255, 0.06) 28px 31px, transparent 31px),
    linear-gradient(90deg, #183a33 0 70px, #21483f 70px 135px, #193b34 135px 220px, #245248 220px 300px, #17372f 300px 410px, #21483f 410px);
  background-size: 70px 100%, auto, auto;
  clip-path: polygon(0 42%, 8% 42%, 8% 20%, 17% 20%, 17% 45%, 29% 45%, 29% 12%, 40% 12%, 40% 34%, 52% 34%, 52% 0, 65% 0, 65% 38%, 77% 38%, 77% 18%, 89% 18%, 89% 42%, 100% 42%, 100% 100%, 0 100%);
}

.city-one {
  left: 180px;
}

.city-two {
  left: 1340px;
  transform: scaleX(-1);
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  border-top: 4px solid rgba(214, 169, 74, 0.55);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #09211c;
  background-size: 42px 42px;
}

.station {
  position: absolute;
  bottom: 80px;
  min-width: 7.5rem;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(214, 169, 74, 0.55);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  background: rgba(16, 35, 31, 0.92);
  color: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.station span {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
}

.station:hover,
.station:focus-visible,
.station.is-active {
  transform: translateY(-4px);
  border-color: var(--mint);
  background: #1c4038;
  outline: none;
}

.player {
  position: absolute;
  left: 130px;
  bottom: 58px;
  z-index: 8;
  width: 98px;
  max-width: none;
  image-rendering: pixelated;
  transform: translateX(-50%);
  transition: left 420ms ease;
}

.player.is-moving {
  animation: step 420ms ease;
}

.scene-object {
  position: absolute;
  bottom: 82px;
  z-index: 3;
}

.code-screen {
  width: 122px;
  height: 82px;
  border: 3px solid rgba(140, 213, 191, 0.55);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: rgba(4, 13, 11, 0.72);
}

.code-screen span {
  display: block;
  height: 7px;
  margin-bottom: 9px;
  border-radius: 999px;
  background: var(--mint);
}

.code-screen span:nth-child(2) {
  width: 72%;
  background: var(--gold);
}

.code-screen span:nth-child(3) {
  width: 52%;
}

.camera {
  width: 96px;
  height: 66px;
  border-radius: var(--radius);
  background: #111;
  border: 3px solid #3c4a45;
}

.camera::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 17px;
  width: 28px;
  height: 28px;
  border: 5px solid var(--mint);
  border-radius: 50%;
  background: #081612;
}

.camera::after {
  content: "";
  position: absolute;
  left: 13px;
  top: -12px;
  width: 34px;
  height: 15px;
  border-radius: 5px 5px 0 0;
  background: #1e2d28;
}

.bird-sign {
  min-width: 9rem;
  border: 2px solid rgba(214, 169, 74, 0.55);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: rgba(8, 22, 18, 0.82);
  color: var(--gold);
  font-weight: 900;
}

.laptop {
  width: 118px;
  height: 76px;
  border: 4px solid #263d37;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, var(--mint) 0 38%, transparent 38% 45%, var(--gold) 45% 72%, transparent 72%),
    #06120f;
}

.laptop::after {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: -13px;
  height: 12px;
  border-radius: 0 0 8px 8px;
  background: #30443e;
}

.mail-box {
  width: 92px;
  height: 68px;
  border: 3px solid rgba(214, 169, 74, 0.62);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.mail-box::before,
.mail-box::after {
  content: "";
  position: absolute;
  top: 31px;
  width: 64px;
  height: 3px;
  background: var(--gold);
}

.mail-box::before {
  left: 3px;
  transform: rotate(31deg);
}

.mail-box::after {
  right: 3px;
  transform: rotate(-31deg);
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.control-btn,
.dot-btn,
.panel-actions a {
  min-height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-control,
.panel-actions a:first-child {
  border-color: transparent;
  background: var(--gold);
  color: var(--bg);
}

.control-btn:hover,
.control-btn:focus-visible,
.dot-btn:hover,
.dot-btn:focus-visible,
.panel-actions a:hover,
.panel-actions a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--mint);
  outline: none;
}

.control-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.level-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.dot-btn {
  width: 2.65rem;
  padding: 0;
}

.dot-btn.is-active {
  background: var(--mint);
  color: var(--bg);
}

.resume-panel {
  padding: 1.35rem;
}

.resume-panel h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

#panel-subtitle {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.panel-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.panel-list li {
  border-left: 3px solid var(--gold);
  padding: 0.7rem 0.85rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, 0.055);
  color: #edf5f1;
}

.panel-tags,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.panel-tags span {
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  background: rgba(140, 213, 191, 0.12);
  color: var(--mint);
  font-size: 0.84rem;
  font-weight: 850;
}

.panel-actions a {
  text-decoration: none;
}

@keyframes step {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@media (min-width: 760px) {
  .game-heading h1 {
    font-size: 3.15rem;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    align-items: start;
  }

  .game-hud {
    grid-template-columns: 12rem 1fr;
    align-items: center;
  }
}

@media (max-width: 680px) {
  .game-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0;
  }

  .game-nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .game-heading h1 {
    font-size: 2.45rem;
  }

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

  .player {
    width: 82px;
  }

  .station {
    min-width: 6.75rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
