:root {
  --bg: #0a0610;
  --brick: #140c16;
  --card: rgba(14, 8, 22, 0.88);
  --line: rgba(255, 80, 200, 0.28);
  --text: #f6f1ff;
  --muted: #b9a8d0;
  --cyan: #5cf0ff;
  --cyan-dim: #18c4e0;
  --magenta: #ff3ad6;
  --purple: #9b4dff;
  --gold: #ffb43c;
  --orange: #ff7a1a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: Impact, "Arial Black", "Franklin Gothic Heavy", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background-color: #09060d;
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
  line-height: 1.5;
}

body {
  background-color: #0b0710;
  background-image:
    linear-gradient(rgba(8, 4, 12, 0.55), rgba(8, 4, 12, 0.72)),
    linear-gradient(90deg, rgba(255, 58, 214, 0.05) 1px, transparent 1px),
    linear-gradient(#1a0e16 2px, transparent 2px),
    linear-gradient(90deg, #1a0e16 2px, transparent 2px),
    linear-gradient(#2a141c 1px, transparent 1px),
    linear-gradient(90deg, #2a141c 1px, transparent 1px),
    linear-gradient(#12080f, #12080f);
  background-size:
    auto,
    80px 80px,
    80px 40px,
    80px 40px,
    80px 40px,
    80px 40px,
    auto;
  background-position:
    0 0,
    0 0,
    0 0,
    0 0,
    -2px -2px,
    -2px -2px,
    0 0;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Subtle homepage play hint */
.play-hint {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(92, 240, 255, 0.7);
  background: rgba(4, 2, 10, 0.94);
  border-bottom: 1px solid rgba(92, 240, 255, 0.12);
  padding: 0.28rem 0.75rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid rgba(92, 240, 255, 0.2);
  background: rgba(8, 4, 14, 0.82);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 0 24px rgba(155, 77, 255, 0.18);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

.logo img {
  display: block;
  height: 72px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(92, 240, 255, 0.45)) drop-shadow(0 0 16px rgba(255, 58, 214, 0.28));
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text strong {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(92, 240, 255, 0.7);
}

.logo-text span {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.home-link {
  color: var(--cyan);
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(92, 240, 255, 0.4);
  border-radius: 8px;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(92, 240, 255, 0.5);
}

.home-link:hover {
  background: rgba(92, 240, 255, 0.12);
  text-decoration: none;
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.1rem;
  text-align: center;
}

.hero-logo {
  width: min(420px, 86vw);
  height: auto;
  margin: 0 auto 0.6rem;
  display: block;
  filter:
    drop-shadow(0 0 18px rgba(92, 240, 255, 0.35))
    drop-shadow(0 0 28px rgba(255, 58, 214, 0.25));
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3.1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow:
    0 0 12px rgba(92, 240, 255, 0.7),
    0 0 28px rgba(255, 58, 214, 0.35);
  margin-bottom: 0.35rem;
}

.tagline {
  font-family: var(--display);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 180, 60, 0.55);
  margin-bottom: 0.7rem;
}

.hero p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.05rem;
}

.grid {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem 2.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.15rem 1.3rem;
  box-shadow: var(--shadow), 0 0 24px rgba(155, 77, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 100%;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 240, 255, 0.55);
  box-shadow: var(--shadow), 0 0 28px rgba(92, 240, 255, 0.22);
}

.icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(8, 4, 16, 0.9);
  border: 1px solid rgba(92, 240, 255, 0.28);
  box-shadow: 0 0 14px rgba(255, 58, 214, 0.2);
}

.icon svg { width: 34px; height: 34px; }

.card h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px rgba(155, 77, 255, 0.6);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #140610;
  background: linear-gradient(90deg, var(--cyan), #7d7bff 50%, var(--magenta));
  padding: 0.7rem 1rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 48px;
  box-shadow:
    0 0 16px rgba(92, 240, 255, 0.45),
    0 0 28px rgba(255, 58, 214, 0.28);
}

.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
  color: #140610;
}

.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(92, 240, 255, 0.45);
  box-shadow: none;
}

.btn.secondary:hover { background: rgba(92, 240, 255, 0.1); color: var(--cyan); }

.card .btn { width: 100%; margin-top: 0.25rem; }

.tag {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 180, 60, 0.45);
}

footer.site-foot {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Game / coming soon pages */
.game-page .game-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.game-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 0.75rem;
}

.game-bar h1 {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: auto;
  text-shadow: 0 0 10px rgba(92, 240, 255, 0.5);
}

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.hud b { color: var(--text); font-weight: 650; }

.canvas-wrap {
  position: relative;
  background: #08040e;
  border: 1px solid rgba(92, 240, 255, 0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 24px rgba(155, 77, 255, 0.15);
}

.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  user-select: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(8, 4, 14, 0.72);
  text-align: center;
  padding: 1.5rem;
}

.overlay.open { display: grid; }

.overlay h2 {
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(92, 240, 255, 0.6);
  margin-bottom: 0.4rem;
}

.overlay p { color: var(--muted); margin-bottom: 1rem; }

.coming {
  text-align: center;
  padding: 3rem 1.25rem 4rem;
}

.coming h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(92, 240, 255, 0.7), 0 0 28px rgba(255, 58, 214, 0.35);
  margin: 0.4rem 0 0.5rem;
}

.coming p {
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 1.4rem;
}

.help {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.8rem;
}

.touch-controls {
  display: none;
  margin-top: 0.85rem;
  gap: 0.7rem;
  align-items: stretch;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
}

.touch-controls.visible { display: flex; }

.stick-pad {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(14, 8, 22, 0.9);
  border: 1px solid rgba(92, 240, 255, 0.3);
  position: relative;
  flex: 0 0 126px;
}

.stick-knob {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(92, 240, 255, 0.85);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 14px rgba(92, 240, 255, 0.6);
}

.touch-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

.pad-btn {
  appearance: none;
  border: 1px solid rgba(255, 58, 214, 0.4);
  background: rgba(14, 8, 22, 0.9);
  color: var(--text);
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 14px;
  min-width: 72px;
  min-height: 56px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
}

.pad-btn:active, .pad-btn.held {
  background: rgba(255, 58, 214, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.pad-btn.wide { min-width: 110px; }
.pad-btn.fire {
  min-width: 96px;
  min-height: 96px;
  border-radius: 50%;
  background: rgba(255, 58, 62, 0.18);
  border-color: rgba(255, 180, 60, 0.55);
}

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  .logo img { height: 56px; }
  .logo-text { display: none; }
}

@media (pointer: coarse) {
  .touch-controls { display: flex; }
}
