:root {
  --bg: #07070c;
  --text: #e8e8ef;
  --muted: #8b8b9e;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6ee7ff;
  --green: #4ade80;
  --red: #f87171;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.game-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  position: relative;
  z-index: 1;
}

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-top-spacer {
  width: 4rem;
  flex-shrink: 0;
}

.game-heading {
  text-align: center;
}

.game-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.game-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hud-box {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14, 14, 22, 0.7);
  text-align: center;
}

.hud-k {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.hud-v {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.canvas-wrap {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #0a0a12 0%, #07070c 100%);
  overflow: hidden;
  margin-bottom: 1rem;
}

#chart {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
}

.toast {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

.toast.show {
  opacity: 1;
}

.toast.ok {
  color: var(--green);
}

.toast.bad {
  color: var(--red);
}

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #22d3ee, #7c3aed);
  color: #0a0a0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 36px rgba(110, 231, 255, 0.18);
  transition: transform 0.12s, box-shadow 0.2s;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 16px 44px rgba(110, 231, 255, 0.25);
}

.btn-buy:active {
  transform: translateY(0);
}

.btn-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.hint {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.disclaimer {
  margin-top: 1.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  opacity: 0.85;
}
