/* AlchemyOrb — style.css (the game)
   A centred fixed-aspect (4:3) playfield with a right-hand rail on desktop; on
   mobile the rail hides and the playfield takes the whole viewport (still 4:3,
   letterboxed). Palette mirrors js/constants.js — AlchemyOrb is CYAN (cold
   player), enemies are warm (see constants.js). Keep the two in sync. */

:root {
  --bg:        #08000f; /* same near-black as AlchemyTD */
  --bg2:       #0e001c;
  --orb-bright:#22e6ff;
  --orb-mid:   #00a3b8;
  --orb-core:  #c8fbff;
  --gold:      #ffcc00;
  --text:      #ddc8ff;
  --text-dim:  #6f8a95;
  --border:    #123642;
  --accent:    var(--orb-bright);
  --red:       #ff4444;
  --rail-w:    220px;
  --font:      'Courier New', Courier, monospace;
  --glow-cyan: 0 0 8px #22e6ffaa, 0 0 24px #22e6ff44;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
#game-wrap {
  display: flex;
  height: 100%;
}

#playfield {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}

#game-canvas {
  display: block;
  cursor: crosshair;
  touch-action: none; /* the canvas owns all touch — no scroll/zoom hijack */
}

/* ── Rail (desktop) ──────────────────────────────────────────────────────── */
#rail {
  width: var(--rail-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
}

.rail-logo {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
  text-shadow: var(--glow-cyan);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.rail-hud { display: flex; flex-direction: column; gap: 8px; }

.hud-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.hud-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); }
.hud-val   { font-size: 18px; font-weight: bold; color: var(--accent); }

.rail-section { border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; }
.rail-title   { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 6px; }
.rail-loadout { font-size: 13px; color: var(--text); }
.rail-level-name { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* Ad slot — pinned to the bottom of the rail */
#ad-slot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ad-placeholder {
  height: 70px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.01);
}

/* ── Consent banner (shared markup injected by consent.js) ───────────────── */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.consent-text { flex: 1; min-width: 220px; line-height: 1.5; }
.consent-text a { color: var(--accent); }
.consent-actions { display: flex; gap: 8px; }
.consent-btn {
  font-family: var(--font);
  font-size: 12px;
  padding: 8px 16px;
  min-height: 40px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
}
.consent-btn.accept { background: var(--accent); color: var(--bg); font-weight: bold; }
.consent-btn:hover  { filter: brightness(1.1); }

/* ── Mobile: hide the rail, playfield fills the viewport ─────────────────── */
@media (max-width: 640px) {
  #rail { display: none; }
}
