:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --panel: #101615;
  --panel-strong: #16211f;
  --text: #eef7f0;
  --muted: #a9b7ae;
  --line: #28423d;
  --teal: #43f2dc;
  --amber: #f6c453;
  --danger: #ff6b5e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(67, 242, 220, 0.08), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(246, 196, 83, 0.12), transparent 22rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(67, 242, 220, 0.18);
  background: rgba(10, 13, 12, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ghost-button,
.play-button {
  min-height: 2.75rem;
  border: 1px solid rgba(67, 242, 220, 0.42);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.ghost-button {
  padding: 0 1rem;
  background: rgba(16, 22, 21, 0.8);
}

.play-button {
  padding: 0 1.35rem;
  background: linear-gradient(135deg, #1ad8c3, #f6c453);
  color: #07100f;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(67, 242, 220, 0.22);
}

.ghost-button:hover,
.play-button:hover {
  transform: translateY(-1px);
}

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
}

.game-stage {
  display: grid;
  grid-template-columns: minmax(15rem, 0.32fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: end;
}

.stage-copy {
  padding-bottom: 0.25rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.stage-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.game-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 22rem;
  border: 1px solid rgba(67, 242, 220, 0.26);
  border-radius: 8px;
  background: #030505;
  box-shadow: var(--shadow);
}

.game-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #050807;
}

.unity-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.unity-warning {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: min(42rem, calc(100% - 2rem));
  color: #07100f;
  font-weight: 700;
  text-align: center;
}

.unity-warning div {
  margin-bottom: 0.5rem;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--amber);
}

.launch-layer,
.loading-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
}

.launch-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08) brightness(0.72);
}

.launch-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 5, 5, 0.18), rgba(3, 5, 5, 0.72));
}

.launch-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.status-pill {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(238, 247, 240, 0.22);
  border-radius: 8px;
  padding: 0 0.95rem;
  background: rgba(5, 8, 7, 0.74);
  color: var(--text);
  font-weight: 700;
}

.loading-layer {
  gap: 0.85rem;
  background: rgba(5, 8, 7, 0.9);
}

.loader-bar {
  overflow: hidden;
  width: min(22rem, 70%);
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(238, 247, 240, 0.12);
}

.loader-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--danger));
  transition: width 0.2s ease;
}

.controls {
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 1.5rem) 0 0;
  border-top: 1px solid rgba(67, 242, 220, 0.18);
}

.controls h2 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--amber);
  text-transform: uppercase;
}

.controls dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.controls div {
  min-height: 4.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(238, 247, 240, 0.1);
  border-radius: 8px;
  background: rgba(16, 22, 21, 0.72);
}

.controls dt {
  color: var(--teal);
  font-weight: 800;
}

.controls dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .game-stage {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .game-frame {
    min-height: 18rem;
  }

  .controls dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    position: static;
  }

  .game-frame {
    min-height: 15rem;
  }

  .controls dl {
    grid-template-columns: 1fr;
  }

  .launch-content {
    align-content: center;
  }
}
