* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #060913;
  color: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 12px;
}

.arcade-shell {
  width: 100%;
  max-width: 684px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.back-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: #0f172a;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #1e293b;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #38bdf8;
}

.value.stage {
  color: #a78bfa;
}

.value.lives {
  color: #34d399;
}

.value.gold {
  color: #fbbf24;
}

.board-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 680 / 480;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #1e293b;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
  touch-action: none;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #0a1020;
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 19, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.overlay.hidden {
  display: none;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 8px;
}

.overlay h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.overlay p {
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.overlay strong {
  color: #38bdf8;
}

.play-btn {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #ffffff;
  border: none;
  padding: 13px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}