*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d1321;
  font-family: 'Fredoka', 'Outfit', system-ui, -apple-system, sans-serif;
  color: #f8fafc;
  touch-action: none;
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

body.in-game #gameCanvas {
  cursor: crosshair;
}

body.pointer-locked #gameCanvas {
  cursor: none;
}

.hidden {
  display: none !important;
}

/* ═══ OVERLAYS (LOBBY & DEATH) ═══ */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(13, 19, 33, 0.65), rgba(7, 10, 18, 0.94));
  backdrop-filter: blur(8px);
  z-index: 20;
  padding: 16px;
  overflow-y: auto;
}

/* ═══ TOPBAR (CRATETOOLS THEME) ═══ */
.skribbl-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 30;
  background: rgba(10, 14, 22, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.skribbl-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.15s ease;
}

.skribbl-back-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-2px);
}

.skribbl-back-arrow {
  color: #f97316;
  font-weight: 900;
}

.skribbl-brand-text {
  letter-spacing: 0.5px;
}

.skribbl-top-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.skribbl-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skribbl-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.skribbl-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ═══ 3-PANEL CONTAINER (MATCHING PREVIOUS UI) ═══ */
.skribbl-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  width: min(1160px, 98vw);
  margin-top: 54px;
  z-index: 25;
}

.skribbl-card {
  background: rgba(15, 21, 32, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(249, 115, 22, 0.05);
  backdrop-filter: blur(16px);
  padding: 22px;
}

/* ═══ CENTER HERO LOBBY CARD ═══ */
.skribbl-main-card {
  width: min(440px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 11px;
  position: relative;
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(249, 115, 22, 0.12);
}

.logo-wrap {
  margin-bottom: 2px;
}

.game-logo {
  font-family: 'Lilita One', 'Fredoka', cursive, sans-serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.45);
}

.logo-wreck {
  color: #ffffff;
  text-shadow: 0 5px 0 #64748b;
}

.logo-ball {
  color: #ff9f1c;
  text-shadow: 0 5px 0 #9a3412, 0 0 24px rgba(255, 159, 28, 0.55);
}

.logo-io {
  color: #38bdf8;
  font-size: 0.65em;
  text-shadow: 0 5px 0 #0369a1, 0 0 20px rgba(56, 189, 248, 0.65);
}

.tagline {
  margin-top: 4px;
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #94a3b8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ═══ AVATAR CUSTOMIZER ═══ */
.avatar-customizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin: 2px 0;
}

.avatar-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.avatar-nav-btn:hover {
  background: rgba(249, 115, 22, 0.25);
  border-color: #f97316;
  color: #ffffff;
  transform: scale(1.1);
}

.avatar-nav-btn:active {
  transform: scale(0.95);
}

.avatar-preview-wrap {
  width: 130px;
  height: 130px;
  border-radius: 22px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.98));
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

#avatarCanvas {
  display: block;
}

.skin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.skin-name {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fbbf24;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.skin-rarity {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  letter-spacing: 0.5px;
}

/* ═══ SKIN PICKER DOTS ═══ */
.skin-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.skin-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  padding: 0;
  position: relative;
}

.skin-dot:hover {
  transform: scale(1.1);
}

.skin-dot.selected {
  transform: scale(1.15);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.45), 0 6px 16px rgba(0, 0, 0, 0.6);
}

.skin-dot canvas {
  width: 34px;
  height: 34px;
  pointer-events: none;
}

/* ═══ NICKNAME INPUT ROW ═══ */
.nickname-row {
  display: flex;
  width: 100%;
  gap: 8px;
  background: rgba(10, 14, 22, 0.9);
  padding: 5px 6px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s ease;
}

.nickname-row:focus-within {
  border-color: #f97316;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 16px rgba(249, 115, 22, 0.25);
}

#nicknameInput {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 12px;
}

#nicknameInput::placeholder {
  color: #64748b;
}

.random-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.random-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(20deg) scale(1.08);
}

/* ═══ PLAY & PRIVATE BUTTONS ═══ */
.skribbl-play-btn {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border-bottom: 5px solid #15803d;
  color: #ffffff;
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.45);
  transition: transform 0.08s ease, border-bottom-width 0.08s ease, box-shadow 0.08s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.skribbl-play-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.55);
}

.skribbl-play-btn:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.play-icon {
  font-size: 18px;
}

.skribbl-private-btn {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-bottom: 4px solid #1d4ed8;
  color: #ffffff;
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
}

.skribbl-private-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.skribbl-private-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.controls-strip {
  font-size: 13px;
  font-family: 'Fredoka', 'Outfit', sans-serif;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(15, 23, 42, 0.62);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.controls-strip b {
  color: #38bdf8;
}

.controls-strip .dot {
  color: #475569;
}

/* ═══ SIDE CARDS (HOW TO PLAY & LEADERBOARD) ═══ */
.skribbl-side-card {
  width: min(310px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  color: #94a3b8;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.card-header h3 {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f1f5f9;
}

.card-icon {
  font-size: 18px;
}

/* Steps list */
.skribbl-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-info h4 {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.step-info p {
  font-size: 12px;
  line-height: 1.4;
  color: #94a3b8;
}

.step-info b {
  color: #38bdf8;
}

/* Leaderboard ranks */
.skribbl-ranks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.rank-1 {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.rank-2 {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.rank-3 {
  background: rgba(180, 83, 9, 0.1);
  border-color: rgba(180, 83, 9, 0.25);
  color: #fdba74;
}

.rank-badge {
  font-size: 12px;
  font-weight: 800;
  min-width: 32px;
}

.rank-name {
  flex: 1;
  text-align: left;
  margin: 0 8px;
  color: #f1f5f9;
  font-weight: 700;
}

.rank-score {
  font-family: 'Fredoka', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
}

.arena-live-status {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

.live-dot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-weight: 800;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

.arena-perks {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-weight: 700;
}

/* ═══ TOAST NOTIFICATION ═══ */
.skribbl-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ═══ RESPONSIVE MOBILE LAYOUT ═══ */
@media (max-width: 992px) {
  .skribbl-container {
    flex-direction: column;
    align-items: center;
    margin-top: 58px;
    max-height: none;
    overflow-y: visible;
    padding-bottom: 40px;
    gap: 14px;
  }

  .skribbl-main-card {
    order: 1;
    width: min(440px, 94vw);
  }

  .left-card {
    order: 2;
    width: min(440px, 94vw);
  }

  .right-card {
    order: 3;
    width: min(440px, 94vw);
  }
}

/* ═══ IN-GAME HUD ═══ */
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hud-top-left {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  backdrop-filter: blur(6px);
}

.pill-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #f87171;
  font-family: 'Lilita One', 'Fredoka', sans-serif;
}

.pill-val {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
  color: #ffffff;
  font-family: 'Fredoka', sans-serif;
}

.icon-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  transform: translateY(-1px);
}

.hud-top-center {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-big {
  font-family: 'Lilita One', 'Fredoka', cursive, sans-serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 900;
  line-height: 1;
  color: #fbbf24;
  text-shadow: 0 4px 0 #b45309, 0 0 24px rgba(251, 191, 36, 0.45);
}

.mass-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #94a3b8;
  margin-top: 2px;
}

.kill-feed {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kill-item {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  animation: popIn 0.2s ease-out;
  white-space: nowrap;
}

.kill-item .killer { color: #38bdf8; }
.kill-item .verb { color: #fb923c; margin: 0 5px; }
.kill-item .victim { color: #f87171; }
.kill-item.is-me {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(120, 53, 15, 0.72);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══ LEADERBOARD ═══ */
.leaderboard {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 196px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}

.lb-title {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.8px;
  color: #94a3b8;
  margin-bottom: 6px;
  text-align: center;
}

.lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  color: #e2e8f0;
}

.lb-row.me {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
}

.lb-row.king {
  color: #fde047;
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.lb-rank {
  width: 18px;
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
}

.lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 104px;
}

.lb-score {
  font-size: 12px;
  font-weight: 800;
  color: #cbd5e1;
}

/* ═══ MINIMAP ═══ */
.minimap-wrap {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: rgba(10, 16, 30, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#minimapCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ═══ PURE DASH ENERGY HUD (NO SPIN PILLS) ═══ */
.boost-hud {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, 64vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.dash-label {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #38bdf8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.dash-key-hint {
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #94a3b8;
}

.boost-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 16px rgba(56, 189, 248, 0.25);
}

.boost-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 60%, #7dd3fc 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
  transition: width 0.05s linear;
}

/* ═══ MOBILE TOUCH CONTROLS ═══ */
.mobile-controls {
  pointer-events: auto;
  position: absolute;
  right: 18px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mobile-boost-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.45);
  background: radial-gradient(circle at 35% 30%, #38bdf8, #0284c7);
  color: #ffffff;
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.55);
}

.mobile-boost-btn:active {
  transform: scale(0.92);
}

/* ═══ DEATH SCREEN ═══ */
.death-card {
  width: min(440px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  background: rgba(15, 21, 32, 0.94);
  border: 2px solid rgba(239, 68, 68, 0.35);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(239, 68, 68, 0.2);
  backdrop-filter: blur(16px);
  padding: 26px;
}

.death-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fca5a5;
  text-transform: uppercase;
}

.death-title {
  font-family: 'Lilita One', 'Fredoka', cursive, sans-serif;
  font-size: clamp(52px, 10vw, 72px);
  font-weight: 900;
  line-height: 1;
  color: #ef4444;
  text-shadow: 0 8px 0 #7f1d1d, 0 0 36px rgba(239, 68, 68, 0.55);
}

.death-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  background: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px 10px;
}

.d-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.d-label {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #94a3b8;
}

.d-val {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 32px;
  font-weight: 900;
}

.d-val.gold { color: #fbbf24; text-shadow: 0 2px 0 #b45309; }
.d-val.red { color: #f87171; text-shadow: 0 2px 0 #991b1b; }
.d-val.cyan { color: #38bdf8; text-shadow: 0 2px 0 #0284c7; }

.death-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.respawn-btn {
  flex: 1;
}

.secondary-btn {
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 24px;
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.1s ease;
}

.secondary-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  transform: translateY(-1px);
}

.respawn-hint {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
}

@media (max-width: 640px) {
  .leaderboard {
    width: 152px;
    padding: 8px;
    top: 10px;
    right: 10px;
  }
  .lb-row { font-size: 11px; }
  .minimap-wrap {
    width: 100px;
    height: 100px;
    bottom: 12px;
    left: 12px;
  }
  .boost-hud {
    bottom: 14px;
  }
}
