/* ============================================================
   Cockroach Janta Party — 3D Edition Styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --saffron:    #FF9933;
  --saffron-dk: #e07d15;
  --green:      #138808;
  --navy:       #000080;
  --gold:       #FFD700;
  --red:        #E63946;
  --orange:     #F4A261;
  --lime:       #2DC653;
  --blue:       #4CC9F0;
  --panel:      rgba(0,0,20,0.82);
  --panel-bd:   rgba(255,153,51,0.35);
  --font:       'Baloo 2', 'Segoe UI', sans-serif;
  --radius:     14px;
}

html, body { width:100%; height:100%; overflow:hidden; background:#0a0a1a; font-family:var(--font); touch-action:none; }

/* ── Loading Screen ───────────────────────────────────── */
#loading-screen {
  position:fixed; inset:0; z-index:9999;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
  background: radial-gradient(ellipse at 50% 40%, #1a0050 0%, #0a001a 100%);
  transition: opacity .5s ease;
}
#loading-screen.out { opacity:0; pointer-events:none; }
.ls-roach { font-size:72px; animation: rBounce 1s ease-in-out infinite alternate; filter:drop-shadow(0 0 20px #FF993380); }
@keyframes rBounce { from{transform:translateY(0) rotate(-6deg)} to{transform:translateY(-14px) rotate(6deg) scale(1.1)} }
.ls-title {
  font-size:clamp(20px,6vw,36px); font-weight:800;
  background:linear-gradient(135deg,#FF9933,#FFD700,#138808);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.ls-bar-wrap { width:min(280px,75vw); height:10px; background:rgba(255,255,255,.08); border-radius:99px; overflow:hidden; border:1px solid #FF993350; }
.ls-bar { height:100%; width:0%; background:linear-gradient(90deg,#FF9933,#FFD700); border-radius:99px; transition:width .25s; box-shadow:0 0 8px #FF9933; }
.ls-sub { color:rgba(255,255,255,.45); font-size:13px; letter-spacing:2px; text-transform:uppercase; animation:pulse 1.2s infinite; }
@keyframes pulse { 0%,100%{opacity:.35} 50%{opacity:1} }

/* ── Game Canvas ──────────────────────────────────────── */
#game-canvas { position:fixed; inset:0; width:100%!important; height:100%!important; display:block; }

/* ── HUD (overlay) ────────────────────────────────────── */
#hud { position:fixed; inset:0; pointer-events:none; z-index:100; }
#hud.hidden { display:none; }

/* Top bar */
#hud-top {
  position:absolute; top:0; left:0; right:0; height:68px;
  background:linear-gradient(180deg,rgba(0,0,20,.88) 0%,rgba(0,0,20,.0) 100%);
  display:flex; align-items:flex-start; justify-content:space-between; padding:8px 12px 0;
  pointer-events:none;
}
#hud-timer { font-size:28px; font-weight:800; color:#fff; text-shadow:0 0 8px #FF9933,0 2px 4px #000; }
#hud-timer.urgent { color:#ff4444; animation:urgentBlink .4s infinite; }
@keyframes urgentBlink { 50%{opacity:.5} }

#hud-city-wrap { display:flex; flex-direction:column; align-items:center; gap:3px; }
#hud-city { font-size:15px; font-weight:800; color:#FFD700; text-shadow:0 2px 4px #000; letter-spacing:2px; }
#hud-pop-wrap { position:relative; width:min(160px,38vw); height:14px; background:rgba(255,255,255,.1); border-radius:99px; overflow:hidden; border:1px solid rgba(255,255,255,.15); }
#hud-pop-fill { position:absolute; inset:0; width:50%; background:linear-gradient(90deg,#138808,#2DC653); border-radius:99px; transition:width .4s; }
#hud-pop-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:700; color:#fff; text-shadow:0 1px 2px #000; }

#hud-votes { font-size:15px; font-weight:700; color:#fff; text-shadow:0 2px 4px #000; }

/* Crowd counters */
#hud-crowds {
  position:absolute; top:72px; left:0; right:0;
  display:flex; justify-content:space-between; padding:0 10px;
  pointer-events:none;
}
.crowd-badge { font-size:12px; font-weight:700; padding:3px 8px; border-radius:99px; border:1px solid rgba(255,255,255,.2); backdrop-filter:blur(4px); }
.crowd-badge.blue   { background:rgba(76,201,240,.25); color:#4CC9F0; }
.crowd-badge.red    { background:rgba(230,57,70,.25);  color:#ff6666; }
.crowd-badge.orange { background:rgba(244,162,97,.25); color:#F4A261; }
.crowd-badge.green  { background:rgba(45,198,83,.25);  color:#2DC653; }

/* ── Bottom panel ──────────────────────────────────────── */
#hud-money-row { display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:8px; }
#hud-money { text-align:center; font-size:17px; font-weight:800; color:#FFD700; text-shadow:0 2px 4px #000; }
#hud-progress-wrap { flex-shrink:0; }
#hud-progress-arc  { transition: stroke-dasharray .4s ease; }

/* ── Joystick ─────────────────────────────────────────── */
#joystick-ring {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 96px;
  height: 96px;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.78);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65), inset 0 0 0 4px rgba(255,255,255,0.04);
  z-index: 100;
  touch-action: none;
}
#joystick-ring.hidden { display: none !important; }
#joystick-thumb {
  position: absolute;
  width: 38px;
  height: 38px;
  background: #ffffff !important;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  z-index: 102;
}

.joystick-arrow {
  position: absolute;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  z-index: 101;
}
.arrow-up    { top: 6px; left: 50%; transform: translateX(-50%); }
.arrow-down  { bottom: 6px; left: 50%; transform: translateX(-50%); }
.arrow-left  { left: 8px; top: 50%; transform: translateY(-50%); }
.arrow-right { right: 8px; top: 50%; transform: translateY(-50%); }

/* ── Vote Popup ───────────────────────────────────────── */
#vote-popup {
  position:absolute; font-family:var(--font); font-size:18px; font-weight:800;
  color:#FFD700; text-shadow:0 2px 6px #000;
  pointer-events:none; z-index:150;
  animation:voteFloat .9s ease forwards;
}
#vote-popup.hidden { display:none; }
@keyframes voteFloat {
  0%   { opacity:1; transform:translateY(0) scale(1); }
  100% { opacity:0; transform:translateY(-50px) scale(1.3); }
}

#hud-bottom {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(0deg,rgba(0,0,30,.92) 0%,rgba(0,0,30,.0) 100%);
  padding:12px 10px 10px; pointer-events:all;
}
#hud-upgrades { display:flex; gap:8px; }
.upg-btn {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:1px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,153,51,.4);
  border-radius:12px; padding:7px 4px; cursor:pointer; color:#fff;
  transition:background .15s, transform .1s, box-shadow .15s; font-family:var(--font);
}
.upg-btn:hover { background:rgba(255,255,255,.12); }
.upg-btn:active { transform:scale(.93); background:rgba(255,153,51,.2); }
.upg-btn.can-afford { border-color:#FFD700; background:rgba(255,215,0,.1); }
.upg-btn.can-afford:hover { background:rgba(255,215,0,.18); box-shadow:0 0 10px rgba(255,215,0,0.25); }
.upg-btn.can-afford .upg-cost { color:#88ff88; }
.upg-btn .upg-icon { font-size:20px; }
.upg-btn .upg-name { font-size:10px; color:#aaa; font-weight:600; }
.upg-btn .upg-lvl  { font-size:10px; color:#FFD700; font-weight:700; }
.upg-btn .upg-cost { font-size:10px; color:#ff8888; font-weight:700; }

/* Scandal overlay */
#scandal-overlay {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-60%);
  pointer-events:all;
}
#scandal-overlay.hidden { display:none; }
#scandal-card {
  background:rgba(170,0,0,.94); border:2px solid #ff4444; border-radius:16px;
  padding:16px 24px; text-align:center; min-width:260px;
  animation:scandalPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes scandalPop { from{transform:scale(.5) rotate(-5deg)} to{transform:scale(1) rotate(0)} }
#scandal-title { font-size:20px; font-weight:800; color:#fff; margin-bottom:6px; }
#scandal-body  { font-size:13px; color:#ffdddd; margin-bottom:6px; }
#scandal-taps  { font-size:13px; color:#FFD700; font-weight:700; }


/* ── Exploration HUD Top Bar ──────────────────────────── */
#hud-exploration-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: none;
  pointer-events: none;
  gap: 8px;
  z-index: 10;
}

/* Left stats group */
#hud-stats-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.hud-stat-box {
  background: rgba(0,0,20,0.72);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 4px 10px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  backdrop-filter: blur(4px);
  min-width: 90px;
}
.hud-stat-lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.hud-stat-val-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hud-stat-icon { font-size: 14px; }
.text-green { color: #2DC653; }
.text-blue  { color: #4CC9F0; }
#hud-votes {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
#hud-player-count {
  font-size: 16px;
  font-weight: 800;
  color: #4CC9F0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

/* Center timer */
#hud-timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  pointer-events: none;
}
#hud-timer {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,153,51,0.8), 0 2px 6px rgba(0,0,0,0.9);
  letter-spacing: 2px;
  font-family: var(--font);
  background: rgba(0,0,20,0.6);
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,153,51,0.25);
  backdrop-filter: blur(4px);
}
#hud-timer.urgent {
  color: #ff4444;
  animation: urgentBlink 0.4s infinite;
  border-color: rgba(255,68,68,0.5);
  box-shadow: 0 0 12px rgba(255,68,68,0.4);
}

/* Right pause button */
#hud-pause-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: all;
  z-index: 105;
}
#hud-pause-btn {
  width: 42px;
  height: 42px;
  background: rgba(0,0,20,0.72);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.1s;
}
#hud-pause-btn:hover  { background: rgba(255,153,51,0.18); transform: scale(1.06); }
#hud-pause-btn:active { transform: scale(0.94); }
.pause-icon { font-size: 18px; line-height: 1; }

/* ── HUD Skill Action Buttons (Bottom Right) ───────────── */
.hud-skills-row {
  position: absolute;
  bottom: 22px;
  right: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  pointer-events: all;
  z-index: 110;
}
.hud-action-btn {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(0,0,20,0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
}
.hud-action-btn:hover  {
  border-color: rgba(255,153,51,0.6);
  background: rgba(255,153,51,0.15);
  transform: scale(1.05);
}
.hud-action-btn:active { transform: scale(0.93); }
#skill-speed-btn { border-color: rgba(45,198,83,0.4); }
#skill-speed-btn:hover { border-color: rgba(45,198,83,0.8); background: rgba(45,198,83,0.15); }
#skill-rally-btn { border-color: rgba(255,153,51,0.4); }
#skill-rally-btn:hover { border-color: rgba(255,153,51,0.8); background: rgba(255,153,51,0.15); }

.action-icon  { font-size: 24px; line-height: 1; }
.action-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}
.action-lvl-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  background: #2DC653;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── World Map Screen ─────────────────────────────────── */
#world-map-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at 50% 25%, #1a2a40 0%, #0a0e17 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
#world-map-screen.hidden { display: none; }

#wm-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}

.wm-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 64px auto 0;
  padding: 16px 20px 16px;
  align-items: stretch;
  z-index: 2;
  overflow-y: auto;
}
.wm-header-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}
.wm-back-btn {
  width: 42px; height: 42px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff; font-size: 20px; font-weight: bold; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.wm-back-btn:hover  { background: linear-gradient(180deg, #374e64, #212e3e); transform: scale(1.05); }
.wm-back-btn:active { transform: scale(0.95); }
.wm-main-title {
  flex: 1; text-align: center;
  font-weight: 800; font-size: 20px; color: #fff;
  letter-spacing: 2px; text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  margin-right: 42px;
}

.difficulty-select-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  background: rgba(18, 25, 38, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  align-self: center;
  width: 100%;
  max-width: 380px;
}

.difficulty-lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.difficulty-options {
  display: flex;
  background: rgba(10, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
  width: 100%;
}

.difficulty-opt-btn {
  flex: 1;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.difficulty-opt-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.difficulty-opt-btn.btn-easy.active {
  background: linear-gradient(135deg, #2DC653, #138808);
  color: #fff;
  box-shadow: 0 0 12px rgba(45, 198, 83, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.difficulty-opt-btn.btn-medium.active {
  background: linear-gradient(135deg, #FF9933, #FFD700);
  color: #1a1a1a;
  box-shadow: 0 0 12px rgba(255, 153, 81, 0.6);
  text-shadow: none;
}

.difficulty-opt-btn.btn-hard.active {
  background: linear-gradient(135deg, #E63946, #8B0000);
  color: #fff;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
  margin-bottom: 12px;
}
@media (min-width: 600px) {
  .wm-grid { grid-template-columns: repeat(3, 1fr); }
}
.wm-district-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.wm-district-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  border-radius: 14px 14px 0 0;
}
.wm-district-card.complete {
  border-color: rgba(45,198,83,0.4);
  background: rgba(45,198,83,0.06);
}
.wm-district-card.complete::before { background: linear-gradient(90deg,#2DC653,#138808); }
.wm-district-card.complete:hover {
  background: rgba(45,198,83,0.1);
  border-color: rgba(45,198,83,0.65);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(45,198,83,0.2);
}
.wm-district-card.in-progress {
  border-color: rgba(255,153,51,0.5);
  background: rgba(255,153,51,0.07);
}
.wm-district-card.in-progress::before { background: linear-gradient(90deg,#FF9933,#FFD700); }
.wm-district-card.in-progress:hover {
  background: rgba(255,153,51,0.12);
  border-color: rgba(255,215,0,0.7);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255,153,51,0.25);
}
.wm-district-card.locked {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
.wm-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.wm-card-status {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.complete  .wm-card-status { color: #2DC653; }
.in-progress .wm-card-status { color: #FFD700; }
.locked    .wm-card-status { color: #666; }

/* World Map Footer */
.wm-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 4px;
}
.wm-progress-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wm-progress-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.wm-bar-wrap {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.wm-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CC9F0, #2DC653);
  border-radius: 99px;
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(76,201,240,0.5);
}
.wm-progress-percent {
  font-size: 11px;
  font-weight: 800;
  color: #4CC9F0;
}
.wm-reward-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  background: linear-gradient(135deg, #FFD700, #FF9933);
  box-shadow: 0 4px 14px rgba(255,215,0,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 110px;
}
.wm-reward-btn:hover  { transform: scale(1.04); box-shadow: 0 6px 20px rgba(255,215,0,0.5); }
.wm-reward-btn:active { transform: scale(0.95); }
.wm-reward-btn.locked-reward {
  background: rgba(255,255,255,0.07);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.55;
}
.wm-reward-btn.claimed-reward {
  background: rgba(45,198,83,0.2);
  border: 1px solid rgba(45,198,83,0.5);
  box-shadow: none;
  cursor: not-allowed;
}
.reward-lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1a1a1a;
  text-transform: uppercase;
}
.wm-reward-btn.locked-reward .reward-lbl,
.wm-reward-btn.claimed-reward .reward-lbl { color: rgba(255,255,255,0.6); }
.reward-payout-badge {
  font-size: 12px;
  font-weight: 800;
  color: #1a1a1a;
}
.wm-reward-btn.locked-reward .reward-payout-badge,
.wm-reward-btn.claimed-reward .reward-payout-badge { color: rgba(255,255,255,0.5); }

/* ── Menu Screen ──────────────────────────────────────── */

#menu-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.6)), url('../images/menu_background.png') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

/* Top Bar */
#menu-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.menu-top-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 1px;
}
.menu-top-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.currency-pill {
  background: rgba(18, 25, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}
.currency-icon {
  font-size: 14px;
}
.currency-value {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.dropdown-arrow {
  color: #9ab0c4;
  font-size: 8px;
  margin-left: 2px;
}
.menu-settings-btn {
  width: 32px;
  height: 32px;
  background: rgba(18, 25, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, background 0.15s;
}
.menu-settings-btn:hover {
  background: rgba(44, 58, 82, 0.9);
  transform: scale(1.05);
}
.menu-settings-btn:active {
  transform: scale(0.95);
}

/* Two-column layout */
.menu-columns {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 64px auto 84px;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 30px;
  z-index: 2;
}

.menu-left-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.menu-logo-text {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.05;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), 0 2px 24px rgba(0, 0, 0, 0.7);
  transform: rotate(-3.5deg);
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.title-yellow {
  color: #f6c026; /* Beautiful warm election gold yellow */
}
.title-white {
  color: #ffffff;
}
.menu-tagline {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(14px, 2.2vw, 19px);
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.menu-right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 290px;
  align-items: stretch;
}

/* Navigation buttons styling matching the screenshot */
.menu-nav-btn {
  height: 44px;
  border: none;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-play-yellow {
  height: 52px;
  background: linear-gradient(180deg, #f5c432, #d19a15);
  color: #1a1a1a;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  text-shadow: none;
  box-shadow: 0 4px 15px rgba(245, 196, 50, 0.35), inset 0 2px 0 rgba(255,255,255,0.25);
  margin-bottom: 4px;
}
.btn-play-yellow:hover {
  background: linear-gradient(180deg, #ffd752, #e5ab1b);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(245, 196, 50, 0.55);
}
.btn-play-yellow:active {
  transform: translateY(1px);
}

.btn-char, .btn-upgrade, .btn-inventory, .btn-leaderboard, .btn-tutorial, .btn-settings {
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  color: #a9c6e2;
  border: 1px solid rgba(76, 201, 240, 0.15);
  border-top: 2px solid rgba(76, 201, 240, 0.45);
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}
.menu-nav-btn:not(.btn-play-yellow):hover {
  background: linear-gradient(180deg, #364e64, #212e3e);
  border-top-color: rgba(76, 201, 240, 0.75);
  color: #fff;
  transform: translateY(-1px);
}
.menu-nav-btn:not(.btn-play-yellow):active {
  transform: translateY(1px);
}

/* Bottom Bar */
.menu-bottom-bar {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
  z-index: 10;
}
.menu-bottom-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #9ab0c4;
  font-family: var(--font);
  transition: color 0.15s, transform 0.15s;
}
.menu-bottom-btn:hover {
  color: #fff;
  transform: translateY(-2px);
}
.bottom-icon-container {
  position: relative;
  width: 50px;
  height: 50px;
  background: rgba(18, 25, 38, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transition: border-color 0.15s, background 0.15s;
}
.menu-bottom-btn:hover .bottom-icon-container {
  border-color: rgba(255, 153, 51, 0.75);
  background: rgba(255, 153, 51, 0.18);
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.35);
}
.bottom-icon {
  font-size: 24px;
}
.bottom-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  animation: pulseGlow 1.5s infinite alternate;
}
@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 68, 68, 0.7); }
  100% { transform: scale(1.15); box-shadow: 0 0 8px rgba(255, 68, 68, 0.9); }
}

/* City selection modal and grid */
#city-select-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#city-select-modal.hidden {
  display: none;
}
.city-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}
.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.city-card.unlocked {
  border-color: rgba(255, 153, 51, 0.45);
  background: rgba(255, 153, 51, 0.08);
}
.city-card.unlocked:hover {
  background: rgba(255, 153, 51, 0.14);
}
.city-card.selected {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.16);
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}
.city-card.locked {
  opacity: 0.35;
  cursor: default;
}
.city-card .cc-icon {
  font-size: 24px;
}
.city-card .cc-name {
  font-size: 11px;
  font-weight: 700;
  color: #eee;
}
.city-card .cc-target {
  font-size: 9px;
  color: #ffd700;
  font-weight: 600;
}
.city-card .cc-lock {
  font-size: 13px;
  color: #aaa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-columns {
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin: 60px auto 84px;
    padding: 0 24px;
  }
  .menu-left-panel {
    align-items: center;
    text-align: center;
  }
  .menu-logo-text {
    transform: rotate(-2deg);
    margin-bottom: 6px;
  }
  .menu-right-panel {
    width: 100%;
    max-width: 270px;
  }
}
@media (max-width: 480px) {
  .menu-columns {
    gap: 15px;
    margin: 52px auto 84px;
  }
  .menu-bottom-bar {
    gap: 20px;
    bottom: 12px;
  }
}

/* ── Result Screen ────────────────────────────────────── */
#result-screen {
  position:fixed; inset:0; z-index:600;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.7); backdrop-filter:blur(6px);
}
#result-screen.hidden { display:none; }
#result-card {
  background:rgba(0,0,30,.95); border:2px solid rgba(255,215,0,.5);
  border-radius:24px; padding:28px 24px; text-align:center;
  width:min(340px,88vw); animation:cardIn .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes cardIn { from{transform:scale(.6) translateY(40px);opacity:0} to{transform:scale(1);opacity:1} }
#result-icon { font-size:64px; animation:rBounce 1s infinite alternate; }
#result-title { font-size:26px; font-weight:800; margin:8px 0 4px; }
#result-city { font-size:13px; color:#8888aa; letter-spacing:2px; margin-bottom:12px; }
#result-stats { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.rs-row { display:flex; justify-content:space-between; padding:6px 12px; background:rgba(255,255,255,.04); border-radius:8px; }
.rs-label { font-size:14px; color:#888; }
.rs-val   { font-size:14px; font-weight:700; color:#fff; }
#result-hint { font-size:12px; margin-bottom:16px; border-radius:8px; padding:8px; }
#result-buttons { display:flex; flex-direction:column; gap:8px; }
.btn-result-primary {
  width:100%; height:50px; font-size:18px; font-weight:800;
  background:linear-gradient(135deg,#FF9933,#FFB84D); color:#fff;
  border:none; border-radius:var(--radius); cursor:pointer; font-family:var(--font);
  transition:transform .15s, box-shadow .15s;
}
.btn-result-primary:hover { box-shadow:0 4px 15px rgba(255,153,51,0.5); transform:translateY(-1px); }
.btn-result-primary:active { transform:scale(.96); }
.btn-result-sec {
  width:100%; height:42px; font-size:15px; font-weight:700;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15);
  border-radius:var(--radius); color:#ccc; cursor:pointer; font-family:var(--font);
  transition:background .15s, transform .1s;
}
.btn-result-sec:hover { background:rgba(255,255,255,.12); color:#fff; }
.btn-result-sec:active { transform:scale(.96); }

/* Confetti */
#result-confetti { position:fixed; inset:0; pointer-events:none; z-index:595; overflow:hidden; }
.confetti-piece {
  position:absolute; width:10px; height:10px; border-radius:2px;
  animation:confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform:translateY(-20px) rotate(0deg); opacity:1; }
  100% { transform:translateY(110vh) rotate(720deg); opacity:0; }
}

/* ── Modal ────────────────────────────────────────────── */
#modal-overlay {
  position:fixed; inset:0; z-index:700;
  background:rgba(0,0,0,.75); display:flex; align-items:center; justify-content:center;
}
#modal-overlay.hidden { display:none; }
#modal-card {
  background:rgba(0,0,30,.97); border:2px solid rgba(255,153,51,.4);
  border-radius:20px; padding:24px; width:min(320px,88vw); display:flex;
  flex-direction:column; gap:14px; animation:cardIn .3s cubic-bezier(.34,1.56,.64,1);
}
#modal-content { display:flex; flex-direction:column; gap:10px; }
.modal-title { font-size:20px; font-weight:800; color:#FF9933; text-align:center; }
.modal-row { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid rgba(255,255,255,.06); }
.modal-label { color:#888; font-size:14px; }
.modal-val   { color:#FFD700; font-size:14px; font-weight:700; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #ccc;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.btn-secondary:hover  { background: rgba(255,255,255,0.14); color: #fff; }
.btn-secondary:active { transform: scale(0.95); }

/* ── Character Selection Screen ────────────────────── */
#char-select-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at 50% 30%, #152233, #0a0e17 75%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
#char-select-screen.hidden {
  display: none;
}

#char-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.char-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 64px auto 0;
  padding: 16px 24px 24px;
  justify-content: space-between;
  align-items: stretch;
  z-index: 2;
}

.char-header-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 12px;
}

.char-back-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.15s, transform 0.1s;
}
.char-back-btn:hover {
  background: linear-gradient(180deg, #374e64, #212e3e);
  transform: scale(1.05);
}
.char-back-btn:active {
  transform: scale(0.95);
}

.char-main-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  margin-right: 42px; /* balance out the back button offset */
}

/* Responsive grid for character selection */
.char-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  flex: 1;
  margin-bottom: 16px;
  align-items: stretch;
}

.char-card {
  background: rgba(18, 25, 38, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.char-card:hover:not(.selected):not(.locked) {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Selected state - glowing green */
.char-card.selected {
  border-color: #2dc653;
  box-shadow: 0 0 15px rgba(45, 198, 83, 0.35);
  transform: scale(1.02);
}

.char-card-header {
  padding: 6px 12px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.char-card.selected .char-card-header {
  background: #2dc653;
  color: #1a1a1a;
}

.char-portrait-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.5));
}
.char-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Grayscale/Lock state for locked characters */
.char-card.locked .char-portrait {
  filter: grayscale(100%) brightness(50%);
}
.char-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}
.char-lock-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  font-size: 18px;
  color: #333;
}

/* Selected green card inner gradient */
.char-card.selected .char-portrait-container {
  background: radial-gradient(circle, rgba(45, 198, 83, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Card Stats Panel (at the bottom of the card) */
.char-stats-panel {
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.char-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.char-stat-label {
  font-size: 9px;
  font-weight: 800;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.char-card.selected .char-stat-label {
  color: #aaa;
}
.char-stat-blocks {
  display: flex;
  gap: 2px;
}
.char-block {
  width: 14px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}
.char-block.filled {
  background: #2dc653; /* green stats blocks */
  box-shadow: 0 0 4px rgba(45, 198, 83, 0.5);
}

/* Footer Section */
.char-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(18, 25, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  gap: 20px;
}

.char-ability-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.char-ability-title {
  font-size: 11px;
  font-weight: bold;
  color: #ffd700;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.char-ability-desc {
  font-size: 13px;
  color: #eee;
  font-weight: 600;
}

.char-select-btn {
  width: 200px;
  height: 48px;
  background: linear-gradient(180deg, #f5c432, #d19a15);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 196, 50, 0.35), inset 0 2px 0 rgba(255,255,255,0.25);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.char-select-btn:hover {
  background: linear-gradient(180deg, #ffd752, #e5ab1b);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 196, 50, 0.5);
}
.char-select-btn:active {
  transform: translateY(1px);
}

.char-select-btn.locked-btn {
  background: linear-gradient(180deg, #e63946, #c1121f);
  color: #fff;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.35), inset 0 2px 0 rgba(255,255,255,0.25);
}
.char-select-btn.locked-btn:hover {
  background: linear-gradient(180deg, #ff4d5a, #d91624);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

/* Character Selection screen responsiveness */
@media (max-width: 768px) {
  .char-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .char-content {
    margin-top: 56px;
    padding: 10px 16px 16px;
  }
  .char-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px 14px;
  }
  .char-select-btn {
    width: 100%;
    height: 44px;
  }
}
@media (max-width: 480px) {
  .char-main-title {
    font-size: 16px;
  }
}

/* ── Skill Tree Screen ────────────────────────────── */
#skill-tree-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at 50% 30%, #152233, #0a0e17 75%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
#skill-tree-screen.hidden {
  display: none;
}

#skill-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.skill-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 60px auto 0;
  padding: 16px 24px 24px;
  justify-content: space-between;
  align-items: stretch;
  z-index: 2;
}

.skill-header-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 12px;
}

.skill-back-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.15s, transform 0.1s;
}
.skill-back-btn:hover {
  background: linear-gradient(180deg, #374e64, #212e3e);
  transform: scale(1.05);
}
.skill-back-btn:active {
  transform: scale(0.95);
}

.skill-main-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  margin-right: 42px;
  text-transform: uppercase;
}

/* Category column tabs */
.skill-categories-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
  margin-bottom: 10px;
}
.skill-cat-header {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  color: #fff;
  padding: 5px 0;
  border-radius: 6px;
  margin: 0 15px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  text-shadow: 0 2px 3px rgba(0,0,0,0.5);
}
.cat-leadership {
  background: linear-gradient(180deg, #44803F, #2B5727);
  border: 1px solid rgba(68, 128, 63, 0.4);
}
.cat-power {
  background: linear-gradient(180deg, #883333, #5F2222);
  border: 1px solid rgba(136, 51, 51, 0.4);
}
.cat-support {
  background: linear-gradient(180deg, #2A5A8F, #1C3C64);
  border: 1px solid rgba(42, 90, 143, 0.4);
}

/* Main tree board wrapper */
.skill-tree-container {
  flex: 1;
  position: relative;
  width: 100%;
  background: rgba(18, 25, 38, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* SVG Overlay for drawing connections */
.skill-svg-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.skill-svg-connections line {
  stroke: #2c3e50;
  stroke-width: 3;
}

/* Node layout positioning wrapper */
.skill-nodes-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Base style for individual skill circle nodes */
.skill-node {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #253346 0%, #151e2a 100%);
  border: 2px solid #3c526d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%); /* centers coordinates */
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.skill-node:hover:not(.selected-node):not(.locked-node) {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Stat counter overlay under circles (e.g. 3/5) */
.skill-progress-tag {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-weight: 800;
  font-size: 11px;
  color: #a9c6e2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Node skin glows based on selected/upgraded levels */
.skill-node.selected-node {
  border-color: #2dc653; /* Leadership color / active selection */
  box-shadow: 0 0 12px rgba(45, 198, 83, 0.45);
  transform: translate(-50%, -50%) scale(1.05);
}
.skill-node.selected-node .skill-progress-tag {
  color: #fff;
  font-weight: bold;
}

.skill-node.purple-node {
  border-color: #9c27b0; /* Power purple selection */
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.45);
}
.skill-node.blue-node {
  border-color: #00e5ff; /* Support blue selection */
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.skill-node.locked-node {
  opacity: 0.35;
  border-color: #1a222f;
  cursor: default;
}
.skill-node.locked-node .skill-progress-tag {
  opacity: 0.6;
}

.skill-icon-img {
  font-size: 20px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.skill-node.locked-node .skill-icon-img {
  filter: grayscale(100%) opacity(40%);
}

/* Active glowing blue nodes */
.skill-node.glowing-node {
  animation: skillPulse 1.8s infinite alternate;
}
@keyframes skillPulse {
  0% { box-shadow: 0 0 5px rgba(0, 229, 255, 0.3); border-color: #00bcd4; }
  100% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.7); border-color: #00e5ff; }
}

/* Footer elements */
.skill-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(18, 25, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  gap: 20px;
}

.skill-points-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 4px 14px 4px 6px;
  height: 38px;
}
.skill-points-label {
  font-size: 11px;
  font-weight: 800;
  color: #9ab0c4;
  letter-spacing: 1px;
  margin-left: 8px;
}
.skill-points-badge {
  background: #2dc653;
  color: #1a1a1a;
  font-weight: 800;
  font-size: 13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(45, 198, 83, 0.6);
}

.skill-reset-btn {
  width: 140px;
  height: 38px;
  background: linear-gradient(180deg, #f5c432, #d19a15);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(245, 196, 50, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.skill-reset-btn:hover {
  background: linear-gradient(180deg, #ffd752, #e5ab1b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 196, 50, 0.45);
}
.skill-reset-btn:active {
  transform: translateY(1px);
}

/* Skills Tree screen responsiveness */
@media (max-width: 768px) {
  .skill-content {
    margin-top: 56px;
    padding: 10px 16px 16px;
  }
  .skill-categories-row {
    padding: 0;
  }
  .skill-cat-header {
    font-size: 10px;
    margin: 0 4px;
  }
  .skill-tree-container {
    height: 340px;
  }
  .skill-footer {
    padding: 10px 16px;
  }
  .skill-points-pill {
    padding: 4px 10px 4px 4px;
  }
}

/* Decorative menu roaches */
#menu-roaches {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.deco-roach {
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  animation: roachWander linear infinite alternate;
}
@keyframes roachWander {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(25px, -15px) rotate(15deg); }
  100% { transform: translate(-15px, 20px) rotate(-15deg); }
}

/* ── Inventory Screen ────────────────────────────── */
#inventory-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at 50% 30%, #152233, #0a0e17 75%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
#inventory-screen.hidden {
  display: none;
}

#inv-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.inv-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 60px auto 0;
  padding: 16px 24px 24px;
  justify-content: space-between;
  align-items: stretch;
  z-index: 2;
}

.inv-header-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 12px;
}

.inv-back-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.15s, transform 0.1s;
}
.inv-back-btn:hover {
  background: linear-gradient(180deg, #374e64, #212e3e);
  transform: scale(1.05);
}
.inv-back-btn:active {
  transform: scale(0.95);
}

.inv-main-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  margin-right: 42px;
  text-transform: uppercase;
}

/* Two-column layout */
.inv-columns {
  display: flex;
  flex: 1;
  width: 100%;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 15px;
  min-height: 0;
}

/* Grid Column (Left) */
.inv-grid-panel {
  flex: 1.5;
  background: rgba(18, 25, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
}

/* Item Slot Card */
.inv-item-card {
  background: rgba(10, 15, 25, 0.85);
  border: 2px solid #3c526d;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.inv-item-card:hover:not(.selected):not(.empty-slot) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Selected state - golden border */
.inv-item-card.selected {
  border-color: #f5c432 !important;
  box-shadow: 0 0 12px rgba(245, 196, 50, 0.45);
  transform: scale(1.03);
}

/* Rarity border styles */
.inv-item-card.rarity-common { border-color: rgba(154, 176, 196, 0.35); }
.inv-item-card.rarity-uncommon { border-color: rgba(45, 198, 83, 0.5); }
.inv-item-card.rarity-rare { border-color: rgba(245, 196, 50, 0.6); }
.inv-item-card.rarity-epic { border-color: rgba(156, 39, 176, 0.6); }
.inv-item-card.rarity-legendary { border-color: rgba(230, 57, 70, 0.7); }

/* Quantity Badge (bottom right) */
.inv-item-qty {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #a9c6e2;
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.inv-item-card.selected .inv-item-qty {
  color: #fff;
  background: rgba(245, 196, 50, 0.3);
}

/* Equipped Badge (top left) */
.inv-item-equipped-badge {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 9px;
  font-weight: 800;
  color: #1a1a1a;
  background: #2dc653;
  padding: 1px 5px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(45, 198, 83, 0.4);
}

/* Item Slot Icon */
.inv-item-icon {
  font-size: 32px;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
  transition: transform 0.2s;
}
.inv-item-card:hover:not(.empty-slot) .inv-item-icon {
  transform: scale(1.1);
}
.inv-item-card.empty-slot {
  opacity: 0.2;
  cursor: default;
  border-color: rgba(255,255,255,0.05);
}

/* Detail Card Column (Right) */
.inv-detail-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.inv-detail-card {
  background: rgba(18, 25, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  justify-content: center;
}

.inv-detail-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0,0,0,0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.inv-detail-icon {
  font-size: 48px;
  animation: floatAnim 3s ease-in-out infinite alternate;
  display: inline-block;
}
@keyframes floatAnim {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.inv-detail-name {
  font-family: var(--font);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.inv-detail-rarity {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.inv-detail-rarity.rarity-common { color: #9ab0c4; }
.inv-detail-rarity.rarity-uncommon { color: #2dc653; }
.inv-detail-rarity.rarity-rare { color: #f5c432; }
.inv-detail-rarity.rarity-epic { color: #9c27b0; }
.inv-detail-rarity.rarity-legendary { color: #e63946; }

.inv-detail-desc {
  font-size: 13px;
  color: #ccc;
  line-height: 1.45;
  margin-bottom: 24px;
  max-width: 220px;
  min-height: 38px;
}

.inv-detail-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-action-btn {
  width: 100%;
  height: 40px;
  border: none;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.inv-action-btn:hover {
  transform: translateY(-1.5px);
}
.inv-action-btn:active {
  transform: scale(0.97);
}

.btn-equip {
  background: linear-gradient(180deg, #44803F, #2B5727);
  color: #fff;
  border: 1px solid rgba(68, 128, 63, 0.4);
}
.btn-equip:hover {
  background: linear-gradient(180deg, #52944c, #33662e);
  box-shadow: 0 5px 12px rgba(68, 128, 63, 0.5);
}
.btn-equip.unequip-mode {
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}
.btn-equip.unequip-mode:hover {
  background: linear-gradient(180deg, #374e64, #212e3e);
}

.btn-sell {
  background: linear-gradient(180deg, #883333, #5F2222);
  color: #fff;
  border: 1px solid rgba(136, 51, 51, 0.4);
}
.btn-sell:hover {
  background: linear-gradient(180deg, #9e3d3d, #722727);
  box-shadow: 0 5px 12px rgba(136, 51, 51, 0.5);
}

/* Tabs Selectors */
.inv-tabs-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.inv-tab-btn {
  height: 38px;
  padding: 0 20px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  color: #a9c6e2;
  border: 1px solid rgba(76, 201, 240, 0.15);
  border-top: 2px solid rgba(76, 201, 240, 0.35);
  border-radius: 6px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.inv-tab-btn:hover {
  background: linear-gradient(180deg, #364e64, #212e3e);
  color: #fff;
}
.inv-tab-btn.active {
  background: linear-gradient(180deg, #e5ab1b, #a0740a);
  border-color: rgba(245, 196, 50, 0.3);
  border-top: 2px solid #ffd700;
  color: #fff;
  box-shadow: 0 3px 8px rgba(245, 196, 50, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .inv-content {
    margin-top: 56px;
    padding: 10px 16px 16px;
  }
  .inv-columns {
    flex-direction: column;
    overflow-y: auto;
    gap: 16px;
  }
  .inv-grid-panel {
    flex: none;
  }
  .inv-detail-panel {
    flex: none;
  }
  .inv-tabs-row {
    justify-content: center;
  }
}

/* ── World Map Selection Screen ────────────────────── */
#world-map-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at 50% 30%, #152233, #0a0e17 75%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
#world-map-screen.hidden {
  display: none;
}

#wm-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.wm-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 64px auto 0;
  padding: 16px 24px 24px;
  justify-content: space-between;
  align-items: stretch;
  z-index: 2;
}

.wm-header-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 12px;
}

.wm-back-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.15s, transform 0.1s;
}
.wm-back-btn:hover {
  background: linear-gradient(180deg, #374e64, #212e3e);
  transform: scale(1.05);
}
.wm-back-btn:active {
  transform: scale(0.95);
}

.wm-main-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  margin-right: 42px;
  text-transform: uppercase;
}

/* 3x2 Grid for District Cards */
.wm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  flex: 1;
  margin-bottom: 20px;
  align-items: stretch;
}

/* District Card: cloud splat container shape using CSS clip-path or border-radius */
.wm-district-card {
  position: relative;
  background: rgba(10, 15, 25, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 20px 10px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  
  /* Create organic cloud/splat shape border */
  border: 3px solid #3c526d;
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  animation: floatDistrict 4s ease-in-out infinite alternate;
}

/* Make each card float slightly out of sync */
.wm-district-card:nth-child(even) {
  border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
  animation-duration: 4.8s;
  animation-delay: -1s;
}
.wm-district-card:nth-child(3n) {
  border-radius: 50% 50% 30% 70% / 40% 60% 40% 60%;
  animation-duration: 5.5s;
  animation-delay: -2s;
}

@keyframes floatDistrict {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-4px) rotate(0.8deg); }
}

.wm-district-card:hover:not(.locked) {
  transform: translateY(-5px) scale(1.03) !important;
  z-index: 10;
}

/* Status colors and glowing rings matching screenshot */
.wm-district-card.complete {
  border-color: #2dc653;
  box-shadow: 0 0 16px rgba(45, 198, 83, 0.4), inset 0 0 20px rgba(45, 198, 83, 0.15);
  background: radial-gradient(circle at 50% 50%, rgba(20, 45, 25, 0.9) 0%, rgba(10, 15, 25, 0.95) 100%);
}
.wm-district-card.complete:hover {
  box-shadow: 0 0 24px rgba(45, 198, 83, 0.65), inset 0 0 30px rgba(45, 198, 83, 0.25);
}

.wm-district-card.in-progress {
  border-color: #f5c432;
  box-shadow: 0 0 16px rgba(245, 196, 50, 0.4), inset 0 0 20px rgba(245, 196, 50, 0.15);
  background: radial-gradient(circle at 50% 50%, rgba(55, 45, 15, 0.9) 0%, rgba(10, 15, 25, 0.95) 100%);
}
.wm-district-card.in-progress:hover {
  box-shadow: 0 0 24px rgba(245, 196, 50, 0.65), inset 0 0 30px rgba(245, 196, 50, 0.25);
}

.wm-district-card.locked {
  border-color: #2a3545;
  opacity: 0.5;
  cursor: default;
  background: rgba(10, 15, 25, 0.95);
  box-shadow: none;
}

/* Inside Card Text */
.wm-card-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wm-card-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.wm-district-card.complete .wm-card-status {
  color: #2dc653;
  text-shadow: 0 0 8px rgba(45, 198, 83, 0.5);
}
.wm-district-card.in-progress .wm-card-status {
  color: #f5c432;
  text-shadow: 0 0 8px rgba(245, 196, 50, 0.5);
}
.wm-district-card.locked .wm-card-status {
  color: #888;
}

/* Map backdrop texture layout inside card using CSS patterns */
.wm-district-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(rgba(255,255,255,0.02) 2px, transparent 2px);
  background-size: 8px 8px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

/* Footer Section */
.wm-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(18, 25, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  gap: 20px;
}

/* Progress Panel (Left) */
.wm-progress-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.wm-progress-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 1px;
}
.wm-bar-wrap {
  flex: 1;
  max-width: 250px;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}
.wm-bar {
  height: 100%;
  background: linear-gradient(90deg, #f5c432, #d19a15);
  border-radius: 99px;
  box-shadow: 0 0 6px #f5c432;
  transition: width 0.4s ease;
}
.wm-progress-percent {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

/* Next Reward Button (Right) */
.wm-reward-btn {
  height: 38px;
  padding: 0 6px 0 14px;
  background: linear-gradient(180deg, #44803F, #2B5727);
  border: 1px solid rgba(68, 128, 63, 0.4);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.wm-reward-btn:hover:not(.locked-reward):not(.claimed-reward) {
  background: linear-gradient(180deg, #52944c, #33662e);
  transform: translateY(-1.5px);
  box-shadow: 0 5px 12px rgba(68, 128, 63, 0.5);
}
.wm-reward-btn:active:not(.locked-reward):not(.claimed-reward) {
  transform: scale(0.97);
}

.reward-lbl {
  font-family: var(--font);
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  letter-spacing: 1px;
}
.reward-payout-badge {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 3px 10px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #ffd700;
}

.wm-reward-btn.locked-reward {
  opacity: 0.4;
  background: linear-gradient(180deg, #2b3d4f, #1b2633);
  border-color: rgba(255,255,255,0.1);
  cursor: default;
  box-shadow: none;
}
.wm-reward-btn.claimed-reward {
  opacity: 0.6;
  background: linear-gradient(180deg, #1b2633, #0f1720);
  border-color: rgba(255,255,255,0.05);
  cursor: default;
  box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wm-content {
    margin-top: 56px;
    padding: 10px 16px 16px;
  }
  .wm-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
  }
  .wm-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px 14px;
  }
  .wm-progress-panel {
    justify-content: space-between;
  }
  .wm-reward-btn {
    justify-content: center;
    width: 100%;
  }
}

/* ── Exploration HUD Redesign ─────────────────────────── */
#hud-exploration-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
  pointer-events: none;
  background: none !important;
}

#hud-title-banner {
  background: rgba(10, 15, 25, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 2px;
  align-self: flex-start;
  pointer-events: none;
}

#hud-stats-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.hud-stat-box {
  background: rgba(10, 15, 25, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  width: 120px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  font-family: var(--font);
  box-sizing: border-box;
}

.hud-stat-lbl {
  display: block;
  font-size: 8px;
  font-weight: 800;
  color: #888;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.hud-stat-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.hud-stat-val-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-stat-trend {
  font-size: 13px;
  font-weight: bold;
  margin-left: auto;
}

.hud-stat-icon {
  font-size: 16px;
}
.text-green { color: #2dc653; }
.text-blue  { color: #4cc9f0; }
.text-grey  { color: #888; }

#hud-timer-wrap {
  pointer-events: auto;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 2px;
}

#hud-timer {
  font-family: var(--font);
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 15px rgba(255, 153, 51, 0.3);
  letter-spacing: 1.5px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#hud-pause-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  pointer-events: auto;
  z-index: 105;
}

#hud-pause-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transition: transform 0.1s, background 0.15s;
}
#hud-pause-btn:hover {
  background: rgba(20, 30, 45, 0.95);
  transform: scale(1.05);
}
#hud-pause-btn:active {
  transform: scale(0.95);
}

/* Bottom Right Action Skill Buttons */
.hud-skills-row {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: auto;
}

.hud-action-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.hud-action-btn {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(10, 15, 25, 0.88);
  border: 2.5px solid #ff9933;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.5);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  overflow: hidden;
  padding: 0;
  pointer-events: auto;
}

#skill-speed-btn {
  border-color: #2dc653;
  box-shadow: 0 0 10px rgba(45, 198, 83, 0.25);
}
#skill-speed-btn:hover {
  box-shadow: 0 0 18px rgba(45, 198, 83, 0.55);
  transform: scale(1.05);
}

#skill-rally-btn {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}
#skill-rally-btn:hover {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.hud-action-btn:active {
  transform: scale(0.95);
}

.action-icon {
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-action-btn-label {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.action-lvl-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ffd700;
  color: #000;
  font-size: 8px;
  font-weight: 800;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 10;
}

.cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  height: 0%;
  transition: height 0.1s linear;
  pointer-events: none;
  z-index: 5;
}


/* ══════════════════════════════════════════════════════════
   CROWD BATTLE SCREEN
   ══════════════════════════════════════════════════════════ */
#battle-screen {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(230,57,70,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(76,201,240,0.2) 0%, transparent 55%),
    linear-gradient(180deg, #0a0010 0%, #100020 50%, #0a001a 100%);
  overflow: hidden;
  padding: 0 16px 16px;
}
#battle-screen.hidden { display: none; }

/* Animated scanline overlay for battle atmosphere */
#battle-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Battle Header ── */
.battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 18px 8px 10px;
  position: relative;
  z-index: 1;
  gap: 10px;
}

.battle-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.enemy-side { align-items: flex-end; }

.battle-side-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}
.enemy-side .battle-side-label { text-align: right; }

.battle-hp-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
}
.battle-hp-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.player-hp-bar {
  background: linear-gradient(90deg, #4CC9F0, #2DC653);
  box-shadow: 0 0 8px rgba(76,201,240,0.6);
}
.enemy-hp-bar {
  background: linear-gradient(90deg, #e63946, #c1121f);
  box-shadow: 0 0 8px rgba(230,57,70,0.6);
  margin-left: auto;
}

.battle-side-count {
  display: flex;
  align-items: center;
  gap: 6px;
}
.battle-avatar-sm {
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(76,201,240,0.7));
}
.enemy-roach {
  filter: drop-shadow(0 0 6px rgba(230,57,70,0.7)) scaleX(-1);
  transform: scaleX(-1);
}
.battle-count-num {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1;
}

/* ── VS Badge ── */
.battle-vs-badge {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vs-text {
  position: relative;
  z-index: 2;
  font-size: 24px;
  font-weight: 800;
  color: #FFD700;
  text-shadow: 0 0 12px #FF9933, 0 2px 4px #000;
  letter-spacing: 2px;
  animation: vsPulse 1.5s ease-in-out infinite alternate;
}
@keyframes vsPulse {
  from { transform: scale(1); text-shadow: 0 0 10px #FF9933; }
  to   { transform: scale(1.12); text-shadow: 0 0 20px #FFD700, 0 0 30px #FF9933; }
}
.vs-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255,215,0,0.5);
  border-radius: 50%;
  animation: vsRingSpin 3s linear infinite;
}
@keyframes vsRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Battle Arena ── */
.battle-arena {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: 540px;
  flex: 1;
  position: relative;
  z-index: 1;
  min-height: 160px;
}

.battle-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fighter-roach {
  font-size: 72px;
  filter: drop-shadow(0 0 16px rgba(76,201,240,0.5));
  line-height: 1;
}
.player-roach-anim {
  animation: playerFighterBob 0.9s ease-in-out infinite alternate;
}
@keyframes playerFighterBob {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-8px) scale(1.05); }
}
.enemy-roach-anim {
  transform: scaleX(-1);
  filter: drop-shadow(0 0 14px rgba(230,57,70,0.55)) scaleX(-1);
  animation: enemyFighterBob 1.1s ease-in-out infinite alternate;
}
@keyframes enemyFighterBob {
  from { transform: scaleX(-1) translateY(0); }
  to   { transform: scaleX(-1) translateY(-6px); }
}
.fighter-shadow {
  width: 50px;
  height: 10px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.4), transparent);
  border-radius: 50%;
  margin-top: -4px;
}

.battle-clash-sparks {
  font-size: 40px;
  animation: sparkFlash 0.7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px #FFD700);
}
@keyframes sparkFlash {
  from { transform: scale(0.9) rotate(-10deg); opacity: 0.7; }
  to   { transform: scale(1.15) rotate(10deg); opacity: 1; }
}

/* ── Battle Log ── */
.battle-log-wrap {
  width: 100%;
  max-width: 540px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,153,51,0.3);
  border-radius: 10px;
  padding: 10px 16px;
  margin: 8px 0;
  position: relative;
  z-index: 1;
}
.battle-log {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.5px;
}
@keyframes battleLogPop {
  0%   { transform: scale(0.95); opacity: 0.6; }
  60%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── Energy Bar ── */
.battle-energy-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 540px;
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}
.energy-label {
  font-size: 11px;
  font-weight: 700;
  color: #FFD700;
  white-space: nowrap;
  letter-spacing: 1px;
}
.energy-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.2);
}
.energy-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FF9933);
  border-radius: 99px;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px rgba(255,215,0,0.5);
}

/* ── Action Buttons ── */
.battle-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  width: 100%;
  max-width: 540px;
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

.battle-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14px 22px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 100px;
  position: relative;
  overflow: hidden;
}
.battle-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}
.battle-action-btn:active { transform: scale(0.93) !important; }
.battle-action-btn:hover  { transform: scale(1.05); }

.attack-btn {
  background: linear-gradient(135deg, #e63946, #9d0208);
  box-shadow: 0 6px 20px rgba(230,57,70,0.4), 0 0 0 1px rgba(255,255,255,0.1);
}
.attack-btn:hover { box-shadow: 0 8px 28px rgba(230,57,70,0.6), 0 0 0 1px rgba(255,255,255,0.2); }

.special-btn {
  background: linear-gradient(135deg, #FF9933, #e07d15);
  box-shadow: 0 6px 20px rgba(255,153,51,0.4), 0 0 0 1px rgba(255,255,255,0.1);
}
.special-btn:hover { box-shadow: 0 8px 28px rgba(255,153,51,0.6), 0 0 0 1px rgba(255,255,255,0.2); }

.baction-icon  { font-size: 26px; line-height: 1; }
.baction-label {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.baction-cost {
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ── Flee button ── */
.battle-flee-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  font-family: var(--font);
  z-index: 10;
  letter-spacing: 1px;
  transition: color 0.15s, background 0.15s;
}
.battle-flee-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
}

/* ══════════════════════════════════════════════════════════
   BOSS FIGHT SCREEN
   ══════════════════════════════════════════════════════════ */
#boss-screen {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(180,0,0,0.5) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 100%, rgba(255,153,51,0.15) 0%, transparent 50%),
    linear-gradient(180deg, #050005 0%, #120010 60%, #0a0010 100%);
  overflow: hidden;
  padding: 0 16px 20px;
}
#boss-screen.hidden { display: none; }

/* Dramatic vignette */
#boss-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Boss Header ── */
.boss-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 10px;
  position: relative;
  z-index: 1;
}
.boss-district {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,100,100,0.8);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.boss-name {
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
  background: linear-gradient(135deg, #FFD700, #FF9933, #FF4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(255,80,0,0.6));
  animation: bossNameGlow 2s ease-in-out infinite alternate;
}
@keyframes bossNameGlow {
  from { filter: drop-shadow(0 0 8px rgba(255,80,0,0.5)); }
  to   { filter: drop-shadow(0 0 20px rgba(255,150,0,0.9)); }
}

/* ── Boss HP Bar ── */
.boss-hp-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
  padding: 0 8px;
  margin-bottom: 6px;
}
.boss-hp-wrap {
  width: 100%;
  height: 18px;
  background: rgba(0,0,0,0.55);
  border-radius: 99px;
  overflow: hidden;
  border: 1.5px solid rgba(230,57,70,0.6);
  box-shadow: 0 0 12px rgba(230,57,70,0.3), inset 0 1px 3px rgba(0,0,0,0.5);
}
.boss-hp-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #e63946, #c1121f);
  transition: width 0.5s ease, background 0.5s ease;
  box-shadow: 0 0 10px rgba(230,57,70,0.5);
  position: relative;
}
.boss-hp-bar::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  right: 5px; height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 99px;
}
.boss-hp-text {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #000;
}

/* ── Boss Arena ── */
.boss-arena {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 100%;
}
.boss-avatar-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.boss-glow-ring {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid rgba(230,57,70,0.4);
  box-shadow: 0 0 40px rgba(230,57,70,0.3), inset 0 0 40px rgba(230,57,70,0.1);
  animation: bossRingPulse 1.8s ease-in-out infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes bossRingPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.6; }
  50%      { transform: translate(-50%,-50%) scale(1.12); opacity: 1; }
}
.boss-avatar {
  font-size: 110px;
  line-height: 1;
  filter: drop-shadow(0 0 24px rgba(200,0,0,0.7))
          drop-shadow(0 8px 16px rgba(0,0,0,0.8));
  animation: bossFighterFloat 1.4s ease-in-out infinite alternate;
  position: relative;
  z-index: 1;
}
@keyframes bossFighterFloat {
  from { transform: translateY(0) scale(1) rotate(-2deg); }
  to   { transform: translateY(-14px) scale(1.06) rotate(2deg); }
}
.boss-shadow {
  width: 90px;
  height: 18px;
  background: radial-gradient(ellipse, rgba(200,0,0,0.3), transparent);
  border-radius: 50%;
  margin-top: -12px;
  animation: bossShadowPulse 1.4s ease-in-out infinite alternate;
}
@keyframes bossShadowPulse {
  from { transform: scale(1); opacity: 0.5; }
  to   { transform: scale(0.8); opacity: 0.3; }
}

/* ── Boss log ── */
.boss-log-wrap {
  border-color: rgba(230,57,70,0.35);
}
.boss-log { color: #ffcccc; }

/* ── Player HP ── */
.boss-player-hp-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
  padding: 0 8px;
  margin-bottom: 10px;
}
.boss-player-hp-label {
  font-size: 10px;
  font-weight: 800;
  color: #4CC9F0;
  white-space: nowrap;
  letter-spacing: 1px;
}
.boss-player-hp-wrap {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(76,201,240,0.3);
}
.boss-player-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CC9F0, #2DC653);
  border-radius: 99px;
  transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(76,201,240,0.5);
}

/* ── Boss Action Buttons ── */
.boss-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
  padding: 0 8px;
}
.boss-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 26px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 110px;
  position: relative;
  overflow: hidden;
}
.boss-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}
.boss-action-btn:hover  { transform: scale(1.05); }
.boss-action-btn:active { transform: scale(0.93); }

.dodge-btn {
  background: linear-gradient(135deg, #2DC653, #138808);
  box-shadow: 0 6px 22px rgba(45,198,83,0.4), 0 0 0 1px rgba(255,255,255,0.08);
}
.dodge-btn:hover { box-shadow: 0 8px 28px rgba(45,198,83,0.6); }

.boss-attack-btn {
  background: linear-gradient(135deg, #FF9933, #c1121f);
  box-shadow: 0 6px 22px rgba(255,153,51,0.45), 0 0 0 1px rgba(255,255,255,0.08);
}
.boss-attack-btn:hover { box-shadow: 0 8px 28px rgba(255,100,20,0.65); }

/* ── Leaderboard Overlay Screen ──────────────────────── */
#leaderboard-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#leaderboard-screen.hidden { display: none; }

#leaderboard-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(76, 201, 240, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}
.leaderboard-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.leaderboard-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.leaderboard-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}
.leaderboard-close-btn:active {
  transform: scale(0.9);
}

.leaderboard-subtitle {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin: 12px 0 10px;
  text-transform: uppercase;
}

.leaderboard-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 10, 0.4);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.leaderboard-tab-btn {
  flex: 1;
  border: none;
  background: none;
  color: #88a;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 0;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}
.leaderboard-tab-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.leaderboard-tab-btn.active {
  background: #2dc653;
  color: #fff;
  box-shadow: 0 0 10px rgba(45, 198, 83, 0.35);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
/* Scrollbar styling */
.leaderboard-list::-webkit-scrollbar {
  width: 5px;
}
.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.leaderboard-row.player-highlight {
  background: rgba(255, 153, 51, 0.08);
  border-color: rgba(255, 153, 51, 0.3);
}

.lb-rank {
  font-size: 14px;
  font-weight: 800;
  width: 24px;
  text-align: center;
  color: #fff;
}
.lb-rank.gold-rank   { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.4); }
.lb-rank.silver-rank { color: #c0c0c0; }
.lb-rank.bronze-rank { color: #cd7f32; }

.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
}
.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-name {
  flex: 1;
  text-align: left;
  margin-left: 12px;
  font-weight: 600;
  font-size: 13px;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-score {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
}

.leaderboard-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 153, 51, 0.12);
  border: 1px solid rgba(255, 153, 51, 0.4);
  padding: 10px 14px;
  border-radius: 12px;
  margin-top: 14px;
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.15);
}
.lb-player-left {
  display: flex;
  align-items: center;
}
.lb-player-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #ff9933;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.lb-player-rank {
  font-size: 22px;
  font-weight: 800;
  color: #ffd700;
  margin: 0 10px;
  text-shadow: 0 0 10px rgba(255,215,0,0.3);
}
.lb-player-name {
  font-size: 13px;
  font-weight: 800;
  color: #ff9933;
  text-transform: uppercase;
}


/* ── Scoreboard (End of Match) Screen ────────────────── */
#scoreboard-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 20px;
  padding: 24px;
  width: min(500px, 92vw);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .4s cubic-bezier(.34,1.56,.64,1);
}

.scoreboard-header-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.scoreboard-vs-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.scoreboard-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.scoreboard-side.player-side {
  background: linear-gradient(135deg, rgba(76,201,240,0.18), rgba(11,20,36,0.85));
  border: 1.5px solid rgba(76,201,240,0.35);
}
.scoreboard-side.rival-side {
  background: linear-gradient(135deg, rgba(230,57,70,0.18), rgba(11,20,36,0.85));
  border: 1.5px solid rgba(230,57,70,0.35);
}

.scoreboard-side-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: center;
}
.scoreboard-side.player-side .scoreboard-side-title {
  color: #4cc9f0;
}
.scoreboard-side.rival-side .scoreboard-side-title {
  color: #ff6666;
}

.scoreboard-avatar-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scoreboard-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scoreboard-score {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-top: 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.scoreboard-vs-divider {
  width: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}
.vs-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0d1624;
  border: 2.5px solid rgba(255,255,255,0.35);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px #000;
}

.scoreboard-stats-section {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
  margin-bottom: 18px;
}
.scoreboard-stats-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffd700;
  text-align: center;
  margin-bottom: 12px;
}

.scoreboard-stats-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
}
.sb-stat-val {
  font-size: 13px;
  font-weight: 700;
  width: 60px;
}
.sb-stat-val.player-val {
  text-align: left;
  color: #4cc9f0;
}
.sb-stat-val.rival-val {
  text-align: right;
  color: #ff6666;
}
.sb-stat-name {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.scoreboard-footer {
  display: flex;
  gap: 10px;
  width: 100%;
}
.scoreboard-continue-btn {
  width: 100%;
  height: 46px;
  background: linear-gradient(180deg, #f5c432, #d19a15);
  color: #1a1a1a;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 196, 50, 0.3), inset 0 1.5px 0 rgba(255,255,255,0.25);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.scoreboard-continue-btn:hover {
  background: linear-gradient(180deg, #ffd752, #e5ab1b);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(245, 196, 50, 0.45);
}
.scoreboard-continue-btn:active {
  transform: translateY(1px);
}

/* ── Daily Reward Overlay Screen ──────────────────────── */
#daily-reward-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#daily-reward-screen.hidden { display: none; }

#daily-reward-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(540px, 94vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.daily-reward-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}
.daily-reward-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.daily-reward-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.daily-reward-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}
.daily-reward-close-btn:active {
  transform: scale(0.9);
}

.daily-reward-subtitle {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffd700;
  text-align: center;
  margin: 14px 0 16px;
  text-transform: uppercase;
}

.daily-days-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.daily-day-card {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.15s;
  height: 98px;
}
.daily-day-card .day-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #88a;
  text-transform: uppercase;
}
.daily-day-card .day-reward-icon {
  font-size: 20px;
  margin: 4px 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.daily-day-card .day-reward-val {
  font-size: 11px;
  font-weight: 800;
  color: #eee;
}

/* Claimed State */
.daily-day-card.claimed {
  background: rgba(45, 198, 83, 0.06);
  border-color: rgba(45, 198, 83, 0.35);
}
.daily-day-card.claimed .day-lbl {
  color: rgba(45, 198, 83, 0.7);
}
.daily-day-card.claimed .day-reward-icon {
  filter: grayscale(30%) opacity(70%);
}
.daily-day-card.claimed .day-reward-val {
  color: rgba(45, 198, 83, 0.85);
}
.day-checkmark {
  color: #2DC653;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  margin-top: 2px;
}

/* Active State */
.daily-day-card.active {
  background: linear-gradient(180deg, rgba(255, 153, 51, 0.15), rgba(11, 20, 36, 0.85));
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
  transform: scale(1.05);
}
.daily-day-card.active .day-lbl {
  color: #ff9933;
}
.daily-day-card.active .day-reward-val {
  color: #ffd700;
}

/* Locked/Future State */
.daily-day-card.locked {
  opacity: 0.45;
}

.daily-footer {
  display: flex;
  justify-content: center;
}
.daily-claim-btn {
  width: 100%;
  max-width: 280px;
  height: 46px;
  background: linear-gradient(180deg, #44803F, #2B5727);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 198, 83, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.daily-claim-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #51984a, #32672d);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 198, 83, 0.5);
}
.daily-claim-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.daily-claim-btn:disabled {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  cursor: not-allowed;
  box-shadow: none;
}


/* ── Achievements Overlay Screen ──────────────────────── */
#achievements-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#achievements-screen.hidden { display: none; }

#achievements-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(76, 201, 240, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(460px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.achievements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.achievements-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.achievements-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.achievements-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}
.achievements-close-btn:active {
  transform: scale(0.9);
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.achievements-list::-webkit-scrollbar {
  width: 5px;
}
.achievements-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.achievements-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
}

.achievement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  border-radius: 12px;
  transition: background 0.15s;
}
.achievement-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ach-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ach-info {
  flex: 1;
  text-align: left;
  margin-left: 12px;
}
.ach-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ach-desc {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
}

.ach-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.ach-progress-text {
  font-size: 10px;
  font-weight: 800;
  color: #ffd700;
}
.ach-progress-bar-bg {
  width: 70px;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.ach-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff9933);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.ach-reward-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
  min-width: 32px;
}
.ach-reward-icon {
  font-size: 16px;
}
.ach-reward-val {
  font-size: 9px;
  font-weight: 800;
  color: #4cc9f0;
}

.ach-claim-btn {
  background: linear-gradient(180deg, #44803F, #2B5727);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 10px;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(45,198,83,0.3);
  transition: transform 0.15s, background 0.15s;
  letter-spacing: 0.5px;
  margin-left: 14px;
}
.ach-claim-btn:hover {
  background: linear-gradient(180deg, #51984a, #32672d);
  transform: scale(1.06);
}
.ach-claim-btn:active {
  transform: scale(0.94);
}

.ach-completed-tag {
  font-size: 9px;
  font-weight: 800;
  color: #2dc653;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(45,198,83,0.35);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(45,198,83,0.05);
  margin-left: 14px;
}


@media (max-width: 480px) {
  .daily-days-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}

/* ── Shop Overlay Screen ────────────────────────────── */
#shop-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#shop-screen.hidden { display: none; }

#shop-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(520px, 94vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}
.shop-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.shop-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-header-right .currency-pill {
  height: 28px;
  padding: 2px 8px;
}
.shop-header-right .currency-value {
  font-size: 12px;
}
.shop-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
  margin-left: 6px;
}
.shop-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}
.shop-close-btn:active {
  transform: scale(0.9);
}

.shop-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin: 14px 0 16px;
  text-transform: uppercase;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.shop-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
  height: 180px;
  border: 1.5px solid rgba(255,255,255,0.08);
}
.shop-item-card:hover {
  transform: translateY(-2px);
}
.shop-item-card.coin-pack-card {
  border-color: rgba(255, 215, 0, 0.22);
}
.shop-item-card.coin-pack-card:hover {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.12);
}
.shop-item-card.diamond-pack-card {
  border-color: rgba(76, 201, 240, 0.22);
}
.shop-item-card.diamond-pack-card:hover {
  border-color: rgba(76, 201, 240, 0.55);
  box-shadow: 0 4px 15px rgba(76, 201, 240, 0.12);
}
.shop-item-card.starter-pack-card {
  border-color: rgba(244, 162, 97, 0.25);
}
.shop-item-card.starter-pack-card:hover {
  border-color: rgba(244, 162, 97, 0.6);
  box-shadow: 0 4px 15px rgba(244, 162, 97, 0.15);
}

.shop-best-value-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #c1121f;
  color: #fff;
  font-size: 7.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  text-transform: uppercase;
}

.shop-item-title {
  font-size: 10px;
  font-weight: 800;
  color: #88a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 6px;
}
.shop-item-image {
  font-size: 32px;
  margin: 8px 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.shop-item-qty {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.shop-buy-btn {
  width: 100%;
  height: 34px;
  background: linear-gradient(180deg, #44803F, #2B5727);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(45,198,83,0.35);
  transition: transform 0.15s, background 0.15s;
}
.shop-buy-btn:hover {
  background: linear-gradient(180deg, #51984a, #32672d);
  transform: scale(1.04);
}
.shop-buy-btn:active {
  transform: scale(0.95);
}


/* ── Settings Screen Styling ─────────────────────────── */
#settings-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#settings-screen.hidden { display: none; }

#settings-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}
.settings-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.settings-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.settings-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}
.settings-close-btn:active {
  transform: scale(0.9);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.settings-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
}

.settings-option-label {
  font-size: 12px;
  font-weight: 800;
  color: #eee;
  letter-spacing: 0.5px;
}

.settings-control-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-icon {
  font-size: 15px;
  min-width: 18px;
  text-align: center;
}

/* Range sliders styling */
input[type=range] {
  -webkit-appearance: none;
  width: 90px;
  background: transparent;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: #3a5169;
  border-radius: 5px;
}
input[type=range]::-webkit-slider-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -4.5px;
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: #3a5169;
  border-radius: 5px;
}
input[type=range]::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

/* Vibration toggle switch */
.settings-toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}
.settings-toggle-switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3a5169;
  transition: .25s;
  border-radius: 20px;
}
.settings-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
}
.settings-toggle-switch input:checked + .settings-switch-slider {
  background-color: #2DC653;
}
.settings-toggle-switch input:checked + .settings-switch-slider:before {
  transform: translateX(14px);
}

/* Graphics low/med/high buttons */
.settings-buttons-group {
  display: flex;
  gap: 5px;
}
.settings-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #88a;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.settings-btn.active {
  background: #2dc653;
  color: #fff;
  border-color: #2dc653;
  box-shadow: 0 0 10px rgba(45, 198, 83, 0.3);
}

/* Language selection select box */
.settings-dropdown-wrap select {
  background: #0f1826;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 24px 5px 10px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 16px;
}

.settings-reset-row {
  margin-top: 6px;
}
.settings-reset-all-btn {
  width: 100%;
  height: 42px;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: 8px;
  color: #ff6666;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-reset-all-btn:hover {
  background: rgba(230, 57, 70, 0.22);
  color: #ff8888;
}
.settings-reset-all-btn:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .shop-item-card {
    height: 120px;
    flex-direction: row;
    padding: 10px 16px;
  }
  .shop-best-value-badge {
    left: auto;
    right: 12px;
    transform: none;
    border-radius: 0 0 6px 6px;
  }
  .shop-buy-btn {
    width: 90px;
  }
}

/* ── Tutorial Screen Styling ─────────────────────────── */
#tutorial-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#tutorial-screen.hidden { display: none; }

#tutorial-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(480px, 94vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}
.tutorial-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.tutorial-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.tutorial-close-btn:hover {
  color: #ff9933;
  transform: scale(1.1);
}

.tutorial-content {
  margin-top: 16px;
}

.tutorial-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tutorial-slide.hidden { display: none; }

.tutorial-subtitle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eee;
  text-align: center;
  margin: 10px 0 20px;
  text-transform: uppercase;
}

.tutorial-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  width: 100%;
  height: 140px;
  padding: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.tutorial-left-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-roach-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.mini-roach-wrap span {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.mini-roach-wrap span:nth-child(3) {
  grid-column: span 2;
  text-align: center;
}

.tutorial-arrow-wrap {
  font-size: 32px;
  color: #ff9933;
  font-weight: bold;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.tutorial-right-group {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-big-roach-img {
  width: 75px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  animation: roachFloat 3s ease-in-out infinite;
}

@keyframes roachFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tutorial-desc {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 0 10px;
}

.tutorial-footer {
  width: 100%;
}

.tutorial-next-btn {
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, #44803F, #2B5727);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(45,198,83,0.3);
  transition: transform 0.15s, background 0.15s;
  text-transform: uppercase;
}
.tutorial-next-btn:hover {
  background: linear-gradient(180deg, #51984a, #32672d);
  transform: scale(1.03);
}
.tutorial-next-btn:active {
  transform: scale(0.97);
}

.tutorial-skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  width: 90px;
  box-sizing: border-box;
}
.skill-icon-big {
  font-size: 28px;
  margin-bottom: 6px;
}
.skill-label-big {
  font-size: 9px;
  font-weight: 800;
  color: #ff9933;
}
.tutorial-versus-icon {
  font-size: 20px;
  font-weight: 900;
  color: #e63946;
}

/* ── Pause Screen Styling ───────────────────────────── */
#pause-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#pause-screen.hidden { display: none; }

#pause-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(255, 153, 51, 0.25);
  border-radius: 16px;
  padding: 24px;
  width: min(340px, 90vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.pause-header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
  text-align: center;
}
.pause-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  text-transform: uppercase;
}

.pause-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.pause-btn {
  width: 100%;
  height: 40px;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.pause-btn:hover {
  transform: scale(1.03);
}
.pause-btn:active {
  transform: scale(0.97);
}

.resume-btn {
  background: linear-gradient(180deg, #44803F, #2B5727);
  box-shadow: 0 4px 10px rgba(45, 198, 83, 0.35);
}
.resume-btn:hover {
  background: linear-gradient(180deg, #51984a, #32672d);
}

.restart-btn {
  background: linear-gradient(180deg, #376E8F, #214C66);
  box-shadow: 0 4px 10px rgba(76, 201, 240, 0.25);
}
.restart-btn:hover {
  background: linear-gradient(180deg, #4382a8, #2a5d7d);
}

.options-btn {
  background: linear-gradient(180deg, #376E8F, #214C66);
  box-shadow: 0 4px 10px rgba(76, 201, 240, 0.25);
}
.options-btn:hover {
  background: linear-gradient(180deg, #4382a8, #2a5d7d);
}

.exit-btn {
  background: linear-gradient(180deg, #b02a37, #781c25);
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.35);
}
.exit-btn:hover {
  background: linear-gradient(180deg, #c73846, #8c252f);
}

/* ── Enemy Voter Labels Floating HUD ─────────────────── */
.enemy-voter-label {
  position: absolute;
  color: #ffffff;
  font-family: 'Baloo 2', 'Arial Black', sans-serif;
  font-size: 16px;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  pointer-events: none;
  transform: translate(-50%, -100%);
  z-index: 10;
  transition: opacity 0.2s ease;
}

/* ══════════════════════════════════════════════════════
   ⚡ THUROACH — God of Thunder Skin
   ══════════════════════════════════════════════════════ */

/* Thunder card base — electric border cycling animation */
.thunder-card {
  background: linear-gradient(135deg, #0a0e1f 0%, #0d1a38 50%, #0a0e1f 100%) !important;
  border: 2px solid transparent !important;
  border-radius: 14px;
  position: relative;
  overflow: visible !important;
}

/* Animated electric gradient border */
.thunder-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    #00cfff, #7b2fff, #ffe500, #00cfff, #7b2fff, #ffe500
  );
  background-size: 300% 100%;
  animation: thunderBorder 2s linear infinite;
}

.thunder-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    #00cfff40, #7b2fff40, #ffe50040, #00cfff40
  );
  background-size: 300% 100%;
  animation: thunderBorder 2s linear infinite reverse;
  filter: blur(8px);
}

@keyframes thunderBorder {
  0%   { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

/* Selected thunder card — intensified glow */
.thunder-card.selected {
  box-shadow:
    0 0 20px rgba(0, 207, 255, 0.6),
    0 0 40px rgba(123, 47, 255, 0.4),
    0 0 60px rgba(255, 229, 0, 0.2),
    inset 0 0 20px rgba(0, 207, 255, 0.08) !important;
  animation: thunderPulse 1.5s ease-in-out infinite;
}

@keyframes thunderPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,207,255,0.6), 0 0 40px rgba(123,47,255,0.4); }
  50%       { box-shadow: 0 0 30px rgba(0,207,255,1.0), 0 0 60px rgba(123,47,255,0.8), 0 0 80px rgba(255,229,0,0.4); }
}

/* Thunder character header badge */
.thunder-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffe500;
  background: linear-gradient(90deg, #1a0050, #050020);
  border: 1px solid #ffe500;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  text-shadow: 0 0 8px #ffe500;
  animation: badgeGlow 1.5s ease-in-out infinite alternate;
  vertical-align: middle;
}

@keyframes badgeGlow {
  from { box-shadow: 0 0 4px #ffe500, 0 0 8px #00cfff; border-color: #ffe500; }
  to   { box-shadow: 0 0 10px #ffe500, 0 0 20px #7b2fff; border-color: #00cfff; }
}

/* Portrait container glow ring */
.thunder-portrait-container {
  position: relative;
}

.thunder-portrait-container::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00cfff, #7b2fff, #ffe500, #00cfff);
  background-size: 200% 200%;
  animation: thunderBorder 1.5s linear infinite;
  z-index: -1;
  filter: blur(4px);
  opacity: 0.8;
}

/* Portrait image electric shimmer */
.thunder-portrait {
  filter: drop-shadow(0 0 8px rgba(0,207,255,0.8)) drop-shadow(0 0 16px rgba(123,47,255,0.5)) !important;
  animation: thunderShimmer 3s ease-in-out infinite;
}

@keyframes thunderShimmer {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0,207,255,0.8)) drop-shadow(0 0 16px rgba(123,47,255,0.5)); }
  33%       { filter: drop-shadow(0 0 12px rgba(255,229,0,0.9)) drop-shadow(0 0 24px rgba(0,207,255,0.8)); }
  66%       { filter: drop-shadow(0 0 10px rgba(123,47,255,0.9)) drop-shadow(0 0 20px rgba(255,229,0,0.7)); }
}

/* Lightning aura overlay — arcing electricity particles */
.lightning-aura {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  z-index: 5;
}

.lightning-aura::before,
.lightning-aura::after {
  content: '⚡';
  position: absolute;
  font-size: 18px;
  animation: floatLightning 1.2s ease-in-out infinite;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px #00cfff);
}

.lightning-aura::before {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.lightning-aura::after {
  bottom: 10%;
  right: 5%;
  animation-delay: 0.6s;
}

@keyframes floatLightning {
  0%   { transform: translateY(0) scale(1) rotate(-10deg); opacity: 1; }
  50%  { transform: translateY(-10px) scale(1.3) rotate(10deg); opacity: 0.6; }
  100% { transform: translateY(0) scale(1) rotate(-10deg); opacity: 1; }
}

/* Thunder stat blocks — electric blue fill */
.char-block.thunder-filled {
  background: linear-gradient(135deg, #00cfff, #7b2fff) !important;
  border-color: #00cfff !important;
  box-shadow: 0 0 6px rgba(0, 207, 255, 0.8), 0 0 12px rgba(123, 47, 255, 0.4) !important;
  animation: statPulse 1.5s ease-in-out infinite alternate;
}

@keyframes statPulse {
  from { box-shadow: 0 0 4px rgba(0,207,255,0.6); }
  to   { box-shadow: 0 0 10px rgba(0,207,255,1.0), 0 0 18px rgba(123,47,255,0.8); }
}

/* Thunder lock overlay */
.thunder-card .char-lock-overlay {
  background: linear-gradient(135deg, rgba(0,0,0,0.88), rgba(10,0,40,0.92)) !important;
  border: 1px solid rgba(0, 207, 255, 0.3) !important;
}

.thunder-card .char-lock-icon {
  font-size: 28px !important;
  animation: thunderFlash 0.8s steps(1) infinite !important;
}

@keyframes thunderFlash {
  0%, 90%  { opacity: 1; filter: drop-shadow(0 0 10px #ffe500); }
  50%      { opacity: 0.4; filter: drop-shadow(0 0 20px #00cfff); }
}

.thunder-lock-label {
  font-size: 10px;
  font-weight: 800;
  color: #00cfff;
  text-shadow: 0 0 8px #00cfff;
  letter-spacing: 1px;
  margin-top: 4px;
  animation: badgeGlow 1.5s ease-in-out infinite alternate;
}

/* Thunder char header text glow */
.thunder-card .char-card-header {
  background: linear-gradient(90deg, #00cfff, #ffe500, #7b2fff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-shadow: none !important;
  animation: headerColorShift 3s linear infinite;
  background-size: 200% 100%;
}

@keyframes headerColorShift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ══════════════════════════════════════════════════════
   🌐 MULTIPLAYER LOBBY SCREEN
   ══════════════════════════════════════════════════════ */

#multiplayer-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
#multiplayer-screen.hidden { display: none; }

#mp-lobby-card {
  background: rgba(11, 20, 36, 0.95);
  border: 2px solid rgba(123, 47, 255, 0.4);
  border-radius: 16px;
  padding: 24px;
  width: min(520px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardIn .35s cubic-bezier(.34,1.56,.64,1);
}

.mp-lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}

.mp-lobby-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  background: linear-gradient(90deg, #7b2fff, #00cfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mp-lobby-close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}
.mp-lobby-close-btn:hover {
  color: #7b2fff;
  transform: scale(1.1);
}

#mp-setup-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
}

.mp-setup-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px;
}

.mp-setup-section h3 {
  font-size: 13px;
  font-weight: 800;
  color: #eee;
  text-align: center;
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}

.mp-divider-vertical {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.mp-divider-vertical span {
  font-size: 11px;
  font-weight: bold;
  color: #557;
  background: #0b1424;
  padding: 5px;
}

.mp-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-input-group label {
  font-size: 10px;
  font-weight: bold;
  color: #88a;
}

.mp-input-group select,
.mp-input-group input {
  background: #050b14;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  outline: none;
  text-align: center;
}

.mp-lobby-action-btn {
  font-family: var(--font);
  font-weight: 800;
  font-size: 12px;
  height: 38px;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.mp-lobby-action-btn:hover {
  transform: scale(1.03);
}
.mp-lobby-action-btn:active {
  transform: scale(0.97);
}

.btn-create {
  background: linear-gradient(180deg, #7b2fff, #4a15ad);
  box-shadow: 0 4px 10px rgba(123, 47, 255, 0.3);
}

.btn-join {
  background: linear-gradient(180deg, #00cfff, #008eb0);
  box-shadow: 0 4px 10px rgba(0, 207, 255, 0.3);
}

.btn-leave {
  background: linear-gradient(180deg, #e63946, #b01a25);
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

/* Active room UI */
.mp-room-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.mp-room-code-badge {
  background: rgba(123, 47, 255, 0.15);
  border: 1px dashed #7b2fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 16px;
  letter-spacing: 2px;
  color: #00cfff;
  text-shadow: 0 0 8px rgba(0, 207, 255, 0.5);
  animation: badgeGlow 1.5s ease-in-out infinite alternate;
}

.mp-player-list-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.mp-player-list-section h4 {
  font-size: 11px;
  font-weight: 800;
  color: #88a;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

#mp-player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.mp-player-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #eee;
}

.mp-player-char-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ff9933;
}

.mp-player-status-badge {
  font-size: 10px;
  font-weight: bold;
  color: #2DC653;
  text-shadow: 0 0 6px rgba(45, 198, 83, 0.5);
}

.mp-lobby-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.mp-lobby-status {
  font-size: 11px;
  font-weight: bold;
  color: #ff9933;
  text-align: center;
  animation: pulseOpacity 1.5s ease-in-out infinite alternate;
}

@keyframes pulseOpacity {
  from { opacity: 0.6; }
  to { opacity: 1.0; }
}

@media (max-width: 480px) {
  #mp-setup-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mp-divider-vertical {
    flex-direction: row;
    height: auto;
  }
  .mp-divider-vertical span {
    padding: 0 10px;
  }
}

