/**
 * Kniteforce Round Monopoly - Game UI Stylesheet
 * High-octane 90s Rave aesthetics, glassmorphism, neon glows, and responsive HUD panels.
 */

:root {
  --bg-dark: #181a24;
  --panel-bg: rgba(22, 24, 34, 0.88);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-main: #f5f5f7;
  --text-muted: #9a9ab0;

  --kf-cyan: #00ffff;
  --kf-pink: #ff007f;
  --kf-yellow: #ffe600;
  --kf-green: #39ff14;
  --kf-gold: #ffd700;

  --p1-color: #00ffff;
  --p2-color: #ff007f;
  --p3-color: #ffe600;
  --p4-color: #39ff14;
}

/* 2D Top Down - Center Kniteforce Logo */
#center-logo {
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
  transition: transform 0.3s ease;
}

/* 3D WebGL Canvas Layer */
#viewport-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: none;
}

#viewport-3d.active {
  display: block;
}

/* 3D Chess, Checkers & Marble Canvas Layers */
#viewport-chess,
#viewport-checkers,
#viewport-marble {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 12;
  background: radial-gradient(circle at center, #151528 0%, #080810 100%);
  display: none;
}

#viewport-chess.active,
#viewport-checkers.active,
#viewport-marble.active {
  display: block;
}

/* Top App Header & Rave Ticker */
.game-header {
  position: fixed;
  top: 14px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.brand-badge {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.brand-badge img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px var(--kf-cyan));
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--kf-cyan), var(--kf-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

/* Rave Ticker */
.rave-ticker {
  pointer-events: auto;
  max-width: 500px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--kf-yellow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Header Control Buttons */
.header-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.hud-btn {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--kf-cyan);
  transform: translateY(-2px);
}

.hud-btn.active-mode {
  background: var(--kf-cyan);
  color: #000;
  border-color: #ffffff;
  box-shadow: 0 0 15px var(--kf-cyan);
}

/* Header Segmented View Switcher Group */
.view-switch-group {
  display: inline-flex;
  background: rgba(10, 10, 18, 0.9);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 3px;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hud-view-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-view-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hud-view-btn.active {
  background: linear-gradient(135deg, var(--kf-cyan), #0099ff);
  color: #0c0c14;
  font-weight: 900;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.45);
}

/* Action Dock Quick View Toggle Button */
.dock-view-toggle-btn {
  background: rgba(18, 18, 28, 0.85);
  border: 1px solid var(--panel-border);
  color: #cfcfe2;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dock-view-toggle-btn:hover {
  border-color: var(--kf-cyan);
  color: #ffffff;
  background: rgba(0, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 255, 255, 0.35);
}


/* Player Crates HUD (Left Screen) */
.players-hud {
  position: fixed;
  top: 76px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  width: 220px;
  max-height: calc(100vh - 165px);
  overflow-y: auto;
  padding-right: 4px;
}

.players-hud::-webkit-scrollbar {
  width: 4px;
}

.players-hud::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.35);
  border-radius: 4px;
}

.player-hud-card {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: visible;
}

.player-hud-card.active-turn {
  transform: scale(1.03);
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.player-hud-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-color, var(--kf-cyan));
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.player-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-hud-name {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-records-badge {
  font-size: 16px;
  font-weight: 900;
  color: var(--kf-yellow);
  text-shadow: 0 0 10px rgba(255, 230, 0, 0.3);
}

.player-hud-stats {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

.player-tags {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

.player-tag {
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-shop {
  background: #ff0055;
  color: #fff;
}

.tag-vip {
  background: var(--kf-gold);
  color: #000;
}

/* Bottom Action Dock (Center Screen) */
.action-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* 2D Dice Display */
.dice-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.die-box {
  width: 38px;
  height: 38px;
  background: #ffffff;
  color: #111116;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid #000;
}

.die-box.pink {
  background: var(--kf-pink);
  color: #ffffff;
}

.die-box.doubles-glow {
  border-color: #ffd700 !important;
  box-shadow: 0 0 20px #ffd700, 0 0 35px rgba(255, 215, 0, 0.6) !important;
  animation: doublesPulse 0.5s infinite alternate ease-in-out !important;
}

.dock-btn.roll-btn.doubles-active {
  background: linear-gradient(135deg, #ffd700, #ff9100) !important;
  color: #111 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.7), 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  animation: doublesPulse 0.8s infinite alternate ease-in-out !important;
}

@keyframes doublesPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px #ffd700); }
  100% { transform: scale(1.12); filter: drop-shadow(0 0 16px #ffd700); }
}

.dock-btn {
  background: var(--panel-bg);
  color: #ffffff;
  border: 2px solid var(--panel-border);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dock-btn:hover {
  transform: translateY(-2px);
}

.dock-btn:active {
  transform: scale(0.96);
}

.dock-btn.roll-btn {
  background: linear-gradient(135deg, var(--kf-cyan), #0088cc);
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.dock-btn.buy-btn {
  background: linear-gradient(135deg, var(--kf-pink), #a00050);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
}

.dock-btn.pass-btn {
  background: #252533;
  border-color: #3b3b4f;
  color: #cfcfe2;
}

/* Left Column Emergency Skip Button (under Players HUD, above Jackpot) */
.left-column-controls {
  position: fixed;
  bottom: 84px;
  left: 20px;
  width: 220px;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.force-skip-turn-btn {
  background: rgba(28, 20, 14, 0.7);
  backdrop-filter: blur(14px);
  border: 1px dashed rgba(255, 140, 0, 0.5);
  color: #ffaa33;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
}

.force-skip-turn-btn:hover {
  background: rgba(255, 140, 0, 0.25);
  border-color: #ffbb33;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 140, 0, 0.5);
}

.force-skip-turn-btn:active {
  transform: scale(0.96);
}

/* Force Skip Modal */
.force-skip-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 14, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.force-skip-modal.active {
  display: flex;
}

.force-skip-modal-card {
  background: #181926;
  border: 2px solid #ff9900;
  box-shadow: 0 0 35px rgba(255, 153, 0, 0.4), inset 0 0 20px rgba(255, 153, 0, 0.08);
  border-radius: 16px;
  width: min(90vw, 440px);
  padding: 24px;
  text-align: center;
  color: #ffffff;
  animation: modalPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.force-skip-icon {
  font-size: 44px;
  margin-bottom: 6px;
}

.force-skip-title {
  font-size: 20px;
  font-weight: 900;
  color: #ffaa22;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.force-skip-warning-box {
  background: rgba(255, 153, 0, 0.1);
  border: 1px solid rgba(255, 153, 0, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #e2e2ec;
  text-align: left;
}

.force-skip-warning-box p {
  margin-bottom: 6px;
}

.force-skip-warning-box p:last-child {
  margin-bottom: 0;
}

.force-skip-warning-box .warning-tag {
  display: inline-block;
  background: #ff9900;
  color: #000000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.force-skip-status-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.force-skip-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.force-skip-cancel-btn {
  background: #2b2b3d;
  color: #cfcfe2;
  border: 1px solid #44445e;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.force-skip-cancel-btn:hover {
  background: #3b3b52;
  color: #ffffff;
}

.force-skip-confirm-btn {
  background: linear-gradient(135deg, #ff8800, #d94400);
  color: #ffffff;
  border: 1px solid #ffaa44;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.force-skip-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.7);
}

.dock-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

/* Jackpot Pill (Free Parking) */
.jackpot-badge {
  position: fixed;
  bottom: 24px;
  left: 20px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 10px 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.jackpot-badge .title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.jackpot-badge .amount {
  font-size: 18px;
  font-weight: 900;
  color: var(--kf-gold);
}

/* Dance Card Graphic Modal */
.dance-card-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: linear-gradient(135deg, #180d28, #0e122b);
  border: 3px solid var(--kf-pink);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 480px;
  z-index: 2000;
  box-shadow: 0 0 50px rgba(255, 0, 127, 0.5);
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dance-card-modal.active {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
}

.dance-card-header {
  font-size: 24px;
  font-weight: 900;
  color: var(--kf-yellow);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 15px var(--kf-yellow);
}

.dance-card-desc {
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
  font-weight: 600;
}

.dance-card-btn {
  background: var(--kf-cyan);
  color: #000;
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px var(--kf-cyan);
}

/* Lane Selector Modal (Crossing Junctions 0, 6, 12, 18) */
.lane-modal {
  position: fixed;
  bottom: 108px;
  left: 50%;
  transform: translateX(-50%) translateY(12px) scale(0.98);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 2px solid var(--kf-cyan);
  border-radius: 20px;
  padding: 14px 18px;
  width: 90%;
  max-width: 700px;
  z-index: 2000;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.4);
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.lane-modal.active {
  display: flex;
  transform: translateX(-50%) translateY(0) scale(1);
}

.lane-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.lane-btn {
  background: #1c1c28;
  border: 2px solid var(--panel-border);
  border-radius: 14px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (max-width: 620px) {
  .lane-modal {
    bottom: 92px;
    padding: 10px;
  }

  .lane-options {
    gap: 6px;
  }

  .lane-btn {
    padding: 8px 4px;
  }

  .lane-btn .lane-desc {
    display: none;
  }
}

.lane-btn:hover {
  border-color: var(--kf-cyan);
  background: rgba(0, 255, 255, 0.1);
  transform: translateY(-3px);
}

.lane-btn.lane-btn-outer {
  border-color: rgba(0, 255, 255, 0.4);
}

.lane-btn.lane-btn-outer:hover {
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  transform: translateY(-4px);
}

.lane-btn.lane-btn-middle {
  border-color: rgba(255, 0, 127, 0.4);
}

.lane-btn.lane-btn-middle:hover {
  border-color: #ff007f;
  background: rgba(255, 0, 127, 0.15);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
  transform: translateY(-4px);
}

.lane-btn.lane-btn-inner {
  border-color: rgba(255, 230, 0, 0.4);
}

.lane-btn.lane-btn-inner:hover {
  border-color: #ffe600;
  background: rgba(255, 230, 0, 0.15);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.4);
  transform: translateY(-4px);
}

.lane-dest-preview {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
}

.lane-dest-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 2D Board Candidate Sector Glow */
@keyframes laneCandidatePulse {

  0%,
  100% {
    filter: drop-shadow(0 0 8px currentColor) brightness(1.2);
    opacity: 0.92;
  }

  50% {
    filter: drop-shadow(0 0 22px currentColor) drop-shadow(0 0 35px #ffffff) brightness(1.7);
    opacity: 1;
  }
}

.lane-choice-candidate {
  cursor: pointer !important;
}

.lane-choice-candidate path {
  animation: laneCandidatePulse 1.2s ease-in-out infinite !important;
}

.lane-choice-candidate.lane-candidate-outer path {
  color: #00ffff;
}

.lane-choice-candidate.lane-candidate-middle path {
  color: #ff007f;
}

.lane-choice-candidate.lane-candidate-inner path {
  color: #ffe600;
}

.lane-btn .lane-name {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
}

.lane-btn .lane-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Game Lobby Setup Modal */
.lobby-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lobby-modal.hidden {
  display: none;
}

.lobby-card {
  background: #14141e;
  border: 2px solid var(--kf-cyan);
  border-radius: 20px;
  padding: 10px 16px;
  width: 100%;
  max-width: 960px;
  max-height: 91vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(0, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lobby-title {
  text-align: center;
}

.lobby-title h2 {
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--kf-cyan), var(--kf-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lobby-title p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

#monopoly-setup-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* Recommended Setup & 3D Hardware Banner */
.lobby-setup-banner {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

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

.setup-header-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--kf-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Development Notice Banner */
.lobby-dev-banner {
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.08);
}

/* Mobile: stack dev banner as 1 column */
@media (max-width: 768px) {
  .lobby-dev-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
}

/* Desktop-only header links (hidden on mobile) */
.desktop-only-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 900px) {
  .desktop-only-link {
    display: none !important;
  }
}

.dev-banner-badge {
  background: linear-gradient(135deg, #ffaa00, #ff5500);
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.dev-banner-text {
  font-size: 12px;
  line-height: 1.4;
  color: #f0e6d2;
}

.dev-banner-text strong {
  color: #ffaa00;
  font-weight: 800;
}

.setup-points-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 1024px) {
  .setup-points-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .setup-points-grid {
    grid-template-columns: 1fr;
  }
}

.setup-point-item {
  display: flex;
  gap: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #cfcfe2;
  background: rgba(14, 14, 22, 0.6);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.setup-point-item strong {
  color: #ffffff;
  font-weight: 800;
  display: block;
  margin-bottom: 2px;
}

.setup-point-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Saved Game Notice Banner in Lobby */
.saved-game-banner {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.saved-game-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saved-game-info strong {
  color: var(--kf-gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clear-save-btn {
  background: rgba(255, 50, 50, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 50, 50, 0.35);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.clear-save-btn:hover {
  background: rgba(255, 50, 50, 0.35);
  color: #ffffff;
  border-color: #ff4444;
}

.lobby-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.lobby-player-slot {
  background: #1c1c28;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lobby-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slot-label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.slot-remove-btn {
  background: rgba(255, 50, 50, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 50, 50, 0.35);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.15s ease;
}

.slot-remove-btn:hover {
  background: rgba(255, 50, 50, 0.45);
  color: #fff;
  border-color: #ff4444;
}

.lobby-actions-bar {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px 0;
}

.lobby-secondary-btn {
  background: rgba(0, 255, 255, 0.12);
  color: var(--kf-cyan);
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lobby-secondary-btn:hover {
  background: rgba(0, 255, 255, 0.25);
  border-color: var(--kf-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* 3D Game Piece Portrait Preview - Uncropped */
.token-preview-img {
  width: 100%;
  max-height: 85px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: contain !important;
  background: #090910;
  border: 2px solid rgba(255, 255, 255, 0.08);
  padding: 3px;
  cursor: pointer;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin: 0 auto;
}

/* 1080p desktop: compact lobby to prevent any scrolling */
@media (min-width: 1024px) and (max-width: 2559px) {
  .lobby-card {
    padding: 8px 15px;
    gap: 6px;
    max-height: 90vh;
  }

  .lobby-title {
    margin-bottom: 2px !important;
  }

  .lobby-title h2 {
    font-size: 20px;
  }

  .lobby-title p {
    font-size: 12px;
    margin-top: 1px;
  }

  .token-preview-img {
    max-height: 72px;
  }

  .setup-points-grid {
    gap: 5px;
  }

  .setup-point-item {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .lobby-player-slot {
    padding: 5px 7px;
    gap: 3px;
  }

  .lobby-player-grid {
    gap: 5px;
  }

  .lobby-dev-banner {
    padding: 6px 12px;
    font-size: 11px;
  }

  .dev-banner-text {
    font-size: 11px;
  }

  .start-game-btn {
    padding: 12px;
    font-size: 15px;
  }

  .lobby-modal {
    padding: 12px;
  }

  .lobby-secondary-btn {
    padding: 7px 16px;
    font-size: 12px;
  }

  .lobby-actions-bar {
    margin: 2px 0 1px 0;
  }

  .asset-size-notice {
    padding: 7px 12px !important;
  }

  .chess-options-row {
    gap: 8px;
  }

  .chess-setting-box {
    padding: 8px 10px;
  }

  .chess-options-container {
    margin-bottom: 8px !important;
  }

  .lobby-options-row {
    padding: 8px 12px;
    margin-bottom: 8px;
  }
}

.token-preview-img:hover {
  transform: scale(1.04);
  border-color: var(--kf-cyan);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 255, 0.3);
}

.token-click-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 700;
  margin-top: -4px;
}

.slot-input {
  background: #111118;
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}

.slot-select {
  background: #111118;
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.start-game-btn {
  background: linear-gradient(135deg, var(--kf-cyan), var(--kf-pink));
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 18px;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
  transition: all 0.2s;
}

.start-game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255, 0, 127, 0.5);
}

/* In-Modal Property Details Bar (Integration with existing Gallery Modal) */
.modal-game-info {
  background: #181822;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.game-info-row .label {
  color: var(--text-muted);
}

.game-info-row .val {
  color: #ffffff;
}

.modal-game-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-action-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

/* ==========================================================================
   LOBBY MODE SWITCHER & CHESS SETUP CONTROLS
   ========================================================================== */

.lobby-mode-toggle-bar {
  display: flex;
  background: rgba(10, 10, 18, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 5px;
  gap: 8px;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lobby-mode-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #9494a8;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-transform: uppercase;
}

.lobby-mode-tab .tab-mode-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.lobby-mode-tab .tab-mode-sub {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: #c4c4dc;
  white-space: nowrap;
}

.lobby-mode-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.lobby-mode-tab:hover .tab-mode-sub {
  color: #ffffff;
}

.lobby-mode-tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 127, 0.25));
  color: #ffffff;
  border-color: var(--kf-cyan);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.35), inset 0 0 8px rgba(0, 255, 255, 0.15);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.lobby-mode-tab.active .tab-mode-sub {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* Asset Weight Badges on Lobby Tabs */
.tab-mode-asset-badge {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 5px;
  margin-top: 3px;
  text-transform: none;
  line-height: 1;
}

.tab-mode-asset-badge.heavy {
  background: rgba(255, 170, 0, 0.16);
  color: #ffb833;
  border: 1px solid rgba(255, 170, 0, 0.38);
}

.tab-mode-asset-badge.light {
  background: rgba(0, 255, 102, 0.16);
  color: #33ff88;
  border: 1px solid rgba(0, 255, 102, 0.38);
}

.tab-mode-asset-badge.stream {
  background: rgba(0, 220, 255, 0.16);
  color: #33ddff;
  border: 1px solid rgba(0, 220, 255, 0.38);
}

/* Asset Size Notice Callouts on Lobby Options Panels */
.asset-size-notice {
  background: rgba(18, 20, 32, 0.85);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 1.4;
}

.asset-size-notice.heavy {
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: linear-gradient(135deg, rgba(32, 24, 14, 0.88), rgba(18, 20, 32, 0.88));
}

.asset-size-notice.light {
  border: 1px solid rgba(0, 255, 102, 0.35);
  background: linear-gradient(135deg, rgba(12, 28, 20, 0.88), rgba(18, 20, 32, 0.88));
}

.asset-size-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.asset-size-info {
  flex: 1;
}

.asset-size-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.asset-size-header strong {
  font-size: 12px;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.asset-size-notice.heavy .asset-size-header strong {
  color: #ffd066;
}

.asset-size-notice.light .asset-size-header strong {
  color: #66ffaa;
}

.asset-size-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  background: rgba(255, 170, 0, 0.2);
  color: #ffb833;
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.asset-size-tag.light-tag {
  background: rgba(0, 255, 102, 0.2);
  color: #33ff88;
  border: 1px solid rgba(0, 255, 102, 0.4);
}

.asset-size-desc {
  font-size: 11px;
  color: #b0b4cc;
}


/* Mobile Mode Switcher Dropdown (Replaces 5 tabs to eliminate horizontal scrolling) */
.lobby-mode-select-mobile {
  display: none;
  width: 100%;
  background: rgba(14, 14, 24, 0.95);
  border: 2px solid var(--kf-cyan);
  border-radius: 12px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 10px 14px;
  outline: none;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.25);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%2300ffff'%3E%3Cpath%20d='M7%2010l5%205%205-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

@media (max-width: 768px) {
  .lobby-mode-toggle-bar {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
  }
  .lobby-mode-tab {
    display: none !important;
  }
  .lobby-mode-select-mobile {
    display: block !important;
  }
}

body.is-mobile-device .lobby-mode-toggle-bar {
  display: block !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: 12px !important;
}
body.is-mobile-device .lobby-mode-tab {
  display: none !important;
}
body.is-mobile-device .lobby-mode-select-mobile {
  display: block !important;
}

.lobby-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 15, 24, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.lobby-options-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  color: #d0d0e6;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.view-pill-selector {
  display: inline-flex;
  background: #0d0d15;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.view-pill-btn {
  background: transparent;
  border: none;
  color: #8b8ba0;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-pill-btn:hover {
  color: #ffffff;
}

.view-pill-btn.active {
  background: linear-gradient(135deg, var(--kf-cyan), #0099ff);
  color: #0c0c14;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(0, 255, 255, 0.35);
}

/* Chess Configuration Panel */
.chess-config-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInLobby 0.3s ease-out;
}

.chess-badge-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255, 0, 127, 0.15), rgba(0, 255, 255, 0.15));
  border: 1px solid rgba(255, 0, 127, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #f0f0ff;
}

.chess-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* Structured 2-Row Chess Options Layout */
.chess-options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.chess-options-row {
  display: grid;
  gap: 12px;
  width: 100%;
}

.chess-options-row.chess-row-1 {
  grid-template-columns: 1fr 1fr 1fr 1.15fr;
}

.chess-options-row.chess-row-2 {
  grid-template-columns: 1fr 1fr 1.35fr;
}

@media (max-width: 860px) {

  .chess-options-row.chess-row-1,
  .chess-options-row.chess-row-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {

  .chess-options-row.chess-row-1,
  .chess-options-row.chess-row-2 {
    grid-template-columns: 1fr;
  }
}

.chess-setting-box {
  background: rgba(18, 18, 28, 0.9);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 84px;
}

.chess-setting-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kf-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Match Timer Controls in Setup Box */
.chess-timer-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.chess-timer-toggle-btn {
  width: 100%;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  color: #c0c0d8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chess-timer-toggle-btn:hover {
  background: rgba(0, 255, 255, 0.12);
  border-color: var(--kf-cyan);
  color: #fff;
}

.chess-timer-toggle-btn.active {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.25), rgba(255, 0, 127, 0.25));
  border-color: var(--kf-cyan);
  color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}

.chess-timer-pills {
  display: flex;
  gap: 4px;
  width: 100%;
}

.chess-time-pill {
  flex: 1;
  padding: 5px 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 25, 0.8);
  color: #a0a0b8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.chess-time-pill:hover {
  border-color: var(--kf-cyan);
  color: #fff;
}

.chess-time-pill.active {
  background: linear-gradient(135deg, var(--kf-cyan), #0099ff);
  color: #0c0c14;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 255, 255, 0.35);
}

/* Visual Theme Dropdown with Swatches */
.chess-visual-theme-picker {
  position: relative;
  width: 100%;
}

.chess-theme-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(14, 14, 22, 0.9);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.chess-theme-trigger:hover {
  border-color: var(--kf-cyan);
  background: rgba(20, 20, 32, 0.95);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
}

.theme-trigger-swatches {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.theme-board-mini {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.board-mini-sq {
  width: 100%;
  height: 100%;
}

.theme-trigger-name {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-trigger-arrow {
  font-size: 10px;
  color: var(--kf-cyan);
}

.chess-theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  background: #12121e;
  border: 1px solid var(--kf-cyan);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 255, 0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chess-theme-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.18s ease;
}

.chess-theme-option-item:hover {
  background: rgba(0, 255, 255, 0.12);
  border-color: rgba(0, 255, 255, 0.3);
}

.chess-theme-option-item.active {
  background: rgba(0, 255, 255, 0.2);
  border-color: var(--kf-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}

.theme-opt-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.theme-opt-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.theme-opt-desc {
  font-size: 10px;
  color: #8e8ea6;
}

/* 50/50 Layout for Resume & New Game buttons */
.chess-start-actions-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.chess-start-actions-row .start-game-btn {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chess-pieces-preview-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  background: rgba(12, 12, 20, 0.95);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px 16px;
}

.chess-piece-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  background: #181826;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chess-piece-card:hover {
  transform: translateY(-5px);
  border-color: var(--kf-cyan);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.35);
  background: #202032;
}

.chess-piece-card img {
  width: 98px;
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
  transition: transform 0.25s ease;
}

.chess-piece-card:hover img {
  transform: scale(1.12);
}

.chess-piece-name {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 10px;
  text-align: center;
  letter-spacing: 0.5px;
}

/* 3D GALLERY SECTION & SHOWCASE STYLES */
.gallery-config-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInLobby 0.25s ease;
}

.gallery-filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-filter-btn {
  background: #181826;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 6px 14px;
  color: #cfcfe2;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-filter-btn:hover {
  border-color: var(--kf-cyan);
  color: #fff;
}

.gallery-filter-btn.active {
  background: linear-gradient(135deg, var(--kf-cyan), var(--kf-pink));
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 4px;
}

.gallery-card {
  background: #181826;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--kf-gold);
  box-shadow: 0 6px 20px rgba(255, 230, 0, 0.25);
  background: #222234;
}

.gallery-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  transition: transform 0.2s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.gallery-card-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--kf-cyan);
  text-transform: uppercase;
  margin-top: 2px;
}

.gallery-card-artist {
  border-top-width: 3px;
}

.gallery-card-ring-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  color: #000;
  background: var(--kf-cyan);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

.gallery-card-glbadge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
  line-height: 1;
  background: rgba(20, 20, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 3px 5px;
  pointer-events: none;
}

/* 3D Model Inspector Modal */
.inspector-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 18, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.inspector-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.inspector-card {
  background: #141422;
  border: 2px solid var(--kf-cyan);
  border-radius: 20px;
  width: 94%;
  max-width: 960px;
  height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 255, 255, 0.35);
  position: relative;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-border);
  background: #0e0e18;
}

.inspector-title-wrap h3 {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.inspector-title-wrap p {
  font-size: 12px;
  color: var(--text-muted);
}

.inspector-body {
  flex: 1;
  min-height: 420px;
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1b1b30 0%, #0c0c14 100%);
  overflow: hidden;
}

#inspector-viewport {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

/* Inspector STL Loading Spinner */
.inspector-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: none;
  background: rgba(14, 14, 24, 0.88);
  padding: 22px 34px;
  border-radius: 16px;
  border: 1px solid var(--kf-cyan);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.35);
}

.inspector-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 255, 255, 0.2);
  border-top-color: var(--kf-cyan);
  border-radius: 50%;
  animation: spinInspector 0.8s linear infinite;
}

@keyframes spinInspector {
  to {
    transform: rotate(360deg);
  }
}

.inspector-loading-text {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inspector-loading-sub {
  font-size: 12px;
  color: var(--kf-cyan);
  font-weight: 700;
}

/* 3D Chess Action Bar & Turn HUD */
.chess-action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 100;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.chess-turn-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
}

.chess-turn-dot,
.checkers-turn-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.chess-turn-dot.white,
.checkers-turn-dot.white {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.chess-turn-dot.black,
.checkers-turn-dot.black {
  background: #111118;
  border-color: var(--kf-pink);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.8);
}

.chess-status-banner {
  font-size: 13px;
  color: var(--kf-cyan);
  font-weight: 700;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

/* In-Game Chess Timer HUD */
.chess-timer-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.chess-clock-badge {
  font-family: monospace, "Courier New", sans-serif;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #a0a0be;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.chess-clock-badge.active {
  border-color: var(--kf-cyan);
  color: #00ffff;
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

.chess-clock-badge.low-time {
  border-color: #ff3344 !important;
  color: #ff4455 !important;
  background: rgba(255, 50, 70, 0.25) !important;
  animation: pulseLowTime 0.8s infinite alternate;
}

@keyframes pulseLowTime {
  from {
    box-shadow: 0 0 4px rgba(255, 50, 70, 0.4);
  }

  to {
    box-shadow: 0 0 14px rgba(255, 50, 70, 0.9);
  }
}

.chess-bar-actions {
  display: flex;
  gap: 8px;
}

.hud-theme-select {
  min-width: 138px;
  padding: 7px 9px;
  border: 1px solid var(--kf-cyan);
  border-radius: 7px;
  background: #101522;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.chess-loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 14, 24, 0.92);
  padding: 28px 40px;
  border-radius: 20px;
  border: 2px solid var(--kf-cyan);
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 200;
  pointer-events: none;
}

.board-cell.property-owned path {
  filter: drop-shadow(0 0 5px currentColor);
}


.board-cell.ownership-flash {
  animation: ownershipFlash 1.4s ease-out;
}

/* Mobile-Disabled Buttons & Mobile Companion Notice */
.lobby-mode-tab.mobile-disabled,
.start-game-btn.mobile-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.85) !important;
  box-shadow: none !important;
  transform: none !important;
  pointer-events: auto;
}

.mobile-only-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.5px;
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid rgba(255, 170, 0, 0.45);
  color: #ffaa00;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  font-weight: 700;
  vertical-align: middle;
  text-shadow: none;
}

.mobile-companion-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(0, 112, 192, 0.25), rgba(0, 255, 255, 0.15));
  border: 1px solid var(--kf-cyan);
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.mobile-hero-icon {
  font-size: 36px;
  line-height: 1;
}

.mobile-hero-content h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--kf-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-hero-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.mobile-companion-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0070c0, var(--kf-cyan));
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 112, 192, 0.4);
  transition: transform 0.2s ease;
}

.mobile-companion-cta-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.mobile-gallery-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-gallery-cta-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes ownershipFlash {

  0%,
  100% {
    opacity: 1;
  }

  35% {
    opacity: 0.35;
    filter: brightness(1.8) drop-shadow(0 0 12px #ffffff);
  }
}

.inspector-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid var(--panel-border);
  background: #0e0e18;
  flex-wrap: wrap;
}

.inspector-ctrl-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

@keyframes fadeInLobby {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3D Camera Controls HUD */
.camera-3d-hud {
  position: absolute;
  top: 76px;
  right: 24px;
  z-index: 1200;
  display: flex;
  align-items: center;
  pointer-events: auto;
  animation: fadeInLobby 0.3s ease;
}

.camera-hud-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 16, 26, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 6px 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 255, 0.15);
}

.camera-hud-title {
  font-size: 11px;
  font-weight: 900;
  color: var(--kf-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 4px;
}

.cam-preset-pills {
  display: flex;
  gap: 4px;
  background: rgba(8, 8, 14, 0.8);
  border-radius: 20px;
  padding: 3px;
}

.cam-pill-btn {
  background: transparent;
  border: none;
  color: #a0a0b8;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cam-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.cam-pill-btn.active {
  background: linear-gradient(135deg, var(--kf-cyan), #0070c0);
  color: #000000;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

#btn-cam-action.active {
  background: linear-gradient(135deg, #ff007f, #ff8800);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(255, 0, 127, 0.65);
  animation: actionCamGlow 2s infinite alternate;
}

@keyframes actionCamGlow {
  0% { box-shadow: 0 0 8px rgba(255, 0, 127, 0.5); }
  100% { box-shadow: 0 0 18px rgba(255, 136, 0, 0.85); }
}

.cam-mode-divider {
  width: 1px;
  height: 20px;
  background: var(--panel-border);
}

.cam-lock-btn {
  background: rgba(255, 0, 127, 0.12);
  border: 1px solid rgba(255, 0, 127, 0.35);
  color: var(--kf-pink);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.cam-lock-btn:hover {
  background: rgba(255, 0, 127, 0.25);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
}

.cam-lock-btn.locked {
  background: linear-gradient(135deg, var(--kf-pink), #e91e63);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
}

.cam-reset-btn {
  background: #181826;
  border: 1px solid var(--panel-border);
  color: #cfcfe2;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cam-reset-btn:hover {
  border-color: var(--kf-gold);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.3);
}

/* 4K and Ultra-HD Displays (>= 2560px width and >= 1300px height) */
@media (min-width: 2560px) and (min-height: 1300px) {
  .lobby-card {
    max-width: 1100px;
    padding: 14px 22px;
    gap: 9px;
    max-height: 88vh;
  }

  .lobby-title h2 {
    font-size: 32px;
  }

  .lobby-title p {
    font-size: 15px;
  }

  .setup-point-item {
    font-size: 13px;
    padding: 10px 14px;
  }

  .token-preview-img {
    width: 110px;
    height: 110px;
  }

  .players-hud {
    width: 260px;
    top: 86px;
  }

  .player-hud-card {
    padding: 12px 16px;
  }

  .player-hud-name {
    font-size: 15px;
  }

  .player-records-badge {
    font-size: 19px;
  }

  .action-dock {
    padding: 14px 30px;
    bottom: 28px;
    gap: 18px;
  }

  .die-box {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .dock-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .jackpot-badge {
    bottom: 28px;
    padding: 12px 20px;
  }

  .jackpot-badge .amount {
    font-size: 22px;
  }
}

/* ==========================================================================
   CORNERSTONE JUNCTION LANE HIGHLIGHTS & RING MOVEMENT VISUALS
   ========================================================================== */

.junction-conduit-pulse {
  animation: conduitPulse 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 16px var(--kf-cyan));
}

@keyframes conduitPulse {
  0% {
    stroke-opacity: 0.45;
    stroke-width: 4px;
  }

  100% {
    stroke-opacity: 1;
    stroke-width: 6.5px;
  }
}

.lane-arrow-track {
  stroke-dasharray: 8 6;
  animation: arrowTrackFlow 1.2s linear infinite;
  filter: drop-shadow(0 0 6px currentColor);
}

@keyframes arrowTrackFlow {
  from {
    stroke-dashoffset: 28;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.ring-transfer-flash {
  animation: ringTransferPulse 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  filter: drop-shadow(0 0 12px #00ffff) drop-shadow(0 0 24px #00ffff);
}

@keyframes ringTransferPulse {
  0% {
    stroke-opacity: 1;
    stroke-width: 8px;
  }

  70% {
    stroke-opacity: 0.9;
    stroke-width: 5px;
  }

  100% {
    stroke-opacity: 0;
    stroke-width: 1px;
  }
}

.lane-select-badge {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  animation: badgeFloatingPulse 1.4s ease-in-out infinite alternate;
}

.lane-select-badge:hover {
  transform: scale(1.15) !important;
  filter: brightness(1.3) drop-shadow(0 0 16px currentColor);
}

@keyframes badgeFloatingPulse {
  0% {
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.4));
  }

  100% {
    filter: drop-shadow(0 0 14px rgba(255, 0, 127, 0.8));
  }
}

.lane-choice-candidate {
  animation: laneCandidateBlink 1.2s ease-in-out infinite alternate;
  cursor: pointer;
}

@keyframes laneCandidateBlink {
  0% {
    filter: brightness(1.1) drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
  }

  100% {
    filter: brightness(1.5) drop-shadow(0 0 18px currentColor);
  }
}

/* Checkers Matchups Preview Grid */
.checkers-matchups-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.checkers-matchup-card {
  background: rgba(18, 18, 30, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.checkers-matchup-card:hover {
  background: rgba(30, 30, 48, 0.95);
  border-color: var(--kf-cyan);
  transform: translateY(-2px);
}

.checkers-matchup-card.active {
  border-color: var(--kf-cyan);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.12), rgba(255, 0, 127, 0.12));
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.35);
}

.matchup-pieces-dual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.matchup-single-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.matchup-single-piece img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
  transition: transform 0.2s ease;
}

.checkers-matchup-card:hover .matchup-single-piece img {
  transform: scale(1.08);
}

.matchup-single-piece span {
  font-size: 10px;
  font-weight: 700;
  color: #cfcfe2;
  margin-top: 4px;
}

.matchup-vs-divider {
  font-size: 12px;
  font-weight: 900;
  color: var(--kf-pink);
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.8);
}

.matchup-card-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 8px;
  text-align: center;
}

/* Selected Checkers Matchup Spotlight Box */
.checkers-selected-preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 2px 0 6px 0;
}

.checkers-selected-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(20, 20, 36, 0.95), rgba(12, 12, 22, 0.95));
  border: 1px solid var(--kf-cyan);
  border-radius: 12px;
  padding: 8px 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 255, 255, 0.15);
  max-width: 540px;
  width: 100%;
}

/* Compact Checkers Options Panel with No Scrolling */
#checkers-setup-section {
  gap: 10px;
  overflow-y: hidden;
}

#checkers-setup-section .chess-options-container {
  gap: 10px;
}

/* Symmetric 4-Column Grid for Both Checkers Rows */
#checkers-setup-section .chess-options-row.chess-row-1,
#checkers-setup-section .chess-options-row.chess-row-2 {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1.15fr 1.15fr;
  gap: 10px;
  width: 100%;
}

#checkers-setup-section .chess-setting-box {
  min-height: 72px;
  padding: 8px 10px;
  gap: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

#checkers-setup-section .chess-setting-title {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#checkers-setup-section .slot-select {
  height: 30px;
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#checkers-setup-section .view-pill-selector {
  height: 30px;
  padding: 2px;
  gap: 3px;
  box-sizing: border-box;
}

#checkers-setup-section .view-pill-btn {
  height: 24px;
  font-size: 11px;
  padding: 2px 6px;
  line-height: 1;
}

#checkers-setup-section .chess-theme-trigger {
  height: 30px;
  padding: 3px 8px;
  box-sizing: border-box;
  font-size: 11px;
}

#checkers-setup-section .theme-trigger-name {
  font-size: 11px;
  max-width: 125px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#checkers-setup-section #checkers-timer-box .chess-timer-controls {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#checkers-setup-section .chess-timer-toggle-btn {
  padding: 2px 6px;
  font-size: 10.5px;
  height: 18px;
  line-height: 1;
}

#checkers-setup-section .chess-time-pill {
  padding: 2px 3px;
  font-size: 10px;
  height: 18px;
  line-height: 1;
  flex: 1;
}

#checkers-setup-section .chess-badge-banner {
  padding: 8px 14px;
}

/* Compact Guided Mode box for Chess */
#chess-guided-box {
  min-height: 60px;
  padding: 6px 10px;
  gap: 4px;
  justify-content: center;
}

#chess-guided-box .chess-setting-title {
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

#chess-guided-box .view-pill-selector {
  padding: 2px;
  gap: 3px;
  height: 26px;
  align-items: center;
}

#chess-guided-box .view-pill-btn {
  padding: 3px 8px;
  font-size: 11px;
  height: 22px;
  line-height: 1;
  justify-content: center;
}

/* Make row 2 boxes in Chess harmonized & sleek */
#chess-setup-section .chess-options-row.chess-row-2 .chess-setting-box {
  min-height: 64px;
  padding: 8px 10px;
  gap: 5px;
}

/* Compact Marble Options Panel with No Scrolling - Matching Checkers */
#marble-setup-section {
  gap: 10px;
  overflow-y: hidden;
}

#marble-setup-section .chess-options-container {
  gap: 10px;
}

/* Symmetric 4-Column Grid for Both Marble Rows */
#marble-setup-section .chess-options-row.chess-row-1,
#marble-setup-section .chess-options-row.chess-row-2 {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1.15fr 1.15fr;
  gap: 10px;
  width: 100%;
}

#marble-setup-section .chess-setting-box {
  min-height: 72px;
  padding: 8px 10px;
  gap: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

#marble-setup-section .chess-setting-title {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#marble-setup-section .slot-select {
  height: 30px;
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#marble-setup-section .view-pill-selector {
  height: 30px;
  padding: 2px;
  gap: 3px;
  box-sizing: border-box;
}

#marble-setup-section .view-pill-btn {
  height: 24px;
  font-size: 11px;
  padding: 2px 6px;
  line-height: 1;
}

#marble-setup-section .chess-theme-trigger {
  height: 30px;
  padding: 3px 8px;
  box-sizing: border-box;
  font-size: 11px;
}

#marble-setup-section .theme-trigger-name {
  font-size: 11px;
  max-width: 125px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#marble-setup-section #marble-timer-box .chess-timer-controls {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#marble-setup-section .chess-timer-toggle-btn {
  padding: 2px 6px;
  font-size: 10.5px;
  height: 18px;
  line-height: 1;
}

#marble-setup-section .chess-time-pill {
  padding: 2px 3px;
  font-size: 10px;
  height: 18px;
  line-height: 1;
  flex: 1;
}

#marble-setup-section .chess-badge-banner {
  padding: 8px 14px;
}

/* Marble Spotlight & Crew Badges */
.marble-preview-ball-badge {
  font-size: 32px;
  filter: drop-shadow(0 0 10px var(--kf-cyan));
  animation: floatBall 2s ease-in-out infinite alternate;
}

@keyframes floatBall {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.marble-crew-preview-rack {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.crew-preview-badge {
  font-size: 16px;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.crew-preview-badge:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 8px var(--kf-pink));
}

/* In-Game Crew HUD */
.marble-crew-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.crew-hud-item {
  font-size: 16px;
  opacity: 0.25;
  filter: grayscale(1);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.crew-hud-item.collected {
  opacity: 1;
  filter: grayscale(0) drop-shadow(0 0 8px #00ffff);
  transform: scale(1.2);
}

/* Monopoly Redesign: Lobby Options Row & Theme Picker */
.monopoly-options-container {
  margin-bottom: 12px;
  background: rgba(14, 14, 24, 0.7);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 500;
}

#monopoly-setup-section .chess-theme-setting-box {
  position: relative;
  z-index: 600;
}

#monopoly-setup-section .chess-visual-theme-picker {
  position: relative;
  z-index: 700;
}

#monopoly-theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  background: #12121e;
  border: 1px solid var(--kf-cyan);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 255, 255, 0.25);
  z-index: 99999;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

#monopoly-setup-section .chess-theme-trigger {
  background: rgba(10, 10, 18, 0.9);
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: 10px;
  color: #ffffff;
  padding: 8px 12px;
}

#monopoly-setup-section .chess-theme-trigger:hover {
  border-color: var(--kf-cyan);
  background: rgba(18, 18, 30, 0.95);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

#monopoly-setup-section .theme-trigger-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

#monopoly-starting-records {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#monopoly-starting-records:hover,
#monopoly-starting-records:focus {
  border-color: var(--kf-cyan) !important;
  background: rgba(18, 18, 30, 0.95) !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.25) !important;
}

@media (max-width: 600px) {
  .monopoly-options-row {
    grid-template-columns: 1fr !important;
  }
}

/* Monopoly In-Game 3D Camera HUD Theme Select */
.cam-theme-select-wrap {
  display: flex;
  align-items: center;
}

.cam-theme-select {
  background: rgba(14, 14, 22, 0.9);
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: 16px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.cam-theme-select:hover {
  border-color: var(--kf-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.cam-theme-select option {
  background: #12121e;
  color: #fff;
}

/* ============================================================
   LOBBY EXTERNAL LINKS BAR (Online 3D + 3D Studio shortcuts)
   ============================================================ */
.lobby-external-links-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lobby-ext-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
  background: rgba(0, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.28);
  border-radius: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.lobby-ext-link:hover {
  background: rgba(0, 255, 255, 0.14);
  border-color: var(--kf-cyan);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
}

.lobby-ext-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.lobby-ext-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.lobby-ext-text strong {
  font-size: 13px;
  font-weight: 900;
  color: var(--kf-cyan);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.lobby-ext-text span {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.lobby-ext-arrow {
  font-size: 16px;
  color: rgba(0, 255, 255, 0.5);
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.lobby-ext-link:hover .lobby-ext-arrow {
  color: var(--kf-cyan);
  transform: translate(2px, -2px);
}

/* Hide on mobile — desktop-only tools */
@media (max-width: 900px) {
  .lobby-external-links-bar {
    display: none !important;
  }
}

/* Compact on 1080p — keep it to single line */
@media (min-width: 1024px) and (max-width: 2559px) {
  .lobby-ext-link {
    padding: 7px 11px;
    border-radius: 10px;
  }

  .lobby-ext-icon {
    font-size: 18px;
  }

  .lobby-ext-text strong {
    font-size: 11.5px;
  }

  .lobby-ext-text span {
    font-size: 10px;
  }
}

/* ==========================================================================
   VISUAL & GAMEPLAY ENHANCEMENTS: BADGES, TOASTS & MILESTONE BANNERS
   ========================================================================== */

/* 1. Dynamic Floating Fee Badges */
.floating-fee-badge {
  position: absolute;
  top: -16px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  z-index: 10000;
  animation: floatUpFade 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.floating-fee-badge.negative {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.95), rgba(183, 28, 28, 0.95));
  color: #ffffff;
  border: 1px solid #ff5252;
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.floating-fee-badge.positive {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.95), rgba(0, 200, 83, 0.95));
  color: #051a05;
  border: 1px solid #69f0ae;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.floating-fee-badge.synergy {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 4px 12px rgba(0, 0, 0, 0.6);
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translateY(-8px) scale(1.15);
  }
  30% {
    transform: translateY(-16px) scale(1.0);
  }
  75% {
    opacity: 1;
    transform: translateY(-34px) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translateY(-52px) scale(0.85);
  }
}

/* 2. Sleek Slide-in Game Toast Container & Cards */
#game-toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.game-toast {
  background: rgba(13, 17, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--toast-border, rgba(0, 255, 255, 0.4));
  border-left: 4px solid var(--toast-color, var(--kf-cyan));
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px var(--toast-glow, rgba(0, 255, 255, 0.25));
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.game-toast.removing {
  animation: toastSlideOut 0.3s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(80px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(80px) scale(0.9);
  }
}

.game-toast-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.game-toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.game-toast-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--toast-color, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-toast-msg {
  font-size: 12px;
  color: #d1d5db;
  line-height: 1.35;
}

.game-toast-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 4px;
  margin-top: 3px;
  background: rgba(255, 255, 255, 0.12);
}

/* 3. Milestone Celebration Banner Overlay */
#milestone-banner-overlay {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  z-index: 10050;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

#milestone-banner-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.milestone-banner-box {
  background: radial-gradient(circle at center, rgba(22, 28, 46, 0.96) 0%, rgba(10, 12, 22, 0.98) 100%);
  border: 2px solid var(--banner-color, #ffd700);
  box-shadow: 0 0 50px var(--banner-glow, rgba(255, 215, 0, 0.6)), inset 0 0 30px rgba(0, 0, 0, 0.85);
  border-radius: 20px;
  padding: 24px 38px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 520px;
}

.milestone-banner-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 16px var(--banner-color, #ffd700));
  animation: milestoneBounce 1s infinite alternate ease-in-out;
}

@keyframes milestoneBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.1); }
}

.milestone-banner-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 0 20px var(--banner-color, #ffd700);
}

.milestone-banner-desc {
  font-size: 14px;
  color: #e5e7eb;
  font-weight: 600;
  line-height: 1.4;
}

.milestone-banner-amount {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #39ff14;
  text-shadow: 0 0 15px rgba(57, 255, 20, 0.8);
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid #39ff14;
  border-radius: 12px;
  padding: 4px 18px;
  margin-top: 4px;
}