/* ============================================================
   CLASH — Lobby Menu, Hero Selection & Match Stats
   File: css/menu.css
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   OVERLAY — Modern Cinematic Dark Battle Atmosphere
   ═══════════════════════════════════════════════════════════ */
#overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #02070d;
  background:
    radial-gradient(ellipse 90% 65% at 50% 8%, #0d2238 0%, #061320 50%, #02070d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 100;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 clamp(16px, 3vw, 32px);
  -webkit-overflow-scrolling: touch;
}

/* Hide game canvas and minimap completely while menu page is active */
body:has(#overlay:not(.hidden)) canvas#game,
body:has(#overlay:not(.hidden)) #minimap {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   MAP0 WALLPAPER — League of Legends Champ Select Aesthetic
   ═══════════════════════════════════════════════════════════ */
.menu-backdrop-wallpaper,
.menu-backdrop-vignette,
.menu-backdrop-hextech-glow {
  position: fixed !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 0 !important;
}

.menu-backdrop-wallpaper {
  inset: -16px;
  width: calc(100vw + 32px);
  height: calc(100vh + 32px);
  background-image: url('../img/map0.jpeg'), url('../map0.jpeg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.35;
  filter: brightness(0.72) contrast(1.15) saturate(1.22) blur(1.5px);
  transform: scale(1.03);
  animation: map-wallpaper-drift 32s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes map-wallpaper-drift {
  0% {
    transform: scale(1.03) translate(0, 0);
  }
  50% {
    transform: scale(1.06) translate(-6px, -4px);
  }
  100% {
    transform: scale(1.03) translate(4px, 2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-backdrop-wallpaper {
    animation: none;
    transform: scale(1.03);
  }
}

.menu-backdrop-vignette {
  background:
    radial-gradient(ellipse 95% 75% at 50% 45%, rgba(3, 10, 19, 0.2) 0%, rgba(2, 7, 13, 0.65) 60%, rgba(2, 7, 13, 0.95) 100%),
    linear-gradient(180deg, rgba(2, 7, 13, 0.78) 0%, rgba(2, 7, 13, 0.15) 18%, rgba(2, 7, 13, 0.1) 60%, rgba(2, 7, 13, 0.92) 100%);
}

.menu-backdrop-hextech-glow {
  background:
    radial-gradient(circle at 18% 22%, rgba(0, 163, 224, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 82% 22%, rgba(239, 68, 68, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 65%, rgba(200, 155, 60, 0.08) 0%, transparent 55%);
}

/* Subtle modern grid texture */
#overlay::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

#overlay>*,
.overlay-content>* {
  position: relative;
  z-index: 1;
}

#overlay::-webkit-scrollbar {
  width: 6px;
}

#overlay::-webkit-scrollbar-track {
  background: transparent;
}

#overlay::-webkit-scrollbar-thumb {
  background: rgba(240, 230, 210, 0.12);
  border-radius: 3px;
}

#overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 155, 60, 0.3);
}

.overlay-content {
  width: 100%;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  padding-top: clamp(20px, 4vh, 40px);
  padding-bottom: clamp(24px, 4vh, 48px);
}

#overlay.hidden {
  display: none;
}

/* ── Title ──────────────────────────────────────────────── */
#overlay h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: clamp(6px, 1.6vw, 14px);
  margin-left: clamp(6px, 1.6vw, 14px);
  /* Optical centering for wide tracking */
  background: linear-gradient(180deg, #ffffff 0%, #f7f1e5 25%, #d4a94e 70%, #856124 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  filter: drop-shadow(0 0 24px rgba(200, 155, 60, 0.28)) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.9));
  text-transform: uppercase;
  line-height: 1.1;
  position: relative;
}

/* ── Description ────────────────────────────────────────── */
#overlay p {
  color: #b3aba0;
  font-size: clamp(11px, 1.3vw, 13px);
  margin-bottom: 20px;
  text-align: center;
  max-width: 540px;
  line-height: 1.6;
  padding: 8px 20px;
  letter-spacing: 0.3px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(240, 230, 210, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Menu Section Divider ────────────────────────────────── */
.menu-divider {
  width: 100%;
  max-width: 320px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 155, 60, 0.35), rgba(240, 230, 210, 0.15), transparent);
  margin: 6px auto 22px auto;
}

/* ── Play Button ────────────────────────────────────────── */
#overlay #oBtn {
  width: 184px;
  max-width: 100%;
  height: 40px;
  line-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  -webkit-text-stroke: 0.5px currentColor;
  background: linear-gradient(180deg, #fce5a3 0%, #e2b755 32%, #c89b3c 68%, #966b19 100%);
  color: #0b151e;
  border: 1.5px solid rgba(255, 248, 220, 0.85);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 22px rgba(200, 155, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(120, 85, 20, 0.45);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-indent: 1.5px;
  margin: 28px auto 0 auto;
  position: relative;
  z-index: 10;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: btn-pulse 3.5s infinite ease-in-out;
  overflow: hidden;
}

@keyframes btn-pulse {

  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 20px rgba(200, 155, 60, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(120, 85, 20, 0.45);
    border-color: rgba(255, 242, 200, 0.8);
  }

  50% {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.75), 0 0 32px rgba(200, 155, 60, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(120, 85, 20, 0.45);
    border-color: #ffffff;
  }
}

#overlay #oBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  border-radius: 6px 6px 0 0;
}

#overlay #oBtn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff3d1 0%, #edd37e 32%, #dbab44 68%, #ac7e20 100%);
  color: #04090e;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 34px rgba(235, 185, 65, 0.65), inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(120, 85, 20, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

#overlay #oBtn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7), 0 0 16px rgba(200, 155, 60, 0.3);
}

#overlay #oBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(18, 28, 38, 0.85);
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  animation: none;
  text-shadow: none;
  transform: none;
}


/* ── Hero Selection Cards ────────────────────────────────── */
#selectorsWrapper {
  position: relative;
  z-index: 50;
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.select-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.select-col h4 {
  font-family: var(--font-display);
  font-size: clamp(11px, 1.4vw, 12px);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  position: relative;
  padding: 6px 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  box-sizing: border-box;
}

#p1-select-col h4 {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.12);
}

#p2-select-col h4 {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.12);
}

#p2-select-col.coop-ally h4 {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.12);
}

/* ── Mode Selector ──────────────────────────────────────── */
#modeSelectContainer {
  display: flex;
  background: rgba(6, 16, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: 100px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
  justify-content: center;
  width: auto;
  max-width: 640px;
  position: relative;
  overflow: hidden;
}

#modeSelectContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
}

#overlay .mode-btn {
  padding: 9px 22px;
  font-family: var(--font-body);
  font-size: clamp(11px, 1.4vw, 12px);
  font-weight: 600;
  background: transparent;
  color: #8c98a4;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  min-height: 36px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

#overlay .mode-btn:hover:not(:disabled):not(.active) {
  color: #f0e6d2;
  background: rgba(255, 255, 255, 0.05);
}

#overlay .mode-btn.active {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(200, 155, 60, 0.12) 100%);
  color: #fff4d6;
  border: 1px solid rgba(200, 155, 60, 0.45);
  box-shadow: 0 2px 12px rgba(200, 155, 60, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(200, 155, 60, 0.4);
}

#overlay .mode-btn.active:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(200, 155, 60, 0.12) 100%);
  color: #fff4d6;
  border: 1px solid rgba(200, 155, 60, 0.45);
}

#overlay .mode-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hero-select-container {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.hero-select-container>.hero-card:last-child:nth-child(3n+1) {
  grid-column: 2;
}

.hero-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  box-shadow: none;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  min-height: auto;
}

.hero-card::before,
.hero-card-glow,
.hero-card>h3,
.hero-card-toggle {
  display: none !important;
}

.hero-card:hover {
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: none;
}

.hero-card.chosen {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

/* Custom chosen hero avatar glowing rings */
#card-1-red.chosen .hero-avatar,
#card-2-red.chosen .hero-avatar,
#card-enemy-red.chosen .hero-avatar {
  border-color: #ef4444;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.85), inset 0 0 8px rgba(239, 68, 68, 0.45);
  transform: scale(1.08);
}

#card-1-blue.chosen .hero-avatar,
#card-2-blue.chosen .hero-avatar,
#card-enemy-blue.chosen .hero-avatar {
  border-color: #38bdf8;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.85), inset 0 0 8px rgba(56, 189, 248, 0.45);
  transform: scale(1.08);
}

#card-1-black.chosen .hero-avatar,
#card-2-black.chosen .hero-avatar,
#card-enemy-black.chosen .hero-avatar {
  border-color: #71717a;
  box-shadow: 0 0 20px rgba(113, 113, 122, 0.75), inset 0 0 8px rgba(0, 0, 0, 0.45);
  transform: scale(1.08);
}

#card-1-yellow.chosen .hero-avatar,
#card-2-yellow.chosen .hero-avatar,
#card-enemy-yellow.chosen .hero-avatar {
  border-color: #fbbf24;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.85), inset 0 0 8px rgba(251, 191, 36, 0.45);
  transform: scale(1.08);
}

#card-1-white.chosen .hero-avatar,
#card-2-white.chosen .hero-avatar,
#card-enemy-white.chosen .hero-avatar {
  border-color: #f472b6;
  box-shadow: 0 0 22px rgba(244, 114, 182, 0.85), inset 0 0 8px rgba(244, 114, 182, 0.45);
  transform: scale(1.08);
}

#card-1-green.chosen .hero-avatar,
#card-2-green.chosen .hero-avatar,
#card-enemy-green.chosen .hero-avatar {
  border-color: #34d399;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.85), inset 0 0 8px rgba(52, 211, 153, 0.45);
  transform: scale(1.08);
}

#card-1-purple.chosen .hero-avatar,
#card-2-purple.chosen .hero-avatar,
#card-enemy-purple.chosen .hero-avatar {
  border-color: #c084fc;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.85), inset 0 0 8px rgba(192, 132, 252, 0.45);
  transform: scale(1.08);
}

#card-1-orange.chosen .hero-avatar,
#card-2-orange.chosen .hero-avatar,
#card-enemy-orange.chosen .hero-avatar {
  border-color: #fb923c;
  box-shadow: 0 0 22px rgba(251, 146, 60, 0.85), inset 0 0 8px rgba(251, 146, 60, 0.45);
  transform: scale(1.08);
}

#card-1-cyan.chosen .hero-avatar,
#card-2-cyan.chosen .hero-avatar,
#card-enemy-cyan.chosen .hero-avatar {
  border-color: #22d3ee;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.85), inset 0 0 8px rgba(34, 211, 238, 0.45);
  transform: scale(1.08);
}

.hero-avatar {
  width: clamp(48px, 5.5vw, 56px);
  height: clamp(48px, 5.5vw, 56px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
  transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.hero-card:hover .hero-avatar {
  transform: scale(1.08) translateY(-2px);
  border-color: rgba(240, 230, 210, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(255, 255, 255, 0.2);
}

.hero-card.chosen .hero-avatar {
  transform: scale(1.08);
  border-width: 2px;
}

.bg-avatar-red {
  background: radial-gradient(circle at 35% 35%, rgba(239, 68, 68, 0.45) 0%, rgba(127, 29, 29, 0.85) 100%);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fee2e2;
}

.bg-avatar-blue {
  background: radial-gradient(circle at 35% 35%, rgba(14, 165, 233, 0.45) 0%, rgba(3, 105, 161, 0.85) 100%);
  border-color: rgba(14, 165, 233, 0.45);
  color: #e0f2fe;
}

.bg-avatar-black {
  background: radial-gradient(circle at 35% 35%, rgba(161, 161, 170, 0.45) 0%, rgba(39, 39, 42, 0.85) 100%);
  border-color: rgba(113, 113, 122, 0.45);
  color: #f4f4f5;
}

.bg-avatar-yellow {
  background: radial-gradient(circle at 35% 35%, rgba(245, 158, 11, 0.45) 0%, rgba(146, 64, 14, 0.85) 100%);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fef3c7;
}

.bg-avatar-white {
  background: radial-gradient(circle at 35% 35%, rgba(236, 72, 153, 0.45) 0%, rgba(157, 23, 77, 0.85) 100%);
  border-color: rgba(236, 72, 153, 0.45);
  color: #fce7f3;
}

.bg-avatar-green {
  background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.45) 0%, rgba(4, 120, 87, 0.85) 100%);
  border-color: rgba(16, 185, 129, 0.45);
  color: #d1fae5;
}

.bg-avatar-purple {
  background: radial-gradient(circle at 35% 35%, rgba(168, 85, 247, 0.45) 0%, rgba(88, 28, 135, 0.85) 100%);
  border-color: rgba(192, 132, 252, 0.45);
  color: #f3e8ff;
}

.bg-avatar-orange {
  background: radial-gradient(circle at 35% 35%, rgba(249, 115, 22, 0.45) 0%, rgba(154, 52, 18, 0.85) 100%);
  border-color: rgba(251, 146, 60, 0.45);
  color: #ffedd5;
}

.bg-avatar-cyan {
  background: radial-gradient(circle at 35% 35%, rgba(6, 182, 212, 0.45) 0%, rgba(14, 116, 144, 0.85) 100%);
  border-color: rgba(56, 189, 248, 0.45);
  color: #cffafe;
}

/* ── Hero Dropdown Info (Shown on 2nd click) ──────────────── */
.hero-dropdown-info {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  width: 190px;
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.98) 0%, rgba(6, 12, 18, 0.99) 100%);
  border: 1.2px solid rgba(240, 230, 210, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.9), 0 0 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  pointer-events: auto;
}

.hero-card.stats-open {
  z-index: 100;
}

.hero-card.stats-open .hero-dropdown-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-dropdown-info::before {
  content: '';
  position: absolute;
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: rgba(240, 230, 210, 0.25);
}

.hero-dropdown-info::after {
  content: '';
  position: absolute;
  bottom: 100%;
  border: 5px solid transparent;
  border-bottom-color: rgba(14, 24, 38, 0.98);
}

/* Row 1 (Downward dropdown) */
.hero-select-container>.hero-card:nth-child(3n+1) .hero-dropdown-info {
  left: 0;
  right: auto;
  transform: none;
  animation: dropdownFadeInLeft 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-select-container>.hero-card:nth-child(3n+1) .hero-dropdown-info::before {
  left: 22px;
}

.hero-select-container>.hero-card:nth-child(3n+1) .hero-dropdown-info::after {
  left: 23px;
}

.hero-select-container>.hero-card:nth-child(3n) .hero-dropdown-info {
  right: 0;
  left: auto;
  transform: none;
  animation: dropdownFadeInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-select-container>.hero-card:nth-child(3n) .hero-dropdown-info::before {
  right: 22px;
}

.hero-select-container>.hero-card:nth-child(3n) .hero-dropdown-info::after {
  right: 23px;
}

.hero-select-container>.hero-card:nth-child(3n+2) .hero-dropdown-info {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  animation: dropdownFadeInCenter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-select-container>.hero-card:nth-child(3n+2) .hero-dropdown-info::before,
.hero-select-container>.hero-card:nth-child(3n+2) .hero-dropdown-info::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Row 2 & Row 3 (Upward dropup to avoid the play button) */
.hero-select-container>.hero-card:nth-child(n+4) .hero-dropdown-info {
  top: auto;
  bottom: calc(100% + 8px);
}

.hero-select-container>.hero-card:nth-child(n+4) .hero-dropdown-info::before {
  bottom: auto;
  top: 100%;
  border-bottom-color: transparent;
  border-top-color: rgba(240, 230, 210, 0.25);
}

.hero-select-container>.hero-card:nth-child(n+4) .hero-dropdown-info::after {
  bottom: auto;
  top: 100%;
  border-bottom-color: transparent;
  border-top-color: rgba(14, 24, 38, 0.98);
}

.hero-select-container>.hero-card:nth-child(n+4):nth-child(3n+1) .hero-dropdown-info {
  left: 0;
  right: auto;
  transform: none;
  animation: dropupFadeInLeft 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-select-container>.hero-card:nth-child(n+4):nth-child(3n) .hero-dropdown-info {
  right: 0;
  left: auto;
  transform: none;
  animation: dropupFadeInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-select-container>.hero-card:nth-child(n+4):nth-child(3n+2) .hero-dropdown-info {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  animation: dropupFadeInCenter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

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

@keyframes dropdownFadeInCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

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

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

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

@keyframes dropupFadeInCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.hero-dropdown-name {
  color: #fff6de;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
  text-align: center;
  text-shadow: 0 0 10px rgba(200, 155, 60, 0.4);
}

.hero-dropdown-desc {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  text-align: center;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-dropdown-info .hero-stats {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  padding: 0;
  margin: 0;
  border: none;
}

.hero-dropdown-info .hero-stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 600;
}

.hero-dropdown-info .hero-stats div span {
  font-weight: 700;
  color: #f1f5f9;
  font-family: var(--font-body);
  font-size: 10px;
}


/* ═══════════════════════════════════════════════════════════
   MATCH END STATS
   ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   MATCH END STATS
   ═══════════════════════════════════════════════════════════ */
#matchStatsContainer {
  width: 100%;
  max-width: 860px;
  margin-bottom: 28px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.92) 0%, rgba(8, 14, 24, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.15);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3.5vw, 32px) clamp(16px, 3vw, 28px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 32px rgba(56, 189, 248, 0.05);
}

#matchStatsContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, var(--gold-light), #ef4444, transparent);
  pointer-events: none;
}

/* ── Header Bar ─────────────────────────────────────────── */
.match-stats-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  flex-wrap: wrap;
}

.match-stats-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: var(--radius-lg);
  padding: 10px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.duration-icon {
  width: 24px;
  height: 24px;
  color: var(--gold-light);
  opacity: 0.85;
  flex-shrink: 0;
}

.duration-text {
  text-align: left;
}

.duration-text .stat-val {
  font-size: clamp(20px, 4vw, 26px);
  color: #ffffff;
  letter-spacing: 1.5px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.duration-text .stat-label {
  color: var(--text-dim);
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 3px;
  font-weight: 800;
}

.match-mode-pill {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 8px 16px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

/* ── Player Hero Header Cards ───────────────────────────── */
.player-hero-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  min-height: 64px;
  box-sizing: border-box;
}

.hero-avatar-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.icon-hero-avatar {
  width: 24px;
  height: 24px;
  color: #38bdf8;
}

.player-hero-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.player-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}

.player-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 18px;
}

.player-level-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 1px;
  line-height: 1;
  flex-shrink: 0;
}

.mvp-badge {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: mvp-glow 2s infinite alternate ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.mvp-badge.hidden {
  display: none !important;
}

@keyframes mvp-glow {
  from {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  }

  to {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.9);
  }
}

.first-blood-badge {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fb-glow 2s infinite alternate ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.first-blood-badge.hidden {
  display: none !important;
}

@keyframes fb-glow {
  from {
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
  }

  to {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.9);
  }
}

/* ── Player Stats Columns ───────────────────────────────── */
#playersStatsWrapper {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}

.player-stats-col {
  flex: 1;
  min-width: 260px;
  max-width: 410px;
  position: relative;
  padding: 0 4px;
}

.player-stats-col::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  border-radius: 1px;
  pointer-events: none;
}

#p1StatsCol::before {
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

#p2StatsCol::before {
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
}

.stats-col-title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(11px, 1.8vw, 13px);
  text-align: left;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-hero-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#p1StatsTitle {
  color: var(--text-secondary);
}

#p2StatsTitle {
  color: rgba(239, 68, 68, 0.85);
}

.player-stats-col .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 2vw, 16px) clamp(6px, 1vw, 10px);
  text-align: center;
  transition: all 0.3s var(--ease-out);
  animation: card-in 0.5s var(--ease-out) forwards;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: rgba(240, 230, 210, 0.3);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 6px;
}

.stat-leader-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 900;
  color: #0f172a;
  background: #fbbf24;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

.stat-leader-badge.hidden {
  display: none !important;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

.stat-card:nth-child(1) {
  animation-delay: 0.08s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.16s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.24s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.32s;
}

.stat-val {
  font-size: clamp(14px, 2.4vw, 19px);
  font-weight: 800;
  color: var(--gold-light);
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: clamp(7px, 0.9vw, 8px);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
  font-weight: 700;
}

.match-stats-divider {
  width: 100%;
  max-width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 230, 210, 0.12), transparent);
  margin: 2px 0;
}

.match-stats-vs-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(240, 230, 210, 0.15), transparent);
  margin: 10px 0;
  flex-shrink: 0;
}

/* ── Stat Card Icons ────────────────────────────────────── */
.stat-card-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  color: var(--gold-dim);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.stat-card-icon svg {
  width: 100%;
  height: 100%;
}

.stat-card:hover .stat-card-icon {
  opacity: 0.9;
}

.stat-card-icon--dmg {
  color: #ef4444;
  opacity: 0.55;
}

.stat-card-icon--gold {
  color: #fbbf24;
  opacity: 0.6;
}

.stat-card-icon--minions {
  color: #c084fc;
  opacity: 0.65;
}

/* ── Head to Head Comparative Stats ─────────────────────── */
.comparative-stats-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}

.comparative-stats-wrapper.hidden {
  display: none !important;
}

.comp-stat-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comp-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.comp-title {
  color: var(--text-dim);
  font-size: 9px;
}

.comp-p1-label {
  color: #38bdf8;
  font-weight: 800;
}

.comp-p2-label {
  color: #ef4444;
  font-weight: 800;
}

.comp-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.comp-bar-fill-p1 {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.comp-bar-fill-p2 {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #dc2626);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.comp-bar--gold.comp-bar-fill-p1 {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.comp-bar--gold.comp-bar-fill-p2 {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.comp-bar--map.comp-bar-fill-p1 {
  background: linear-gradient(90deg, #059669, #34d399);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.comp-bar--map.comp-bar-fill-p2 {
  background: linear-gradient(90deg, #ef4444, #f97316);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

/* ── Jungle Objectives Section ────────────────────────── */
.jungle-stats-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.jungle-stats-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(10px, 1.5vw, 11px);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.jungle-header-icon {
  width: 14px;
  height: 14px;
  color: var(--gold-light);
}

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

@media (max-width: 680px) {
  .jungle-stats-cards {
    grid-template-columns: 1fr;
  }
}

.jungle-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.jungle-stat-card:hover {
  border-color: var(--glass-hover-border);
  transform: translateY(-2px);
}

.jungle-stat-card.fb-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.jungle-stat-card.as-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff;
}

.jungle-stat-card.ad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
}

.jungle-card-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jungle-badge {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.fb-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.as-badge {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.ad-badge {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.jungle-monster-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.jungle-slayer-name {
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--gold-light);
  letter-spacing: 0.5px;
}


/* ═══════════════════════════════════════════════════════════
   LOBBY
   ═══════════════════════════════════════════════════════════ */
#lobbySection {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin-bottom: 20px;
}

#lobbyRoleContainer,
.lobby-role-container {
  display: flex;
  background: rgba(6, 16, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: 100px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: 360px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

#lobbyRoleContainer::before,
.lobby-role-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
}

#lobbyRoleContainer .lobby-role-btn,
.lobby-role-container .lobby-role-btn {
  flex: 1;
  text-align: center;
  min-width: 110px;
}

.lobby-panel {
  background: rgba(6, 16, 24, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: clamp(16px, 2.5vw, 22px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.lobby-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

#overlay .lobby-role-btn {
  padding: 9px 22px;
  background: transparent;
  color: #8c98a4;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(11px, 1.4vw, 12px);
  transition: background 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  min-height: 36px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  outline: none;
}

#overlay .lobby-role-btn:hover:not(:disabled):not(.active) {
  color: #f0e6d2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
}

#overlay .lobby-role-btn.active {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(200, 155, 60, 0.12) 100%);
  color: #fff4d6;
  border: 1px solid rgba(200, 155, 60, 0.45);
  box-shadow: 0 2px 12px rgba(200, 155, 60, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(200, 155, 60, 0.4);
}

#overlay .lobby-role-btn.active:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(200, 155, 60, 0.12) 100%);
  color: #fff4d6;
  border: 1px solid rgba(200, 155, 60, 0.45);
}

#overlay .lobby-role-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#overlay .lobby-role-btn:focus,
#overlay .lobby-role-btn:focus-visible {
  outline: none;
}

#overlay #joinCodeInput {
  background: rgba(2, 8, 14, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  padding: 10px 14px;
  text-align: center;
  width: 100%;
  max-width: 200px;
  letter-spacing: 6px;
  text-transform: uppercase;
  outline: none;
  transition: all 0.25s ease;
  margin-top: 4px;
  min-height: 44px;
}

#overlay #joinCodeInput:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(200, 155, 60, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#overlay #hostActionBtn,
#overlay #joinActionBtn {
  background: linear-gradient(180deg, #fce5a3 0%, #e2b755 32%, #c89b3c 68%, #966b19 100%);
  color: #0b151e;
  border: 1.5px solid rgba(255, 248, 220, 0.85);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(11px, 1.6vw, 13px);
  padding: 10px 28px;
  border-radius: 8px;
  letter-spacing: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 22px rgba(200, 155, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(120, 85, 20, 0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  flex: 0 1 auto;
  min-width: 160px;
  min-height: 42px;
  position: relative;
  overflow: hidden;
  animation: btn-pulse 3.5s infinite ease-in-out;
}

#overlay #hostActionBtn::before,
#overlay #joinActionBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  border-radius: 6px 6px 0 0;
}

#overlay #hostActionBtn:hover:not(:disabled),
#overlay #joinActionBtn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff3d1 0%, #edd37e 32%, #dbab44 68%, #ac7e20 100%);
  color: #04090e;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 34px rgba(235, 185, 65, 0.65), inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(120, 85, 20, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

#overlay #hostActionBtn:active:not(:disabled),
#overlay #joinActionBtn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7), 0 0 16px rgba(200, 155, 60, 0.3);
}

#overlay #hostActionBtn:disabled,
#overlay #joinActionBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(18, 28, 38, 0.85);
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  animation: none;
}

#netStatus,
#netStatusHost,
#joinCodeLabel {
  font-size: clamp(9px, 1.2vw, 11px);
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  word-break: break-word;
  letter-spacing: 0.4px;
  font-family: var(--font-body);
}

.code-display {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 900;
  color: #fff4d6;
  background: rgba(200, 155, 60, 0.08);
  border: 1px solid rgba(200, 155, 60, 0.25);
  border-radius: 10px;
  padding: 10px 28px;
  letter-spacing: 8px;
  margin-top: 8px;
  text-shadow: 0 0 18px rgba(200, 155, 60, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   CO-OP & MATCHUP SETTINGS
   ═══════════════════════════════════════════════════════════ */
#coopTypeContainer {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  margin-bottom: 12px;
  gap: 4px;
  background: rgba(6, 16, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: 100px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 4px;
  position: relative;
  overflow: hidden;
  width: auto;
  max-width: 420px;
  box-sizing: border-box;
}

#coopTypeContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
}

#coopTypeContainer .lobby-role-btn {
  flex: 1;
  text-align: center;
  min-width: 110px;
}

#singleSettings {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 12px;
  gap: 12px;
  background: rgba(6, 16, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(240, 230, 210, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 8px 18px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  box-sizing: border-box;
}

#coopSettings,
#pvpSettings {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 12px;
  gap: 12px;
  background: rgba(6, 16, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(240, 230, 210, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 8px 18px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  box-sizing: border-box;
}

#aiDifficultyContainer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
  margin-bottom: 12px;
  gap: 12px;
  background: rgba(6, 16, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(240, 230, 210, 0.1);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 8px 18px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  box-sizing: border-box;
}

#aiDifficultyContainer::before,
#coopSettings::before,
#pvpSettings::before,
#singleSettings::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 155, 60, 0.3), transparent);
  pointer-events: none;
}

#aiDifficultyContainer label,
#coopSettings label,
#pvpSettings label,
#singleSettings label {
  font-family: var(--font-body);
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#aiDifficultyContainer label::before,
#coopSettings label::before,
#pvpSettings label::before,
#singleSettings label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.ai-diff-toggle-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(2, 8, 14, 0.75);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.2);
  flex: 1;
  justify-content: flex-end;
}

.ai-diff-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ai-diff-btn:hover {
  color: #f0e6d2;
  background: rgba(255, 255, 255, 0.05);
}

.ai-diff-btn.active[data-diff="easy"] {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.ai-diff-btn.active[data-diff="normal"] {
  background: rgba(6, 182, 212, 0.18);
  border-color: #06b6d4;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}

.ai-diff-btn.active[data-diff="hard"] {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.ai-diff-btn.active[data-diff="nightmare"] {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
  animation: nightmarePulse 2s infinite ease-in-out;
}

@keyframes nightmarePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

#coopMatchupSelect,
#pvpMatchupSelect,
#singleMatchupSelect {
  background: rgba(2, 8, 14, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c89b3c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: #f0e6d2;
  border: 1px solid rgba(200, 155, 60, 0.25);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 8px 34px 8px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  text-align: left;
  text-align-last: left;
  transition: all 0.25s ease;
  min-height: 38px;
  letter-spacing: 0.3px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
}

#coopMatchupSelect:hover,
#pvpMatchupSelect:hover,
#singleMatchupSelect:hover {
  border-color: rgba(200, 155, 60, 0.5);
  box-shadow: 0 0 12px rgba(200, 155, 60, 0.15);
}

#coopMatchupSelect:focus,
#pvpMatchupSelect:focus,
#singleMatchupSelect:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(200, 155, 60, 0.25);
}

#singleMatchupSelect option,
#coopMatchupSelect option,
#pvpMatchupSelect option {
  background: #09141c;
  color: #f0e6d2;
  padding: 10px;
}

.bot-tabs-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 14px;
  width: auto;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 32px;
  box-sizing: border-box;
}

#enemyTabsWrapperMulti {
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.12);
  background: rgba(239, 68, 68, 0.06);
}

.bot-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #8c98a4;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  height: 24px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.bot-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f0e6d2;
}

.bot-tab-btn.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.35) 100%);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bot-tab-btn#botTabAlly.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(3, 105, 161, 0.35) 100%);
  border-color: rgba(14, 165, 233, 0.55);
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bot-tab-btn.blue-team.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(3, 105, 161, 0.35) 100%) !important;
  border-color: rgba(14, 165, 233, 0.55) !important;
  color: #7dd3fc !important;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.bot-tab-btn.red-team.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.35) 100%) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.bot-tab-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.bot-tab-hero {
  font-weight: 800;
  color: #ffffff;
}


/* ── Preferred Lane / Side Selection (Centered) ───────────── */
.lane-select-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 14px auto;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.lane-select-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.lane-select-label {
  font-family: var(--font-display, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #94a3b8;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lane-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

.lane-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-family: var(--font-display, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  outline: none;
}

.lane-btn:hover {
  transform: translateY(-1px);
}

.lane-btn.lane-blue {
  border-color: rgba(14, 165, 233, 0.3);
  color: #93c5fd;
}

.lane-btn.lane-blue:hover {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
}

.lane-btn.lane-blue.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(2, 132, 199, 0.2) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lane-btn.lane-red {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.lane-btn.lane-red:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fee2e2;
}

.lane-btn.lane-red.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(185, 28, 28, 0.2) 100%);
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lane-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.lane-dot.blue-dot {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.lane-dot.red-dot {
  background: #f87171;
  box-shadow: 0 0 6px #f87171;
}


/* ═══════════════════════════════════════════════════════════
   SANDBOX MODE — LOBBY CONFIGURATION
   ═══════════════════════════════════════════════════════════ */
#sandboxTypeContainer {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  margin-bottom: 12px;
  gap: 4px;
  background: rgba(6, 16, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 230, 210, 0.12);
  border-radius: 100px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 4px;
  position: relative;
  overflow: hidden;
  width: auto;
  max-width: 420px;
  box-sizing: border-box;
}

#sandboxTypeContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
}

#sandboxTypeContainer .lobby-role-btn {
  flex: 1;
  text-align: center;
  min-width: 110px;
}


/* ═══════════════════════════════════════════════════════════
   IN-GAME SANDBOX TOOLBAR & CONTROL PANEL
   ═══════════════════════════════════════════════════════════ */
#sandboxToolsToggle {
  position: fixed;
  top: 12px;
  right: 148px;
  width: 36px;
  height: 36px;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.95) 0%, rgba(3, 6, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  padding: 0;
}

#sandboxToolsToggle:hover {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(180, 130, 40, 0.35) 100%);
  color: #fde047;
  border-color: rgba(200, 155, 60, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 155, 60, 0.25);
}

#sandboxToolsToggle:active {
  transform: translateY(0);
}

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

#sandboxPanel {
  position: fixed;
  top: 56px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 80px);
  z-index: 1001;
  display: none;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.2) 0%, rgba(1, 4, 9, 0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 163, 224, 0.22);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 163, 224, 0.12);
  overflow: hidden;
  position: fixed;
  animation: sbPanelFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#sandboxPanel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--blue-hex-subtle, rgba(0, 163, 224, 0.05)), transparent 60%);
  pointer-events: none;
}

@keyframes sbPanelFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

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

.sandbox-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.08) 0%, rgba(0, 90, 130, 0.04) 50%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.sandbox-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-header-icon {
  font-size: 18px;
}

.sb-header-text {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff4d6;
  text-transform: uppercase;
}

.sandbox-panel-close {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 14px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sandbox-panel-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.sandbox-panel-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 160px);
  position: relative;
  z-index: 1;
}

.sandbox-panel-body::-webkit-scrollbar {
  width: 5px;
}

.sandbox-panel-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.sandbox-panel-body::-webkit-scrollbar-thumb {
  background: rgba(200, 155, 60, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sandbox-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 155, 60, 0.65);
}

.sandbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
}

.sandbox-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #c89b3c;
  text-transform: uppercase;
}

.sandbox-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

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

.sb-btn {
  flex: 1;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 7px 10px;
  color: #cbd5e1;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.sb-btn:hover {
  background: rgba(0, 90, 130, 0.18);
  border-color: rgba(0, 163, 224, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.sb-btn.active {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.3) 0%, rgba(200, 155, 60, 0.12) 100%);
  border-color: rgba(200, 155, 60, 0.65);
  color: #fde047;
  box-shadow: 0 0 10px rgba(200, 155, 60, 0.2);
}

.sb-btn-icon {
  font-size: 13px;
}