:root {
  --bg-dark: #05060a;
  --panel-bg: rgba(11, 15, 25, 0.88);
  --panel-border: rgba(16, 185, 129, 0.25);
  
  /* Psychological Palette */
  --p1-green: #10b981;
  --p1-glow: rgba(16, 185, 129, 0.5);
  --p2-crimson: #f43f5e;
  --p2-glow: rgba(244, 63, 94, 0.5);
  
  --accent-cyan: #00f0ff;
  --accent-gold: #fbbf24;
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

/* ================= GHSLET GAMES INTRO SPLASH SCREEN ================= */
.splash-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #040508;
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s ease;
  pointer-events: auto;
}

.splash-screen-overlay.fade-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.splash-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, rgba(0, 240, 255, 0.25) 50%, transparent 75%);
  filter: blur(14px);
  animation: splashPulse 2s infinite alternate;
}

.crazy-gamer-svg {
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.45)) drop-shadow(0 0 28px rgba(16, 185, 129, 0.4));
  animation: splashGamerHover 2.4s ease-in-out infinite alternate;
}

@keyframes splashGamerHover {
  0% {
    transform: translateY(0px) scale(1);
  }
  100% {
    transform: translateY(-6px) scale(1.04);
  }
}

.splash-logo-hexagon {
  width: 86px;
  height: 86px;
  background: linear-gradient(135deg, #09131e 0%, #050811 100%);
  border: 2.5px solid var(--p1-green);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.45), inset 0 0 15px rgba(16, 185, 129, 0.25);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform: rotate(45deg);
  animation: splashRotateHex 3s infinite alternate ease-in-out;
}

.splash-letter-g {
  transform: rotate(-45deg);
  font-family: 'Outfit', sans-serif;
  font-size: 52px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #34d399 50%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(16, 185, 129, 0.8);
  letter-spacing: -2px;
}

@keyframes splashPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1.0; }
}

@keyframes splashRotateHex {
  0% { transform: rotate(45deg) scale(0.96); }
  100% { transform: rotate(45deg) scale(1.04); }
}

.splash-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.splash-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.splash-bar-container {
  width: 130px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.splash-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #00f0ff);
  box-shadow: 0 0 10px #10b981;
  border-radius: 999px;
  animation: splashFill 1.8s forwards ease-in-out;
}

@keyframes splashFill {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* Three.js 3D Background Viewport */
#threeCanvasContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
}

/* Glassmorphism Floating Panel with Neon Trim */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.neon-glow-box {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.18), 0 20px 40px rgba(0, 0, 0, 0.85);
}

/* Screen Overlays */
.screen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
}

.screen-overlay.active {
  display: flex;
  pointer-events: auto;
}

/* ================= MODALS & POPUPS ================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 15, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.25s ease-out;
}

.modal-overlay.active {
  display: flex !important;
}

@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(10, 15, 28, 0.96);
  border: 1.5px solid rgba(0, 255, 136, 0.4);
  border-radius: 22px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 32px rgba(0, 255, 136, 0.25);
  animation: modalPopIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
  margin: 0 auto 14px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35);
}

.modal-card h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  color: #ffffff;
}

.modal-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Private Room Share Box */
.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(0, 255, 136, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  gap: 12px;
  margin-bottom: 12px;
}

.share-field {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}

.share-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.share-code {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #00ff88;
  text-shadow: 0 0 16px rgba(0, 255, 136, 0.6);
  font-family: monospace, sans-serif;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(0, 240, 255, 0.15);
  border-top-color: #00f0ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* Radar Matchmaking Scanner */
.radar-scan-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-scan-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.radar-scan-ring.ring-1 { width: 30px; height: 30px; }
.radar-scan-ring.ring-2 { width: 60px; height: 60px; }
.radar-scan-ring.ring-3 { width: 90px; height: 90px; }

.radar-scan-beam {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(0, 240, 255, 0.45) 360deg);
  animation: radarSweep 1.6s linear infinite;
}

.radar-center-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 12px #00f0ff;
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.found-opponent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 240, 255, 0.12);
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  margin-bottom: 14px;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.found-flag {
  font-size: 26px;
}

.found-info {
  text-align: left;
}

.found-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.found-rating {
  font-size: 12px;
  font-weight: 700;
  color: #00f0ff;
}

/* Ranked Match Result Widget (Victory Modal) */
.ranked-result-card {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trophy-delta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trophy-delta-pill {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trophy-delta-pill.win {
  background: rgba(0, 255, 136, 0.18);
  border: 1.5px solid #00ff88;
  color: #00ff88;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.35);
  animation: pulseScale 1.4s infinite alternate ease-in-out;
}

.trophy-delta-pill.loss {
  background: rgba(244, 63, 94, 0.18);
  border: 1.5px solid #f43f5e;
  color: #f43f5e;
}

.streak-pill {
  font-size: 11px;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  padding: 3px 8px;
  border-radius: 10px;
}

.tier-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.tier-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #00ff88);
  box-shadow: 0 0 10px #00ff88;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulseScale {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

/* ================= MINIMALIST CYBER ARENA HOME SCREEN ================= */
#lobbyScreen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 14px 24px;
  background: radial-gradient(circle at 50% 0%, #0c1424 0%, #05070e 60%, #020306 100%);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#lobbyScreen.active {
  display: flex !important;
  pointer-events: auto !important;
}

/* Ambient Neon Aura Halos */
.minimal-ambient-halo {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.22;
  z-index: 1;
  animation: haloFloat 10s ease-in-out infinite alternate;
}

.halo-emerald {
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, #00ff88 0%, transparent 70%);
}

.halo-cyan {
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle, #00f0ff 0%, transparent 70%);
  animation-delay: -5s;
}

@keyframes haloFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 30px) scale(1.15); }
}

.minimal-lobby-shell {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

/* Top Bar */
.minimal-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 2px;
}

.minimal-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.brand-crest-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ff88, #00f0ff);
  color: #021a10;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.brand-name {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.minimal-header-actions {
  display: flex;
  gap: 8px;
}

.minimal-glass-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.minimal-glass-circle:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
  transform: scale(1.08);
}

/* Minimal Hero Section */
.minimal-hero-section {
  text-align: center;
  padding: 4px 0 2px;
}

.minimal-hero-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #ffffff;
  margin: 0;
  line-height: 1;
  text-shadow: 0 0 24px rgba(0, 255, 136, 0.25);
}

.minimal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #00ff88;
  text-transform: uppercase;
}

.hero-badge-spark {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
}

/* Player Profile Bar */
.minimal-profile-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(12, 18, 32, 0.7);
  border: 1px solid rgba(0, 255, 136, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.profile-avatar-orb {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.profile-chibi-svg {
  width: 100%;
  height: 100%;
}

.avatar-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00ff88;
  border: 1.5px solid #070a14;
  box-shadow: 0 0 6px #00ff88;
}

.profile-name-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-rank-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-tier-pill {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
}

.profile-trophy-pill {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
}

.profile-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.minimal-alias-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  outline: none;
  padding: 0;
}

.minimal-alias-input:focus {
  color: #00ff88;
}

/* Mode Stack */
.minimal-modes-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.minimal-mode-card {
  position: relative;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 16, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.minimal-mode-card:hover {
  transform: translateY(-1.5px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.card-featured {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(8, 13, 24, 0.9));
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.12), 0 6px 20px rgba(0, 0, 0, 0.6);
}

.card-featured:hover {
  border-color: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.25), 0 8px 24px rgba(0, 0, 0, 0.75);
}

.mode-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-cyan {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.pill-amber {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.mode-info {
  flex: 1;
}

.mode-headline {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mode-subline {
  font-size: 11px;
  color: var(--text-muted);
}

.mode-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 10px;
}

.tag-emerald {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #00ff88;
}

/* Minimal Buttons */
.minimal-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 11px;
  border: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
}

.btn-hero-emerald {
  background: linear-gradient(135deg, #00ff88 0%, #059669 100%);
  color: #021a10;
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.4);
}

.btn-hero-emerald:hover, .btn-hero-emerald:active {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px rgba(0, 255, 136, 0.65);
}

.btn-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #03141f;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #1a0f00;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}

/* Custom Duel Row */
.custom-duel-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.custom-duel-actions .minimal-btn {
  width: auto;
  flex: 1.1;
}

.code-join-pill {
  flex: 1;
  display: flex;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 11px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.code-join-pill:focus-within {
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.code-join-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #00f0ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  padding: 0 6px;
  text-transform: uppercase;
}

.code-join-btn {
  padding: 8px 12px;
  background: rgba(0, 240, 255, 0.15);
  border: none;
  border-left: 1px solid rgba(0, 240, 255, 0.25);
  color: #00f0ff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-join-btn:hover {
  background: rgba(0, 240, 255, 0.3);
}

/* Minimal Diff Selector */
.minimal-diff-selector {
  display: flex;
  gap: 6px;
}

.diff-chip {
  flex: 1;
  padding: 7px 2px;
  text-align: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.diff-chip:hover {
  color: #fff;
}

.diff-chip.active {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* Minimal APK Link */
.minimal-apk-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.minimal-apk-link:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #00ff88;
}

.apk-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-btn {
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto !important;
  text-decoration: none;
}

.game-btn-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #021a10 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

.game-btn-green:hover, .game-btn-green:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.7);
}

.game-btn-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #03141f !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
}

.game-btn-cyan:hover, .game-btn-cyan:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.7);
}

.game-btn-crimson {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.45);
}

.game-btn-glass {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.game-btn-glass:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.game-btn-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  color: #1a0f00 !important;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.45);
  width: 100%;
}

.game-btn-gold:hover, .game-btn-gold:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.65);
}

/* Rules Modal Styling */
.rules-modal-card {
  max-width: 420px;
  text-align: left;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.rule-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 10px;
  border-radius: 10px;
}

.rule-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #00ff88;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-content {
  font-size: 11.5px;
  line-height: 1.4;
  color: #d1d5db;
}

.rule-heading {
  font-weight: 800;
  color: #ffffff;
  margin-right: 4px;
}

/* Vector SVG Icons */
.svg-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-sm {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-xs {
  width: 11px;
  height: 11px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-lg {
  width: 44px;
  height: 44px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-dpad {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.orient-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  text-align: left;
}

.orient-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.orient-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}

.touch-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* ================= IN-GAME HUD ================= */
#gameScreen {
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
}

#gameScreen.active {
  display: flex !important;
  pointer-events: auto !important;
}

.hud-interactive {
  pointer-events: auto !important;
}

/* Top Header & Nav Container */
.top-hud-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  gap: 4px;
  z-index: 20;
}

.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.room-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}

.room-tag {
  background: rgba(16, 185, 129, 0.2);
  color: var(--p1-green);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 12px;
  min-height: 36px;
  min-width: 44px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: auto !important;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.exit-btn {
  background: rgba(239, 68, 68, 0.25) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.exit-btn:hover, .exit-btn:active {
  background: rgba(239, 68, 68, 0.45) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.emote-tray {
  display: flex;
  gap: 3px;
}

.emote-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 13px;
  cursor: pointer;
}

/* Scoreboard Strip (Compact Top Score Cards) */
.scoreboard-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 540px;
  margin: 4px auto 0;
  gap: 8px;
  z-index: 20;
}

.score-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.3s;
}

.score-card.active-turn {
  border-color: var(--p1-green);
  box-shadow: 0 0 15px var(--p1-glow);
}

.score-card.p2-card.active-turn {
  border-color: var(--p2-crimson);
  box-shadow: 0 0 15px var(--p2-glow);
}

.score-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.country-flag-icon {
  font-size: 14px;
  line-height: 1;
}

.score-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mini-trophy-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #fbbf24;
}

.p1-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.p2-avatar {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
}

.score-info h4 {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-pips-container {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.wall-pip {
  width: 4px;
  height: 10px;
  background: var(--p1-green);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--p1-glow);
}

.p2-card .wall-pip {
  background: var(--p2-crimson);
  box-shadow: 0 0 6px var(--p2-glow);
}

.wall-pip.used {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  opacity: 0.2;
}

.turn-pill {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--p1-green);
  border: 1px solid var(--p1-green);
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.turn-pill.my-turn {
  color: var(--p1-green);
  border-color: var(--p1-green);
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 14px var(--p1-glow);
}

.turn-pill.opp-turn {
  color: var(--p2-crimson);
  border-color: var(--p2-crimson);
  background: rgba(244, 63, 94, 0.15);
  box-shadow: 0 0 14px var(--p2-glow);
}

.turn-pill.wait-turn {
  color: var(--p3-cyan);
  border-color: var(--p3-cyan);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ================= STREAMLINED BOTTOM CONTROLS DOCK ================= */
.bottom-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 6px;
  gap: 12px;
  z-index: 20;
}

/* Action Button Cluster */
.action-btn-cluster {
  flex: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(11, 15, 25, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.15);
}

.action-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.action-btn {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stealth Mine Active Armed State with Safety Lock Disengaged */
.action-btn.trap-active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #05060a !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.5) !important;
  animation: btnTrapPulse 1s infinite alternate ease-in-out;
}

.action-btn.trap-active #trapLockDot {
  fill: #ef4444 !important;
  animation: lockBlink 0.6s infinite alternate;
}

@keyframes lockBlink {
  0% { opacity: 0.4; }
  100% { opacity: 1; transform: scale(1.3); }
}

@keyframes btnTrapPulse {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

/* Trap Arming Mode Grid Highlights (All Valid Tiles Light Up) */
.trap-arming-mode .tile-2d:not(.tile-has-pawn) {
  border-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), #0a0e1a);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35), inset 0 0 8px rgba(251, 191, 36, 0.2);
  cursor: crosshair !important;
}

.trap-arming-mode .tile-2d:not(.tile-has-pawn):hover {
  background: rgba(251, 191, 36, 0.35);
  border-color: #fbbf24;
  transform: scale(1.04);
}

/* ================= FLOATING CHIBI AVATAR SPEECH BUBBLES ================= */
.avatar-speech-bubble {
  position: absolute;
  z-index: 45;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.96);
  border: 1.5px solid #00f0ff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 240, 255, 0.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -125%);
  animation: tauntBubblePop 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar-speech-bubble.bubble-p1 {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 16px rgba(16, 185, 129, 0.5);
}

.avatar-speech-bubble.bubble-p2 {
  border-color: #f43f5e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 16px rgba(244, 63, 94, 0.5);
}

.taunt-bubble-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #00f0ff;
}

.bubble-p1 .taunt-bubble-arrow { border-top-color: #10b981; }
.bubble-p2 .taunt-bubble-arrow { border-top-color: #f43f5e; }

@keyframes tauntBubblePop {
  0% { transform: translate(-50%, -75%) scale(0.6); opacity: 0; }
  12% { transform: translate(-50%, -125%) scale(1.08); opacity: 1; }
  22% { transform: translate(-50%, -120%) scale(1.0); opacity: 1; }
  80% { transform: translate(-50%, -125%) scale(1.0); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(0.85); opacity: 0; }
}

/* ================= QUICK-CHAT / TAUNT DRAWER MODAL ================= */
.taunt-nav-btn {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.35);
  color: #00f0ff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.taunt-nav-btn:hover {
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.taunt-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.65);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: drawerFadeIn 0.2s ease-out;
}

.taunt-drawer {
  width: 100%;
  max-width: 480px;
  background: rgba(11, 15, 25, 0.98);
  border-top: 2px solid rgba(0, 240, 255, 0.5);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 255, 0.2);
  animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.taunt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.taunt-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #00f0ff;
}

.taunt-group-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 10px 0 6px;
  text-transform: uppercase;
}

.taunt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}

.taunt-chip {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.taunt-chip:active {
  transform: scale(0.96);
}

.taunt-chip.chip-cyan {
  border-color: rgba(0, 240, 255, 0.3);
  color: #67e8f9;
}

.taunt-chip.chip-amber {
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde047;
}

.taunt-chip.chip-crimson {
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.taunt-chip.chip-emerald {
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

@keyframes drawerSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes drawerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= TRAP ALERT BANNER ================= */
.trap-alert-banner {
  position: fixed;
  top: 140px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  z-index: 9999;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.trap-alert-banner.show {
  display: block;
  animation: trapBannerBoom 1.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.trap-alert-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 90px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(245, 158, 11, 0.3) 60%, transparent 80%);
  filter: blur(16px);
  border-radius: 50%;
  animation: radarShockwave 1s infinite;
}

.trap-alert-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.98) 100%);
  border: 2px solid #f87171;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 28px rgba(239, 68, 68, 0.6);
}

.trap-alert-text {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

@keyframes trapBannerBoom {
  0% { transform: translateX(-50%) scale(0.4); opacity: 0; }
  15% { transform: translateX(-50%) scale(1.15); opacity: 1; }
  30% { transform: translateX(-50%) scale(1.0); opacity: 1; }
  75% { transform: translateX(-50%) scale(1.0); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.85); opacity: 0; }
}

/* ================= ROOM CODE SHOWCASE ================= */
.room-code-showcase {
  background: rgba(0, 0, 0, 0.7);
  border: 2px dashed rgba(16, 185, 129, 0.5);
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0;
}

#bigRoomCodeDisplay {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--p1-green);
  text-shadow: 0 0 20px var(--p1-glow);
}

.waiting-pulse-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.pulse-radar {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p1-green);
  box-shadow: 0 0 8px var(--p1-green);
  animation: radarPulse 1.2s infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

/* Toast */
#toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  color: #fff;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999999;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999999 !important;
  pointer-events: auto !important;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  max-width: 400px;
  width: 90%;
  padding: 26px 20px;
  text-align: center;
  pointer-events: auto !important;
}

.modal-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.modal-card h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 4px;
}

.modal-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--p1-green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 12px;
}

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

/* ================= TACTICAL LASER HUD CALLOUT PILL ================= */
/* ================= JUICY TURN NOTIFICATION (Ludo / Dice Game Style) ================= */
.turn-alert-banner {
  position: fixed;
  top: 140px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.turn-alert-banner.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: turnBannerPulse 1.4s ease-out forwards;
}

.turn-alert-glow {
  position: absolute;
  width: 140%;
  height: 140%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 70%);
  animation: radarShockwave 1.2s ease-out infinite;
}

.turn-alert-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  border: 2px solid #6ee7b7;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.8), 0 8px 32px rgba(0, 0, 0, 0.8);
}

.turn-alert-text {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.turn-alert-sparkle {
  font-size: 16px;
  color: #fef08a;
  animation: bounceSparkle 0.6s infinite alternate;
}

@keyframes turnBannerPulse {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  20% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  35% { transform: translateX(-50%) scale(1.0); opacity: 1; }
  75% { transform: translateX(-50%) scale(1.0); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.85); opacity: 0; }
}

@keyframes radarShockwave {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes bounceSparkle {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-3px) scale(1.2); }
}

.tactical-callout-pill {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 15, 25, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px rgba(16, 185, 129, 0.2);
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
}

.tactical-callout-pill.active {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tactical-icon {
  font-size: 14px;
  font-weight: 900;
  color: var(--p1-green);
}

.tactical-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f8fafc;
}

.tactical-status {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tactical-status.valid {
  background: rgba(16, 185, 129, 0.2);
  color: var(--p1-green);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.tactical-status.invalid {
  background: rgba(244, 63, 94, 0.2);
  color: var(--p2-crimson);
  border: 1px solid rgba(244, 63, 94, 0.5);
}

/* ================= 2-STEP PRECISION ACTION BAR ================= */
.precision-action-bar {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(11, 15, 25, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(16, 185, 129, 0.2);
  z-index: 30;
  pointer-events: auto;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.precision-action-bar.active {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.precision-action-bar .game-btn {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 10px;
  min-width: auto;
  white-space: nowrap;
}

.desktop-only-hint {
  display: none;
}

.mobile-only-hint {
  display: block;
}

/* ================= 2D MODERN CYBER BOARD STYLING ================= */
.board-2d-center-area {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px 0;
  position: relative;
  z-index: 10;
}

.board-2d-wrapper {
  position: relative;
  width: min(88vw, calc(100vh - 220px), 480px);
  aspect-ratio: 1 / 1;
  max-width: 480px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-2d-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: radial-gradient(circle at center, #0c1220 0%, #05070e 100%);
  border: 2px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(16, 185, 129, 0.25), inset 0 0 25px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  padding: 1.6%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG Overlay for Laser Guides & Goal Strips */
.board-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.goal-strip-top.goal-is-mine,
.goal-strip-bot.goal-is-mine,
.goal-strip-p1 {
  fill: #00ff88;
  filter: drop-shadow(0 0 8px #00ff88) drop-shadow(0 0 16px rgba(0, 255, 136, 0.6));
}

.goal-strip-top.goal-is-opp,
.goal-strip-bot.goal-is-opp,
.goal-strip-p2 {
  fill: #ff0055;
  filter: drop-shadow(0 0 8px #ff0055) drop-shadow(0 0 16px rgba(255, 0, 85, 0.6));
}

/* 81 Obsidian Glass Tiles */
.tiles-2d-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 1.5%;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.tile-2d {
  background: linear-gradient(145deg, #0e1526, #070a14);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06), 0 2px 5px rgba(0, 0, 0, 0.5);
}

.tile-2d:hover {
  background: #131d35;
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.tile-2d:active {
  transform: scale(0.96);
}

.tile-goal-mine,
.tile-goal-p1 {
  border-top: 2px solid #00ff88;
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.18) 0%, #070a14 70%);
}

.tile-goal-opp,
.tile-goal-p2 {
  border-bottom: 2px solid #ff0055;
  background: linear-gradient(0deg, rgba(255, 0, 85, 0.18) 0%, #070a14 70%);
}

/* 64 Wall Grooves (Intersections) */
.grooves-2d-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.groove-2d-hitbox {
  position: absolute;
  width: 9.5%;
  height: 9.5%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
}

.groove-intersection-dot {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .groove-2d-hitbox:hover .groove-intersection-dot {
    background: #00f0ff;
    box-shadow: 0 0 8px #00f0ff;
    transform: scale(1.6);
  }
}

/* Placed Neon Barriers */
.walls-2d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}

.placed-wall-2d {
  position: absolute;
  border-radius: 4px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.placed-wall-2d.wall-is-mine,
.placed-wall-2d.wall-owner-p1 {
  background: linear-gradient(90deg, #10b981, #00ff88);
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.9), 0 0 4px #ffffff;
  border: 1px solid #a7f3d0;
}

.placed-wall-2d.wall-is-opp,
.placed-wall-2d.wall-owner-p2 {
  background: linear-gradient(90deg, #f43f5e, #ff0055);
  box-shadow: 0 0 14px rgba(255, 0, 85, 0.9), 0 0 4px #ffffff;
  border: 1px solid #fecdd3;
}

.wall-neon-beam {
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
}

.wall-cap {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

.placed-wall-2d.wall-h .wall-cap-start { left: -2px; }
.placed-wall-2d.wall-h .wall-cap-end { right: -2px; }
.placed-wall-2d.wall-v .wall-cap-start { top: -2px; }
.placed-wall-2d.wall-v .wall-cap-end { bottom: -2px; }

/* Ghost Barrier Placement Preview */
.ghost-wall-2d {
  position: absolute;
  border-radius: 4px;
  pointer-events: none;
  z-index: 14;
  transition: transform 0.08s ease;
}

.ghost-wall-2d.ghost-valid {
  background: rgba(0, 255, 136, 0.5);
  border: 2px dashed #00ff88;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.8), inset 0 0 10px rgba(0, 255, 136, 0.4);
  animation: ghostPulse 1s infinite alternate ease-in-out;
}

.ghost-wall-2d.ghost-invalid {
  background: rgba(255, 0, 85, 0.5);
  border: 2px dashed #ff0055;
  box-shadow: 0 0 18px rgba(255, 0, 85, 0.8), inset 0 0 10px rgba(255, 0, 85, 0.4);
}

@keyframes ghostPulse {
  0% { opacity: 0.75; transform: scale(0.99); }
  100% { opacity: 1.0; transform: scale(1.02); }
}

/* Floating Tactical Barrier Confirmation Bubble */
.wall-floating-confirm-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(0, 255, 136, 0.45);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 255, 136, 0.25);
  z-index: 50;
  pointer-events: auto !important;
  animation: bubblePop 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bubblePop {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.confirm-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.confirm-groove-title {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #ffffff;
  text-transform: uppercase;
}

.confirm-status-tag {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 1px 6px;
  border-radius: 6px;
}

.confirm-status-tag.valid {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #00ff88;
}

.confirm-status-tag.invalid {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #f43f5e;
}

.confirm-bubble-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bubble-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 8px;
  border: none;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  pointer-events: auto !important;
}

.bubble-btn-place {
  background: linear-gradient(135deg, #00ff88 0%, #059669 100%) !important;
  color: #021a10 !important;
  box-shadow: 0 2px 10px rgba(0, 255, 136, 0.4);
}

.bubble-btn-place:hover, .bubble-btn-place:active {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 255, 136, 0.6);
}

.bubble-btn-place.disabled {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #64748b !important;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.bubble-btn-rotate {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #03141f !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.bubble-btn-rotate:hover, .bubble-btn-rotate:active {
  transform: scale(1.05);
}

.bubble-btn-cancel {
  background: rgba(244, 63, 94, 0.15) !important;
  border: 1px solid rgba(244, 63, 94, 0.4) !important;
  color: #f43f5e !important;
  padding: 5px 7px;
}

.bubble-btn-cancel:hover, .bubble-btn-cancel:active {
  background: rgba(244, 63, 94, 0.3) !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

/* Laser Crosshairs */
.crosshair-line-h {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.6) 25%, rgba(0, 240, 255, 0.9) 50%, rgba(0, 240, 255, 0.6) 75%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.crosshair-line-v {
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.6) 25%, rgba(0, 240, 255, 0.9) 50%, rgba(0, 240, 255, 0.6) 75%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

/* Valid Move Stepping Stones */
.valid-moves-2d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 16;
}

.stepping-stone-2d {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform 0.15s ease;
  z-index: 18;
}

.stepping-stone-2d:hover {
  transform: scale(1.12);
}

.stone-ring-outer {
  width: 70%;
  height: 70%;
  border-radius: 50%;
  border: 2px dashed #00ff88;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.6);
  animation: stoneSpin 5s linear infinite;
  pointer-events: none;
}

.stone-ring-core {
  position: absolute;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 12px #00ff88;
  transition: all 0.2s ease;
  pointer-events: none;
}

.stepping-stone-2d:hover .stone-ring-core {
  transform: scale(1.35);
  background: #ffffff;
  box-shadow: 0 0 16px #ffffff;
}

@keyframes stoneSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Expressive Cyber Chibi Avatars */
.pawn-2d-avatar {
  position: absolute;
  width: 9.77%;
  height: 9.77%;
  z-index: 18;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2), top 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chibi-avatar-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chibiFloat 2.5s ease-in-out infinite alternate;
}

.chibi-svg {
  width: 92%;
  height: 92%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

.chibi-aura-ring {
  animation: chibiAuraPulse 2s ease-in-out infinite alternate;
}

@keyframes chibiAuraPulse {
  0% { transform: scale(0.96); transform-origin: 50px 50px; opacity: 0.5; }
  100% { transform: scale(1.04); transform-origin: 50px 50px; opacity: 0.9; }
}

.chibi-eye {
  animation: chibiBlink 3.8s infinite;
  transform-origin: center;
}

@keyframes chibiBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

@keyframes chibiFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-3px); }
}

/* Expressive Avatar Speech Bubble */
.avatar-speech-bubble {
  position: absolute;
  transform: translate(-50%, -130%);
  background: rgba(8, 14, 28, 0.96);
  border: 1.5px solid #00f0ff;
  border-radius: 12px;
  padding: 6px 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 240, 255, 0.45);
  z-index: 100;
  pointer-events: none;
  animation: popInBounce 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-speech-bubble.bubble-p1 {
  border-color: #00ff88;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 255, 136, 0.45);
}

.avatar-speech-bubble.bubble-p2 {
  border-color: #ff0055;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 0, 85, 0.45);
}

.taunt-bubble-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #00f0ff;
}

.bubble-p1 .taunt-bubble-arrow {
  border-top-color: #00ff88;
}

.bubble-p2 .taunt-bubble-arrow {
  border-top-color: #ff0055;
}

@keyframes popInBounce {
  0% { transform: translate(-50%, -70%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -130%) scale(1); opacity: 1; }
}

/* Trap Arming Mode Overrides: Hides grooves & overlays so 100% touch area goes to tiles */
.board-2d-frame.trap-arming-mode {
  touch-action: none !important;
}

.board-2d-frame.trap-arming-mode .tiles-2d-grid {
  z-index: 35 !important;
  pointer-events: auto !important;
  touch-action: none !important;
}

.board-2d-frame.trap-arming-mode .grooves-2d-grid {
  display: none !important;
  pointer-events: none !important;
}

.board-2d-frame.trap-arming-mode .groove-2d-hitbox {
  display: none !important;
  pointer-events: none !important;
}

.board-2d-frame.trap-arming-mode .valid-moves-2d-container {
  display: none !important;
  pointer-events: none !important;
}

.board-2d-frame.trap-arming-mode .tile-2d {
  cursor: crosshair;
  pointer-events: auto !important;
  touch-action: none !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  background: rgba(14, 21, 38, 0.9) !important;
}

.board-2d-frame.trap-arming-mode .tile-2d:hover,
.board-2d-frame.trap-arming-mode .tile-2d:active,
.tile-2d.tile-trap-selected {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.95), inset 0 0 10px rgba(251, 191, 36, 0.5) !important;
  background: rgba(251, 191, 36, 0.25) !important;
}

/* Glowing Dynamic Stealth Trap Targeting Reticle */
.trap-preview-reticle {
  position: absolute;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: left 0.12s cubic-bezier(0.16, 1, 0.3, 1), top 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.trap-reticle-ring {
  position: absolute;
  width: 92%;
  height: 92%;
  border-radius: 8px;
  border: 2.5px solid #fbbf24;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.95), inset 0 0 14px rgba(251, 191, 36, 0.5);
  animation: reticlePulse 1.2s infinite alternate ease-in-out;
}

.trap-reticle-pulse {
  position: absolute;
  width: 65%;
  height: 65%;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.35);
  transform: rotate(45deg);
  animation: trapPulse 1.5s infinite ease-in-out alternate;
}

.trap-reticle-icon {
  font-size: 22px;
  color: #fbbf24;
  text-shadow: 0 0 14px #fbbf24, 0 0 4px #ffffff;
  position: relative;
  z-index: 2;
}

@keyframes reticlePulse {
  0% { transform: scale(0.92); opacity: 0.85; }
  100% { transform: scale(1.08); opacity: 1; }
}

/* Stealth Trap Energy Glyph (Owner Only) */
.trap-glyph-2d {
  position: absolute;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.trap-rune-pulse {
  position: absolute;
  width: 62%;
  height: 62%;
  border-radius: 8px;
  border: 2px solid #fbbf24;
  transform: rotate(45deg);
  animation: trapPulse 1.6s infinite ease-in-out alternate;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
}

.trap-rune-icon {
  font-size: 16px;
  color: #fbbf24;
  text-shadow: 0 0 10px #fbbf24;
  position: relative;
  z-index: 2;
}

@keyframes trapPulse {
  0% { transform: rotate(45deg) scale(0.85); opacity: 0.5; }
  100% { transform: rotate(45deg) scale(1.15); opacity: 1; }
}

/* Shockwave EMP Detonation Blast */
.shockwave-blast-2d {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid #ff0055;
  box-shadow: 0 0 24px #ff0055, inset 0 0 24px #ff0055;
  z-index: 35;
  pointer-events: none;
  animation: shockwaveExpand 0.65s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes shockwaveExpand {
  0% { width: 10px; height: 10px; opacity: 1; }
  100% { width: 260px; height: 260px; opacity: 0; }
}

.board-shake-active {
  animation: boardShake 0.4s ease-in-out;
}

@keyframes boardShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, -3px); }
  80% { transform: translate(4px, 3px); }
}

/* ================= DESKTOP & LANDSCAPE OPTIMIZATIONS ================= */
@media (min-aspect-ratio: 1/1), (min-width: 800px) {
  #gameScreen {
    padding: 12px 24px;
  }

  .top-hud-container {
    max-width: 560px;
  }

  .scoreboard-strip {
    max-width: 520px;
  }

  .board-2d-wrapper {
    width: min(70vh, 520px);
    max-width: 520px;
    max-height: 520px;
  }

  .tactical-callout-pill {
    top: 80px;
  }

  /* Centered bottom dock in landscape/desktop */
  .bottom-dock {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 20;
  }

  .action-btn-cluster {
    pointer-events: auto;
    width: 100%;
    max-width: 480px;
    background: rgba(11, 15, 25, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  }

  .mobile-only-hint {
    display: none;
  }

  .desktop-only-hint {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-align: center;
  }
}

/* ================= FLOATING TAUNT BUBBLES & QUICK-CHAT ================= */
.floating-taunt-bubble {
  position: fixed;
  z-index: 1000;
  transform: translate(-50%, -100%);
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: tauntBubblePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-taunt-bubble.bubble-you {
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.floating-taunt-bubble.bubble-opp {
  border-color: #f43f5e;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
}

.floating-taunt-bubble.fade-out {
  opacity: 0;
  transform: translate(-50%, -130%) scale(0.9);
}

@keyframes tauntBubblePop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

/* Quick Emote Drawer */
.quick-taunt-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin: 6px auto;
  width: fit-content;
}

.taunt-chip-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.taunt-chip-btn:active {
  transform: scale(0.92);
  background: #10b981;
  color: #000;
}

/* ================= MYSTERY ABILITY ORBS & PERKS ================= */
.perk-orb-2d {
  position: absolute;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.perk-orb-aura {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.45) 0%, rgba(245, 158, 11, 0.15) 60%, transparent 80%);
  animation: perkAuraPulse 2s ease-in-out infinite alternate;
}

.perk-core-sphere {
  position: relative;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 60%, #92400e 100%);
  border: 1.8px solid #fef08a;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.8), inset 0 0 8px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: perkCoreFloat 3s ease-in-out infinite alternate;
}

.perk-question-mark {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #1e1b4b;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
  user-select: none;
}

.perk-sparkle-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px dashed rgba(251, 191, 36, 0.6);
  animation: perkRingSpin 6s linear infinite;
}

@keyframes perkAuraPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0.95; }
}

@keyframes perkCoreFloat {
  0% { transform: translateY(-2px) scale(0.96); }
  100% { transform: translateY(2px) scale(1.04); }
}

@keyframes perkRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================= FLOATING COMBAT BADGES ================= */
.floating-combat-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 50;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  animation: floatCombatText 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-combat-badge.perk-float-gold {
  background: rgba(15, 23, 42, 0.92);
  color: #fbbf24;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.6);
}

.floating-combat-badge.perk-float-cyan {
  background: rgba(15, 23, 42, 0.92);
  color: #00f0ff;
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
}

.floating-combat-badge.perk-float-red {
  background: rgba(15, 23, 42, 0.92);
  color: #f43f5e;
  border: 1.5px solid #f43f5e;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.6);
}

@keyframes floatCombatText {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.7); }
  20% { opacity: 1; transform: translate(-50%, -20px) scale(1.1); }
  80% { opacity: 1; transform: translate(-50%, -35px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(0.9); }
}

/* ================= WALL BREAKER TARGETING ================= */
.placed-wall-2d.wall-breaker-targetable {
  cursor: crosshair !important;
  pointer-events: auto !important;
  animation: breakerTargetPulse 1.2s ease-in-out infinite alternate;
}

.placed-wall-2d.wall-breaker-targetable .wall-neon-beam {
  background: linear-gradient(90deg, #fbbf24, #f59e0b) !important;
  box-shadow: 0 0 18px #fbbf24, 0 0 32px rgba(251, 191, 36, 0.8) !important;
}

.wall-breaker-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  z-index: 10;
  filter: drop-shadow(0 0 8px #fbbf24);
  animation: reticleSpin 2s linear infinite;
  pointer-events: none;
}

@keyframes breakerTargetPulse {
  0% { transform: scale(0.97); filter: brightness(1); }
  100% { transform: scale(1.03); filter: brightness(1.4); }
}

@keyframes reticleSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.game-btn-amber {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(217, 119, 6, 0.28));
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.2);
}

.game-btn-amber:active, .game-btn-amber.breaker-active {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-color: #fef08a;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.8);
}

.game-btn-amber.breaker-active .orient-title,
.game-btn-amber.breaker-active .orient-badge {
  color: #000 !important;
  font-weight: 900;
}

/* ================= CIRCULAR TURN TIMER RING ================= */
.turn-timer-ring-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 3.5;
}

.timer-progress-circle {
  fill: none;
  stroke: #00ff88;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 113.1; /* 2 * PI * 18 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear, stroke 0.3s ease;
}

.timer-sec-text {
  font-family: 'Outfit', sans-serif;
  font-size: 8.5px;
  font-weight: 900;
  color: #fff;
  z-index: 2;
}

/* Audio button state */
.audio-muted {
  opacity: 0.55;
  border-color: rgba(244, 63, 94, 0.4) !important;
}

