* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0b1020; color: #e8ecff;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
  user-select: none;
}
#game { position: fixed; inset: 0; display: block; }

/* ===== HUD ===== */
#top-hud {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; z-index: 5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
#top-hud.hidden { display: none; }
.hud-row { display: flex; gap: 14px; }
.bar-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(10, 14, 32, 0.6);
  border: 1px solid rgba(140, 160, 255, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  backdrop-filter: blur(6px);
}
.bar-label { font-size: 16px; line-height: 1; }
.bar {
  width: 160px; height: 12px;
  background: rgba(0,0,0,0.45);
  border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.bar-fill { height: 100%; width: 100%; transition: width 0.15s linear; }
.bar-fill.hp   { background: linear-gradient(90deg, #ff5566, #ff8a44); box-shadow: 0 0 8px rgba(255,80,90,0.6) inset; }
.bar-fill.hp.overheal { background: linear-gradient(90deg, #5ad8a0, #aef0c8); box-shadow: 0 0 10px rgba(120,240,160,0.8) inset; }
.bar-fill.food { background: linear-gradient(90deg, #d8a052, #f0c878); box-shadow: 0 0 8px rgba(200,140,60,0.5) inset; }
.bar-text { font-size: 12px; color: #c8d4ff; min-width: 56px; text-align: right; letter-spacing: 0.5px; }
#mode-info {
  font-size: 13px; letter-spacing: 1px; color: #9ab6ff;
  background: rgba(10, 14, 32, 0.55);
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid rgba(140, 160, 255, 0.2);
}

/* ===== ACTIVE BUFFS ===== */
#active-buffs {
  position: fixed; top: 96px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.buff {
  font-size: 13px; padding: 4px 9px; border-radius: 6px;
  background: rgba(10, 14, 32, 0.65);
  border: 1px solid rgba(140, 160, 255, 0.30);
  backdrop-filter: blur(4px);
}
.buff-good { border-color: rgba(120, 220, 140, 0.55); }
.buff-bad  { border-color: rgba(255, 110, 130, 0.55); }
.buff-twist { color: #ffd866; border-color: rgba(255, 216, 102, 0.65); font-weight: bold; }

/* ===== DAMAGE FEEDBACK (red vignette + dots) ===== */
#damage-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 9; opacity: 0;
  background-image:
    radial-gradient(ellipse at center, rgba(180,0,0,0) 42%, rgba(170,0,0,0.72) 100%),
    radial-gradient(rgba(255,45,45,0.55) 1.4px, transparent 1.7px);
  background-size: 100% 100%, 13px 13px;
}
#damage-vignette.flash { animation: dmg-flash 0.55s ease-out; }
@keyframes dmg-flash {
  0%   { opacity: var(--dmg-intensity, 0.8); }
  100% { opacity: 0; }
}

/* ===== LOADOUT SELECTION ===== */
.loadout-card { max-width: 760px; }
.loadout-grid {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin: 18px 0 22px;
}
.loadout-opt {
  width: 210px; padding: 16px 14px; cursor: pointer;
  background: rgba(30, 36, 60, 0.7);
  border: 2px solid rgba(140, 160, 255, 0.25);
  border-radius: 10px;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
  text-align: center;
}
.loadout-opt:hover { transform: translateY(-2px); border-color: rgba(140, 160, 255, 0.5); }
.loadout-opt.selected {
  border-color: #ffd866;
  box-shadow: 0 0 18px rgba(255, 216, 102, 0.4);
  background: rgba(50, 46, 30, 0.75);
}
.loadout-opt-icon { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.loadout-opt-name { font-size: 17px; font-weight: bold; color: #ffe9a8; margin-bottom: 8px; }
.loadout-opt-desc { font-size: 12.5px; color: #b8c4e8; line-height: 1.45; }
.loadout-nav { display: flex; gap: 12px; justify-content: center; }

/* ===== HOTBAR ===== */
#hotbar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  background: rgba(10, 14, 32, 0.55);
  padding: 6px; border-radius: 8px;
  border: 1px solid rgba(140, 160, 255, 0.25);
  backdrop-filter: blur(6px);
  z-index: 5;
}
#hotbar.hidden { display: none; }
.slot {
  width: 52px; height: 52px;
  background: rgba(30, 36, 60, 0.7);
  border: 2px solid rgba(140, 160, 255, 0.25);
  border-radius: 6px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.slot.active { border-color: #ffd866; box-shadow: 0 0 14px rgba(255, 216, 102, 0.45); }
.slot.disabled { opacity: 0.35; }
.slot .slot-num {
  position: absolute; top: 2px; left: 4px;
  font-size: 10px; color: #9ab6ff; opacity: 0.7;
}
.slot .slot-icon { font-size: 26px; line-height: 1; }
.slot .slot-count {
  position: absolute; bottom: 2px; right: 4px;
  font-size: 12px; font-weight: bold; color: #fff;
  text-shadow: 1px 1px 0 #000;
}
.slot .slot-name {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: #c8d4ff; white-space: nowrap;
  opacity: 0; transition: opacity 0.15s;
}
.slot.active .slot-name { opacity: 1; }

/* ===== CROSSHAIR ===== */
#crosshair {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  pointer-events: none; z-index: 4;
}
#crosshair.hidden { display: none; }
#crosshair::before, #crosshair::after {
  content: ""; position: absolute; background: rgba(255,255,255,0.85);
  box-shadow: 0 0 2px rgba(0,0,0,0.9);
}
#crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
#crosshair::after  { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }

/* ===== RESPAWN COUNTDOWN ===== */
#respawn-overlay {
  position: fixed; top: 38%; left: 50%; transform: translate(-50%, -50%);
  font-size: 42px; color: #ff8866; font-weight: bold;
  letter-spacing: 4px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95);
  pointer-events: none; z-index: 8;
  background: rgba(10, 14, 32, 0.55);
  padding: 18px 38px;
  border-radius: 12px;
  border: 2px solid rgba(255, 136, 102, 0.55);
}
#respawn-overlay.hidden { display: none; }
#respawn-overlay .small { font-size: 14px; color: #c8d4ff; letter-spacing: 2px; font-weight: normal; margin-top: 4px; }

/* ===== CTF HUD ===== */
#ctf-hud {
  position: fixed; top: 86px; left: 50%; transform: translateX(-50%);
  background: rgba(10, 14, 32, 0.82);
  border: 1px solid rgba(140, 160, 255, 0.35);
  padding: 8px 18px;
  border-radius: 8px;
  z-index: 7;
  pointer-events: none;
  text-align: center;
  min-width: 360px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
#ctf-hud.hidden { display: none; }
.ctf-scoreline { font-size: 22px; font-weight: bold; letter-spacing: 2px; margin-bottom: 4px; }
.ctf-scoreline .red  { color: #ff8a90; }
.ctf-scoreline .blue { color: #88a8ff; }
.ctf-scoreline .dash { color: #888; margin: 0 8px; }
.ctf-flagline { font-size: 12px; color: #c8d4ff; letter-spacing: 1px; }
.ctf-flagline .red  { color: #ff8a90; font-weight: bold; }
.ctf-flagline .blue { color: #88a8ff; font-weight: bold; }
.ctf-flagline .home { color: #88dd88; }
.ctf-flagline .away { color: #ffaa55; }

/* ===== FROZEN OVERLAY (Freeze Ray) ===== */
#freeze-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 10;
  opacity: 0; transition: opacity 0.18s ease-out;
  background:
    radial-gradient(ellipse at center, rgba(120,200,255,0) 48%, rgba(90,170,255,0.55) 100%),
    linear-gradient(rgba(150,210,255,0.12), rgba(150,210,255,0.12));
  display: flex; align-items: flex-start; justify-content: center;
}
#freeze-overlay.active { opacity: 1; }
#freeze-overlay span {
  margin-top: 26%; font-size: 30px; font-weight: bold; letter-spacing: 4px;
  color: #cfeeff; text-shadow: 0 2px 10px rgba(40,120,200,0.9);
}

/* ===== BRAWL HUD: lobby line + scoreboard (top-right, under kill feed) ===== */
#brawl-hud {
  position: fixed; top: 14px; left: 16px;
  z-index: 7; pointer-events: none;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
#brawl-hud.hidden { display: none; }
#brawl-lobby {
  font-size: 13px; font-weight: bold; letter-spacing: 1px;
  color: #9ec6e8; margin-bottom: 6px;
}
#brawl-scoreboard {
  background: rgba(10, 14, 32, 0.72);
  border: 1px solid rgba(140, 160, 255, 0.3);
  border-radius: 8px; padding: 6px 10px;
  min-width: 150px;
}
#brawl-scoreboard .brawl-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 13px; line-height: 1.5; color: #c8d4ff;
}
#brawl-scoreboard .brawl-row.me .brawl-name { color: #88dd88; font-weight: bold; }
#brawl-scoreboard .brawl-row.me .brawl-kills { color: #88dd88; }
#brawl-scoreboard .brawl-name { color: #e8ecff; }
#brawl-scoreboard .brawl-kills { color: #ffd866; font-weight: bold; }

/* ===== HIT MARKER ===== */
#hit-marker {
  position: fixed; top: 50%; left: 50%;
  width: 26px; height: 26px;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 5;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
#hit-marker.active { opacity: 1; transition: opacity 0s; }
#hit-marker::before, #hit-marker::after {
  content: ""; position: absolute;
  top: 50%; left: 0; width: 100%; height: 2.5px;
  background: #ffffff;
  box-shadow: 0 0 4px rgba(0,0,0,0.95);
}
#hit-marker::before { transform: translateY(-50%) rotate(45deg); }
#hit-marker::after  { transform: translateY(-50%) rotate(-45deg); }

/* ===== KILL FEED ===== */
#kill-feed {
  position: fixed; top: 170px; right: 14px;
  display: flex; flex-direction: column; gap: 4px;
  pointer-events: none; z-index: 8;          /* above ctrl-hint */
  max-width: 360px;
}
#kill-feed .kill-row {
  background: rgba(10, 14, 32, 0.90);
  border: 1px solid rgba(255, 216, 102, 0.40);
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 15px;
  color: #e8ecff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  display: flex; align-items: center; gap: 10px;
  animation: killIn 0.18s ease-out, killOut 0.5s 4.5s ease-in forwards;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}
#kill-feed .kill-killer { color: #ffd866; font-weight: bold; }
#kill-feed .kill-victim { color: #c8d4ff; font-weight: bold; }
#kill-feed .kill-self   { color: #88dd88; }
#kill-feed .kill-iam-victim { color: #ff8866; }
#kill-feed .kill-weapon { font-size: 14px; }
@keyframes killIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes killOut { to { opacity: 0; transform: translateX(20px); } }

/* ===== CHAT FEED ===== */
#chat-feed {
  position: fixed; top: 60px; left: 14px;
  display: flex; flex-direction: column; gap: 3px;
  z-index: 8;
  width: 360px; max-height: 55vh;
  overflow-y: auto;
  background: rgba(10, 14, 32, 0.55);
  border: 1px solid rgba(140, 160, 255, 0.18);
  border-radius: 8px;
  padding: 6px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 160, 255, 0.35) transparent;
}
#chat-feed::-webkit-scrollbar { width: 6px; }
#chat-feed::-webkit-scrollbar-thumb { background: rgba(140, 160, 255, 0.35); border-radius: 3px; }
#chat-feed.hidden { display: none; }
#chat-feed .chat-row {
  background: rgba(10, 14, 32, 0.72);
  border: 1px solid rgba(200, 212, 255, 0.20);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 13px;
  color: #e8ecff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  display: flex; align-items: baseline; gap: 6px;
  animation: chatIn 0.14s ease-out;
  word-break: break-word;
  flex-shrink: 0;
}
#chat-feed .chat-team {
  display: inline-block; min-width: 16px; text-align: center;
  font-size: 10px; font-weight: bold; letter-spacing: 1px;
  border-radius: 3px; padding: 0 4px;
  flex-shrink: 0;
}
#chat-feed .chat-team.red  { background: rgba(220,70,80,0.35);  color: #ffb6bd; border: 1px solid rgba(255,120,130,0.55); }
#chat-feed .chat-team.blue { background: rgba(60,120,255,0.35); color: #bcd0ff; border: 1px solid rgba(140,180,255,0.55); }
#chat-feed .chat-name { color: #ffd866; font-weight: bold; flex-shrink: 0; }
#chat-feed .chat-name.self { color: #88dd88; }
#chat-feed .chat-text { color: #e8ecff; }
@keyframes chatIn  { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== CHAT INPUT BAR ===== */
#chat-input-wrap {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(10, 14, 32, 0.92);
  border: 1px solid rgba(255, 216, 102, 0.65);
  border-radius: 6px;
  padding: 6px 12px;
  z-index: 30;
  min-width: 360px; max-width: 70vw;
  box-shadow: 0 6px 22px rgba(0,0,0,0.6);
}
#chat-input-wrap.hidden { display: none; }
#chat-input-prefix {
  font-size: 12px; font-weight: bold; letter-spacing: 1px;
  color: #ffd866;
}
#chat-input-prefix.team-red  { color: #ff8088; }
#chat-input-prefix.team-blue { color: #88a8ff; }
#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8ecff;
  font-size: 14px;
  font-family: inherit;
}
#chat-input::placeholder { color: rgba(232, 236, 255, 0.45); }

/* ===== EATING PROGRESS BAR ===== */
#eating-bar {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  width: 240px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
}
#eating-bar.hidden { display: none; }
.eating-bar-label {
  color: #ffd866; font-size: 11px; letter-spacing: 2px; font-weight: bold;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.eating-bar-track {
  width: 100%; height: 10px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255, 216, 102, 0.55); border-radius: 5px;
  overflow: hidden;
}
#eating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d8a052, #ffd866);
  width: 0%;
  transition: width 0.05s linear;
}

/* ===== RELOAD PROGRESS BAR ===== */
#reload-bar {
  position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%);
  width: 240px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
}
#reload-bar.hidden { display: none; }
#reload-bar .eating-bar-label { color: #ff9a55; }
#reload-bar .eating-bar-track { border-color: rgba(255, 154, 85, 0.55); }
#reload-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #884422, #ff9a55);
  width: 0%;
  transition: width 0.05s linear;
}

/* ===== CONTROL HINT (top-right) ===== */
#ctrl-hint {
  position: fixed; top: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(10, 14, 32, 0.55);
  border: 1px solid rgba(140, 160, 255, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px; letter-spacing: 0.5px;
  color: #c8d4ff;
  pointer-events: none;
  z-index: 6;
  backdrop-filter: blur(6px);
}
#ctrl-hint.hidden { display: none; }
#ctrl-hint span { display: flex; align-items: center; gap: 6px; }

/* ===== TOAST ===== */
#toast {
  position: fixed; top: 30%; left: 50%; transform: translateX(-50%);
  pointer-events: none; z-index: 7;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.toast-msg {
  background: rgba(10, 14, 32, 0.85);
  border: 1px solid rgba(255, 216, 102, 0.5);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 16px; letter-spacing: 1px; font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  animation: toastIn 0.3s ease, toastOut 0.5s 1.5s ease forwards;
}
@keyframes toastIn  { from { opacity: 0; transform: translateY(-10px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* ===== OVERLAYS / MENU ===== */
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20,30,70,0.92), rgba(5,8,20,0.98));
  z-index: 10;
  transition: opacity 0.25s;
}
.overlay.hidden { opacity: 0; pointer-events: none; }

.card {
  text-align: center;
  padding: 36px 48px;
  border: 1px solid rgba(140, 160, 255, 0.3);
  border-radius: 14px;
  background: rgba(15, 20, 45, 0.85);
  box-shadow: 0 10px 60px rgba(0,0,0,0.55);
  max-width: 640px;
}
.card h1 { font-size: 44px; margin-bottom: 6px; color: #ffd866; letter-spacing: 4px; }
.card h2 { font-size: 28px; margin-bottom: 12px; color: #c8d4ff; letter-spacing: 2px; }
.card p  { font-size: 14px; color: #9ab6ff; margin: 6px 0; line-height: 1.5; }
.tagline { color: #ffd866 !important; font-weight: bold; letter-spacing: 1.5px; margin-bottom: 18px !important; }

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 18px;
}
.mode-btn {
  background: linear-gradient(145deg, #2a3568, #1a2244);
  border: 2px solid rgba(140, 160, 255, 0.35);
  border-radius: 14px;
  padding: 22px 16px;
  color: #e8ecff;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  font-family: inherit;
}
.mode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(120, 150, 255, 0.3);
  border-color: #ffd866;
}
.mode-icon { font-size: 48px; margin-bottom: 8px; }
.mode-title { font-size: 18px; font-weight: bold; letter-spacing: 2px; color: #ffd866; }
.mode-desc { font-size: 12px; color: #9ab6ff; margin-top: 6px; }

.controls-hint {
  font-size: 12px; color: #9ab6ff; opacity: 0.85;
  margin-top: 10px; line-height: 1.7;
}
.controls-hint b { color: #ffd866; }

.btn {
  background: linear-gradient(145deg, #ffd866, #e0a040);
  color: #2a1a00;
  border: none; border-radius: 8px;
  padding: 10px 28px;
  font-size: 14px; font-weight: bold; letter-spacing: 2px;
  cursor: pointer; font-family: inherit;
  margin: 6px;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost {
  background: transparent;
  color: #c8d4ff;
  border: 1px solid rgba(140, 160, 255, 0.4);
}
.btn.ghost:hover { background: rgba(140, 160, 255, 0.12); }

/* Small "Customize Layout" rectangle on the main menu. */
.btn.keybind-open {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  font-size: 12px;
  letter-spacing: 1.5px;
  background: transparent;
  color: #c8d4ff;
  border: 1px solid rgba(140, 160, 255, 0.4);
}
.btn.keybind-open:hover { background: rgba(140, 160, 255, 0.12); filter: none; }

/* ===== CUSTOMIZE LAYOUT ===== */
.keybind-card { max-width: 900px; }
.keybind-body {
  display: flex; gap: 24px; align-items: flex-start;
  margin: 18px 0 6px; text-align: left;
}
.keybind-actions {
  flex: 0 0 240px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
}
.kb-action {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 8px 12px;
  background: rgba(30, 40, 80, 0.6);
  border: 1px solid rgba(140, 160, 255, 0.25);
  border-radius: 8px;
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.kb-action:hover { border-color: rgba(140, 160, 255, 0.6); }
.kb-action.armed {
  border-color: #ffd866;
  background: rgba(255, 216, 102, 0.14);
  box-shadow: 0 0 0 1px #ffd866 inset;
}
.kb-action-label { font-size: 13px; color: #e8ecff; }
.kb-action-key {
  font-size: 12px; font-weight: bold; letter-spacing: 1px;
  color: #ffd866; min-width: 54px; text-align: center;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 216, 102, 0.4);
}
.kb-action.armed .kb-action-key { color: #2a1a00; background: #ffd866; }

.keybind-keyboard {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px; border-radius: 12px;
  background: rgba(8, 12, 28, 0.7);
  border: 1px solid rgba(140, 160, 255, 0.2);
}
.kb-row { display: flex; gap: 6px; justify-content: flex-start; }
.kb-key {
  position: relative;
  flex: 0 0 auto;
  height: 44px;
  min-width: 34px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(145deg, #2a3568, #1a2244);
  border: 1px solid rgba(140, 160, 255, 0.3);
  border-radius: 7px;
  color: #c8d4ff; font-size: 12px; font-weight: bold;
  cursor: pointer; user-select: none;
  transition: transform 0.08s, border-color 0.12s, background 0.12s;
}
.kb-key:hover { border-color: #ffd866; transform: translateY(-1px); }
.kb-key.reserved { opacity: 0.4; cursor: not-allowed; }
.kb-key.reserved:hover { border-color: rgba(140, 160, 255, 0.3); transform: none; }
.kb-key.bound {
  background: linear-gradient(145deg, #3a4a8a, #26356a);
  border-color: rgba(255, 216, 102, 0.55);
}
.kb-key.armed-key {
  border-color: #ffd866;
  box-shadow: 0 0 12px rgba(255, 216, 102, 0.7);
}
.kb-key.blocked {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.8);
}
.kb-key-cap { font-size: 12px; line-height: 1; }
.kb-key-tag {
  font-size: 8px; line-height: 1.05; margin-top: 3px;
  color: #ffd866; letter-spacing: 0.3px;
  max-width: 44px; text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ===== VERSUS LOBBY ===== */
.versus-row {
  display: flex; gap: 8px; margin: 18px 0 6px;
  justify-content: center; align-items: center;
}
#versus-code {
  background: rgba(0, 0, 0, 0.45);
  color: #ffd866;
  border: 1px solid rgba(255, 216, 102, 0.45);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 18px; letter-spacing: 4px; font-weight: bold;
  font-family: inherit;
  text-align: center;
  text-transform: uppercase;
  width: 200px;
  outline: none;
}
#versus-code:focus { border-color: #ffd866; }
.versus-status {
  margin: 8px auto 14px !important;
  min-height: 18px;
  color: #9ab6ff !important;
}
.versus-status.error { color: #ff8866 !important; }
.versus-status.success { color: #88dd88 !important; }

#versus-name {
  background: rgba(0, 0, 0, 0.45);
  color: #e8ecff;
  border: 1px solid rgba(140, 160, 255, 0.45);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 16px; letter-spacing: 2px;
  font-family: inherit;
  text-align: center;
  width: 240px;
  outline: none;
}
#versus-name:focus { border-color: #ffd866; }

.versus-roster {
  display: flex; flex-direction: column; gap: 4px;
  margin: 12px auto 16px;
  max-width: 280px;
}
.roster-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(140, 160, 255, 0.22);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
}
.roster-row .roster-name { color: #ffd866; font-weight: bold; letter-spacing: 1px; }
.roster-row .roster-tag  { font-size: 10px; color: #9ab6ff; letter-spacing: 1.5px; }
.roster-row.is-self { border-color: rgba(255, 216, 102, 0.55); }
.roster-row.team-red  { border-left: 4px solid #dd3344; }
.roster-row.team-blue { border-left: 4px solid #3a78ff; }
.roster-row.team-red  .roster-tag { color: #ff8a90; }
.roster-row.team-blue .roster-tag { color: #88a8ff; }

kbd {
  background: rgba(140, 160, 255, 0.18);
  padding: 1px 6px; border-radius: 3px;
  font-size: 11px; font-family: inherit;
  color: #ffd866; font-weight: bold;
  border: 1px solid rgba(140, 160, 255, 0.3);
}
