/* OMEGA ASSIMILATION GAMES — Shared Visual Theme
   HFO Gen 98 · CRT Neon Retro-Futurist
   W3C Pointer Events Spatial OS Ready */

:root {
  --bg:          #050810;
  --surface:     #0a0f1a;
  --border:      #00ffcc;
  --accent1:     #00ffcc;
  --accent2:     #ff4488;
  --accent3:     #ffe600;
  --accent4:     #8855ff;
  --text:        #cce8ff;
  --text-dim:    #4488aa;
  --danger:      #ff3344;
  --success:     #00ff88;
  --glow-cyan:   0 0 8px #00ffcc, 0 0 20px #00ffcc44;
  --glow-pink:   0 0 8px #ff4488, 0 0 20px #ff448844;
  --font-mono:   'Courier New', 'Lucida Console', monospace;
  --font-ui:     'Segoe UI', system-ui, sans-serif;
  --scan-line:   rgba(0,0,0,0.04);
  --radius:      6px;
  --transition:  0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* ── CRT filter ──────────────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    var(--scan-line) 3px,
    var(--scan-line) 4px
  );
  z-index: 9999;
}

/* ── Game wrapper ────────────────────────────────────────────────────────── */
.game-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw; height: 100vh;
  background: radial-gradient(ellipse at center, #10182a 0%, var(--bg) 80%);
}

/* ── Canvas ──────────────────────────────────────────────────────────────── */
canvas {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--glow-cyan), inset 0 0 40px rgba(0,255,204,0.04);
  border-radius: var(--radius);
  image-rendering: pixelated;
  cursor: none;
  touch-action: none;
}

/* ── HUD bar ─────────────────────────────────────────────────────────────── */
.hud {
  display: flex;
  gap: 24px;
  align-items: center;
  width: 100%;
  max-width: 640px;
  padding: 6px 12px;
  margin-bottom: 6px;
  border: 1px solid #003322;
  border-radius: var(--radius);
  background: rgba(0,255,204,0.04);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label { color: var(--text-dim); font-size: 10px; text-transform: uppercase; }
.hud-value { color: var(--accent1); font-size: 16px; font-weight: bold; text-shadow: 0 0 8px var(--accent1); }

/* ── Overlay (pause / gameover / start) ──────────────────────────────────── */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(5,8,16,0.82);
  backdrop-filter: blur(2px);
  border-radius: var(--radius);
  z-index: 10;
}
.overlay.hidden { display: none; }

.overlay-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--accent1);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: pulse-glow 2s infinite;
}

.overlay-sub {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.btn {
  padding: 10px 28px;
  border: 1px solid var(--accent1);
  background: transparent;
  color: var(--accent1);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: var(--glow-cyan);
}
.btn:hover, .btn:focus-visible {
  background: var(--accent1);
  color: var(--bg);
  box-shadow: 0 0 16px var(--accent1);
  outline: none;
}
.btn.danger { border-color: var(--danger); color: var(--danger); box-shadow: var(--glow-pink); }
.btn.danger:hover { background: var(--danger); color: var(--bg); }

/* ── Back link ────────────────────────────────────────────────────────────── */
.back-link {
  position: fixed;
  top: 10px; left: 14px;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  z-index: 100;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent1); }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { text-shadow: var(--glow-cyan); }
  50%       { text-shadow: 0 0 24px #00ffcc, 0 0 48px #00ffcc88; }
}

@keyframes slide-in-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.animate-in { animation: slide-in-up 0.3s ease both; }

/* ── Mobile / pointer device sizing ──────────────────────────────────────── */
@media (max-width: 700px) {
  canvas { width: 96vw !important; height: auto !important; }
  .overlay-title { font-size: 24px; }
}

/* ── Custom pointer cursor (spatial OS) ──────────────────────────────────── */
.pointer-cursor {
  position: fixed;
  width: 18px; height: 18px;
  border: 2px solid var(--accent1);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: var(--glow-cyan);
  transition: transform 0.05s, opacity 0.1s;
  z-index: 10000;
}
.pointer-cursor.pressed {
  transform: translate(-50%, -50%) scale(0.7);
  background: rgba(0,255,204,0.3);
}
