/* ============================================================
   CLASH — Base Design Tokens, Resets & Utility Classes
   File: css/base.css
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg-deep: #010a13;
  --bg-panel: rgba(9, 20, 40, 0.94);
  --bg-panel-solid: #091428;
  --bg-surface: rgba(240, 230, 210, 0.03);
  --bg-input: rgba(0, 0, 0, 0.6);

  /* ── Unified glass panel tokens (lighter, green-teal tint) ── */
  --glass-from: rgba(12, 28, 32, 0.95);
  --glass-to: rgba(8, 16, 20, 0.98);
  --glass-border: rgba(240, 230, 210, 0.09);
  --glass-shimmer: rgba(255, 255, 255, 0.09);
  --glass-glow: rgba(255, 255, 255, 0.05);
  --glass-surface: rgba(0, 10, 14, 0.3);
  --glass-hover-border: rgba(240, 230, 210, 0.14);

  --gold: #c89b3c;
  --gold-light: #f0e6d2;
  --gold-dim: #785a28;
  --gold-glow: rgba(200, 155, 60, 0.25);
  --gold-subtle: rgba(200, 155, 60, 0.05);
  --gold-border: rgba(200, 155, 60, 0.3);

  --blue-hex: #005a82;
  --blue-hex-light: #00a3e0;
  --blue-hex-glow: rgba(0, 163, 224, 0.25);
  --blue-hex-subtle: rgba(0, 163, 224, 0.05);
  --blue-hex-border: rgba(0, 163, 224, 0.35);

  --hp-from: #10b981;
  --hp-to: #059669;
  --hp-glow: rgba(16, 185, 129, 0.25);
  --mp-from: #3b82f6;
  --mp-to: #1d4ed8;
  --mp-glow: rgba(59, 130, 246, 0.25);
  --xp-from: #c89b3c;
  --xp-to: #785a28;
  --xp-glow: rgba(200, 155, 60, 0.25);

  --text-primary: #f0e6d2;
  --text-secondary: #a09c8e;
  --text-muted: #785a28;
  --text-dim: #5c4e3b;

  --border-subtle: rgba(240, 230, 210, 0.05);
  --border-light: rgba(240, 230, 210, 0.1);
  --border-gold: rgba(200, 155, 60, 0.3);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.7);
  --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.9);

  --font-display: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;

  --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.18, 0.89, 0.32, 1.28);

  /* Responsive spacing tokens */
  --hud-padding: 10px 16px;
  --hud-gap: 12px;
  --hud-bottom: 14px;
}

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

html,
body {
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--font-body);
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  width: 100%;
  height: 100%;
}

canvas#game {
  display: block;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}


/* ── Utility Classes ────────────────────────────────────── */
.icon-sm {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-md {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.flex-row {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

#hostLobbyPanel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#joinLobbyPanel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#hostCodeDisplay {
  display: none;
}

#p2-select-col {
  display: none;
}

#selectorDivider {
  display: none;
}

.bg-glow-red {
  background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.1) 0%, transparent 65%);
}

.bg-avatar-red {
  background: radial-gradient(circle at 35% 35%, rgba(239, 68, 68, 0.45) 0%, rgba(127, 29, 29, 0.85) 100%);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fee2e2;
}

.bg-glow-blue {
  background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 65%);
}

.bg-avatar-blue {
  background: radial-gradient(circle at 35% 35%, rgba(14, 165, 233, 0.45) 0%, rgba(3, 105, 161, 0.85) 100%);
  border-color: rgba(14, 165, 233, 0.45);
  color: #e0f2fe;
}

.bg-glow-black {
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 65%);
}

.bg-avatar-black {
  background: radial-gradient(circle at 35% 35%, rgba(161, 161, 170, 0.45) 0%, rgba(39, 39, 42, 0.85) 100%);
  border-color: rgba(113, 113, 122, 0.45);
  color: #f4f4f5;
}

.bg-glow-yellow {
  background: radial-gradient(circle at 50% 30%, rgba(234, 179, 8, 0.1) 0%, transparent 65%);
}

.bg-avatar-yellow {
  background: radial-gradient(circle at 35% 35%, rgba(245, 158, 11, 0.45) 0%, rgba(146, 64, 14, 0.85) 100%);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fef3c7;
}

.bg-glow-white {
  background: radial-gradient(circle at 50% 30%, rgba(236, 72, 153, 0.14) 0%, transparent 65%);
}

.bg-avatar-white {
  background: radial-gradient(circle at 35% 35%, rgba(236, 72, 153, 0.45) 0%, rgba(157, 23, 77, 0.85) 100%);
  border-color: rgba(236, 72, 153, 0.45);
  color: #fce7f3;
}

.bg-glow-green {
  background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 65%);
}

.bg-avatar-green {
  background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.45) 0%, rgba(4, 120, 87, 0.85) 100%);
  border-color: rgba(16, 185, 129, 0.45);
  color: #d1fae5;
}

.bg-glow-purple {
  background: radial-gradient(circle at 50% 30%, rgba(168, 85, 247, 0.14) 0%, transparent 65%);
}

.bg-avatar-purple {
  background: radial-gradient(circle at 35% 35%, rgba(168, 85, 247, 0.45) 0%, rgba(88, 28, 135, 0.85) 100%);
  border-color: rgba(192, 132, 252, 0.45);
  color: #f3e8ff;
}

.bg-glow-orange {
  background: radial-gradient(circle at 50% 30%, rgba(249, 115, 22, 0.14) 0%, transparent 65%);
}

.bg-avatar-orange {
  background: radial-gradient(circle at 35% 35%, rgba(249, 115, 22, 0.45) 0%, rgba(154, 52, 18, 0.85) 100%);
  border-color: rgba(251, 146, 60, 0.45);
  color: #ffedd5;
}

.bg-glow-cyan {
  background: radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.14) 0%, transparent 65%);
}

.bg-avatar-cyan {
  background: radial-gradient(circle at 35% 35%, rgba(6, 182, 212, 0.45) 0%, rgba(14, 116, 144, 0.85) 100%);
  border-color: rgba(56, 189, 248, 0.45);
  color: #cffafe;
}