:root {
  --bg: #070708;
  --bg-2: #0e0e12;
  --ink: #f5f5f5;
  --muted: #a3a3a8;
  --orange: #f97316;
  --orange-hot: #ff8a2a;
  --orange-dim: rgba(249, 115, 22, 0.16);
  --line: #22222a;
  --card: #101014;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scrollbar-width: thin;
  scrollbar-color: #1a1a1a #070708;
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track {
  background: #070708;
}

html::-webkit-scrollbar-thumb {
  background: #1a1a1a;
  border: 2px solid #070708;
  border-radius: 0;
}

html::-webkit-scrollbar-thumb:hover {
  background: #2a2a2a;
}

html::-webkit-scrollbar-corner {
  background: #070708;
}

html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 85% 12%, rgba(249, 115, 22, 0.16), transparent 55%),
    radial-gradient(700px 380px at 10% 100%, rgba(249, 115, 22, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hot); }

.arcade-wrap {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.arcade-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.arcade-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.arcade-brand-mark {
  width: 42px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.45));
}

.arcade-brand-name {
  display: inline-block;
  padding: 6px 14px 7px;
  background: var(--orange);
  color: #111;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-style: italic;
  text-transform: uppercase;
  transform: skewX(-8deg);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.35);
}

.arcade-brand-name span {
  display: inline-block;
  transform: skewX(8deg);
}

.arcade-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.arcade-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}

.arcade-kicker {
  margin: 0 0 10px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.arcade-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

.arcade-title span {
  color: var(--orange);
}

.arcade-sub {
  margin: 16px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.arcade-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.arcade-hero-art::before {
  content: "";
  position: absolute;
  inset: 12% 8%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.55), transparent 68%);
  filter: blur(18px);
  z-index: 0;
}

.arcade-hero-art img {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

.arcade-section-label {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(249, 115, 22, 0.08), transparent 38%),
    var(--card);
}

.game-card.is-soon {
  opacity: 0.9;
}

.game-card-tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.game-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.game-card-meta {
  margin: 14px 0 16px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: #111 !important;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  background: var(--orange-hot);
  color: #111 !important;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff !important;
}

.btn-ghost:hover {
  border-color: #fff;
}

.btn-disabled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted) !important;
  cursor: default;
}

.arcade-foot {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

@media (max-width: 820px) {
  .arcade-wrap {
    width: min(1040px, calc(100% - 24px));
    padding: 16px 0 40px;
  }
  .arcade-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 28px;
  }
  .arcade-hero-art {
    order: -1;
    min-height: 160px;
  }
  .arcade-hero-art img {
    width: min(180px, 52vw);
  }
  .arcade-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  .arcade-sub {
    font-size: 0.95rem;
  }
}

@media (max-width: 520px) {
  .arcade-nav {
    margin-bottom: 22px;
    gap: 10px;
  }
  .arcade-brand-mark {
    width: 34px;
    height: 37px;
  }
  .arcade-brand-name {
    font-size: 0.9rem;
    padding: 5px 11px 6px;
  }
  .arcade-nav-actions {
    gap: 8px;
  }
  .arcade-nav-actions .btn {
    padding: 9px 11px;
    font-size: 0.72rem;
  }
  .game-card {
    min-height: 0;
    padding: 16px;
  }
  .game-card h2 {
    font-size: 1.35rem;
  }
}

/* -------- Rocket game shell -------- */
body.game-shell {
  height: 100%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  background: var(--bg);
}

.play-shell {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: 10px 12px 16px;
  gap: 10px;
}

.play-top {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
}

.play-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.play-brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.play-build {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: var(--orange-dim);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

#ufo-mission-readout {
  min-height: 2.4em;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 20, 0.9);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

#buildProbe {
  color: #ff6b6b;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  display: none;
}

.play-stage {
  position: relative;
  width: min(400px, 100%);
  aspect-ratio: 400 / 600;
  max-height: calc(100dvh - 210px);
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.12) inset,
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(249, 115, 22, 0.08);
  background: #020202;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #020202;
  touch-action: none;
  image-rendering: pixelated;
  outline: none;
}

#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  display: grid;
  gap: 4px;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#hud > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

#levelHud {
  color: var(--orange) !important;
  font-size: 0.75rem !important;
  margin: 0 !important;
  letter-spacing: 0.06em;
}

#lives {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  font-size: 1rem;
  color: var(--orange);
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.45);
  pointer-events: none;
}

#gameOver {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: none;
  margin: 0;
  max-width: 90%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--orange);
  text-shadow: 0 0 18px rgba(249, 115, 22, 0.45);
  white-space: pre-line;
  pointer-events: auto;
  cursor: pointer;
}

#reward {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 90%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink);
}

#playAgainBtn {
  position: absolute !important;
  left: 50% !important;
  top: 72% !important;
  transform: translateX(-50%);
  z-index: 25 !important;
  margin: 0 !important;
  background: var(--orange) !important;
  color: #111 !important;
  font-family: var(--font-display) !important;
}

.email-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.email-modal-content {
  width: min(360px, 100%);
  background: #101014;
  border: 1px solid var(--line);
  padding: 22px 20px;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.18);
  color: #fff;
  text-align: center;
  font-family: var(--font-body);
}

.email-modal-content h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
}

.email-modal-content p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.email-modal-content input {
  width: 100%;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: #0a0a0c;
  color: #fff;
  outline: none;
  font-family: inherit;
}

.email-modal-content button {
  padding: 10px 16px;
  border: 0;
  background: var(--orange);
  color: #111;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

#mobile-controls {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 92vw);
  display: none;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
}

#mobile-controls button {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(8, 8, 10, 0.55);
  color: #fff;
  font-size: 1.6rem;
  pointer-events: auto;
  backdrop-filter: blur(4px);
}

.play-foot {
  width: min(420px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-foot a {
  color: var(--orange);
  text-decoration: none;
}

@media (max-width: 480px) {
  .play-shell { padding-bottom: 96px; }
  .play-stage { max-height: calc(100dvh - 250px); }
}
