/*
 * MSP2 Star Casino — Authenticated shell: Topbar, Sidebar & Curved Bottom Dock
 */
:root {
  color-scheme: dark;
  --font-ui: "Fredoka", "Outfit", "Nunito Sans", "Arial Rounded MT Bold", sans-serif;
  --font-micro: "Nunito Sans", "Fredoka", Arial, sans-serif;
  --ui-edge-gap: clamp(10px, 1.2vw, 18px);
  --ui-topbar-height: 60px;
  --ui-profile-width: clamp(250px, 19vw, 290px);
  --ui-sidebar-width: 104px;
  --ui-dock-height: 84px;
  --ui-radius: 22px;

  /* MovieStarPlanet 2 + Casino Vibrant Neon Theme */
  --msp2-bg: #090514;
  --msp2-surface: rgba(22, 12, 42, 0.82);
  --msp2-surface-glass: rgba(26, 14, 52, 0.65);
  --msp2-surface-card: rgba(32, 17, 64, 0.78);
  --msp2-border: rgba(255, 42, 133, 0.32);
  --msp2-border-strong: rgba(255, 42, 133, 0.65);
  --msp2-border-gold: rgba(255, 215, 0, 0.5);
  --msp2-border-cyan: rgba(0, 240, 255, 0.45);
  --msp2-pink: #ff1389;
  --msp2-pink-glow: rgba(255, 19, 137, 0.4);
  --msp2-gold: #ffd700;
  --msp2-gold-glow: rgba(255, 215, 0, 0.4);
  --msp2-cyan: #00f0ff;
  --msp2-cyan-glow: rgba(0, 240, 255, 0.35);
  --msp2-purple: #9d4edd;
  --msp2-purple-glow: rgba(157, 78, 221, 0.35);
  --msp2-text: #ffffff;
  --msp2-muted: #c4b5fd;
  --msp2-shadow: rgba(5, 2, 14, 0.65);

  font-family: var(--font-ui);
}

html,
body,
.hub-app {
  min-height: 100%;
  color: var(--msp2-text);
  background: var(--msp2-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(157, 78, 221, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(255, 19, 137, 0.15), transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(0, 240, 255, 0.12), transparent 60%);
  background-attachment: fixed;
}

body.hub-authenticated { overflow-x: clip; }

body.game-open .game-sidebar,
body.game-open .hub-main,
body.game-open .game-bottom-dock,
body.game-open .sidebar-backdrop,
body.game-open .hub-drawer,
body.game-open .drawer-overlay,
body.game-open .toast-region {
  display: none !important;
}

.hub-app {
  --hub-sidebar-width: var(--ui-sidebar-width);
  --hub-topbar-height: var(--ui-topbar-height);
  min-height: 100vh;
  overflow-x: clip;
  font-family: var(--font-ui);
}

.hub-app :is(button, input, textarea, select) { font-family: inherit; }
.hub-app :is(button, input, textarea, select, a):focus-visible {
  outline: 3px solid var(--msp2-pink);
  outline-offset: 3px;
}

.hub-main { min-height: 100vh; margin-left: 0; }

.hub-route-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: calc(var(--ui-edge-gap) * 2 + var(--ui-topbar-height))
    var(--ui-edge-gap)
    calc(var(--ui-dock-height) + var(--ui-edge-gap) * 2)
    calc(var(--ui-sidebar-width) + var(--ui-edge-gap) * 2);
}

/* ========================================================
   MSP2 STAR CASINO TOPBAR
   ======================================================== */
.game-topbar {
  position: fixed;
  z-index: 410;
  top: var(--ui-edge-gap);
  right: var(--ui-edge-gap);
  left: calc(var(--ui-edge-gap) * 2 + var(--ui-profile-width));
  display: flex;
  width: auto;
  height: var(--ui-topbar-height);
  min-height: var(--ui-topbar-height);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.game-topbar .topbar-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.mobile-menu-button { display: none !important; }
.game-topbar .lobby-right-toggle { display: none; }

/* MSP2 Brand Badge in Topbar */
.msp2-brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--msp2-border);
  border-radius: 18px;
  background: var(--msp2-surface-glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 20px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: #fff;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.msp2-brand-badge:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--msp2-pink);
  box-shadow: 0 10px 24px var(--msp2-pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.msp2-brand-sparkle {
  font-size: 1.25rem;
  animation: msp2-star-sparkle 2.5s infinite ease-in-out;
  display: inline-block;
}

.msp2-brand-text {
  display: flex;
  flex-direction: column;
}

.msp2-brand-sup {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--msp2-gold);
  font-weight: 900;
  text-transform: uppercase;
}

.msp2-brand-name {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 0%, #ffc2df 50%, var(--msp2-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.msp2-brand-name strong {
  background: linear-gradient(135deg, var(--msp2-gold) 0%, #ff8800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* MSP2 Luxury Currency Chips (Wallet) */
.game-topbar .topbar-wallet {
  display: flex;
  height: var(--ui-topbar-height);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.game-topbar .currency-chip {
  position: relative;
  display: grid;
  width: clamp(168px, 13vw, 200px);
  height: 56px;
  min-width: 0;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 8px;
  overflow: visible;
  border: 1.5px solid var(--msp2-border-gold);
  border-radius: 20px;
  background: var(--msp2-surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform .18s ease, box-shadow .18s ease;
}

.game-topbar .currency-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 18px var(--msp2-gold-glow);
}

.game-topbar .currency-chip.rubies {
  width: clamp(156px, 12vw, 185px);
  border-color: var(--msp2-border);
}

.game-topbar .currency-chip.rubies:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 18px var(--msp2-pink-glow);
}

.currency-icon-halo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.28) 0%, transparent 75%);
}

.currency-icon-halo.rubies-halo {
  background: radial-gradient(circle, rgba(255, 19, 137, 0.3) 0%, transparent 75%);
}

.game-topbar .currency-chip img {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
  transition: transform .2s ease;
}

.game-topbar .currency-chip:hover img {
  transform: scale(1.1) rotate(-4deg);
}

.game-topbar .currency-chip > .currency-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-topbar .currency-chip :is(small, strong) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-topbar .currency-chip small {
  color: var(--msp2-muted);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-topbar .currency-chip strong {
  margin: 1px 0 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.game-topbar .currency-chip.coins strong {
  color: #ffe66d;
}

.game-topbar .currency-chip.rubies strong {
  color: #ff70a6;
}

.game-topbar .currency-add {
  display: grid;
  width: 28px;
  height: 30px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--msp2-pink) 0%, #d80064 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 10px var(--msp2-pink-glow);
  font-size: 0.78rem;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.game-topbar .currency-add:hover {
  transform: scale(1.12);
  filter: brightness(1.15);
}

/* MSP2 VIP Club Pill */
.msp2-vip-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 56px;
  padding: 0 14px;
  border: 1.5px solid var(--msp2-border-gold);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(38, 20, 74, 0.9) 0%, rgba(68, 24, 102, 0.9) 100%);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.msp2-vip-chip:hover {
  transform: translateY(-2px);
  border-color: var(--msp2-gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 20px var(--msp2-gold-glow);
}

.msp2-vip-icon {
  color: var(--msp2-gold);
  font-size: 1.15rem;
  filter: drop-shadow(0 2px 5px rgba(255, 215, 0, 0.6));
  animation: msp2-vip-crown-pulse 2.2s infinite ease-in-out;
}

.msp2-vip-label {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.msp2-vip-badge-mini {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 0.52rem;
  font-weight: 900;
  color: #000;
  background: linear-gradient(135deg, var(--msp2-gold) 0%, #ffaa00 100%);
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

/* Global Search in Topbar */
.lobby-global-search {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.lobby-global-search:focus-within {
  width: min(360px, calc(100vw - var(--ui-edge-gap) * 2));
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}

.lobby-global-search input {
  height: 48px;
  border: 1.5px solid var(--msp2-border);
  border-radius: 16px;
  color: #fff;
  background: var(--msp2-surface);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px var(--msp2-shadow);
  padding: 0 16px;
}

/* Topbar Actions (MSP2 Bubble Buttons) */
.game-topbar .topbar-actions {
  display: flex;
  height: var(--ui-topbar-height);
  align-items: center;
  gap: 10px;
  margin: 0 0 0 auto;
  padding: 0;
}

.game-topbar .topbar-icon {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--msp2-border);
  border-radius: 18px;
  color: #fff;
  background: var(--msp2-surface);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 20px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: none;
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.game-topbar .topbar-icon > i {
  color: #fff;
  font-size: 1.12rem;
  transition: transform .2s ease;
}

.game-topbar .topbar-icon:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--msp2-pink);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 19, 137, 0.35) 0%, rgba(38, 16, 74, 0.85) 100%);
  box-shadow: 0 10px 24px var(--msp2-pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.game-topbar .topbar-icon:hover > i {
  transform: scale(1.15);
}

.game-topbar .topbar-icon b {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--msp2-bg);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--msp2-pink) 0%, #ff0055 100%);
  box-shadow: 0 0 10px var(--msp2-pink-glow);
  font-size: 0.58rem;
  font-weight: 900;
}

/* ========================================================
   MSP2 SIDEBAR & FLOATING PROFILE CARD
   ======================================================== */
.game-sidebar {
  position: fixed;
  z-index: 390;
  top: calc(var(--ui-edge-gap) * 2 + var(--ui-topbar-height));
  bottom: calc(var(--ui-edge-gap) + var(--ui-dock-height));
  left: var(--ui-edge-gap);
  display: flex;
  width: var(--ui-sidebar-width);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 12px 8px;
  border: 1.5px solid var(--msp2-border);
  border-radius: var(--ui-radius);
  color: #fff;
  background: var(--msp2-surface);
  backdrop-filter: blur(20px);
  box-shadow: 12px 0 32px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: none;
  transition: width .22s cubic-bezier(0.2, 0.8, 0.2, 1), transform .22s cubic-bezier(0.2, 0.8, 0.2, 1);
  scrollbar-width: none;
}

.game-sidebar.open {
  transform: translateX(0);
}

.game-sidebar::-webkit-scrollbar { display: none; }

/* Fixed Profile Card at top-left */
.game-sidebar .sidebar-profile {
  position: fixed;
  z-index: 420;
  top: var(--ui-edge-gap);
  left: var(--ui-edge-gap);
  display: block;
  width: var(--ui-profile-width);
  height: var(--ui-topbar-height);
  min-height: var(--ui-topbar-height);
  margin: 0;
  padding: 7px 12px;
  overflow: visible;
  border: 1.5px solid var(--msp2-border-strong);
  border-radius: var(--ui-radius);
  color: #fff;
  background: var(--msp2-surface);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 26px var(--msp2-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.game-sidebar .sidebar-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--msp2-pink-glow);
}

.game-sidebar .sidebar-profile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

/* Avatar with Star Halo */
.game-sidebar .sidebar-avatar {
  position: relative;
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  max-width: 46px;
  max-height: 46px;
  place-items: center;
  overflow: visible;
  border: 2px solid var(--msp2-pink);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #441865 0%, #1a0836 100%);
  box-shadow: 0 0 14px var(--msp2-pink-glow);
  text-decoration: none;
}

.game-sidebar .sidebar-avatar > img:first-child {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.game-sidebar .sidebar-avatar > b {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* MSP2 Star Level Badge on Avatar */
.sidebar-level-emblem {
  position: absolute;
  z-index: 3;
  right: -9px;
  bottom: -9px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.sidebar-level-emblem img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.75));
  animation: msp2-star-pulse 3s infinite ease-in-out;
}

.sidebar-level-emblem b {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  text-shadow: 0 1px 3px #1a0438;
}

.game-sidebar .sidebar-profile-copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-login-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.game-sidebar .sidebar-profile-copy strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msp2-rank-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.game-sidebar .sidebar-profile-copy > small,
.msp2-rank-title-row > small {
  display: block;
  color: var(--msp2-muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.msp2-tier-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 0.48rem;
  font-weight: 900;
  color: var(--msp2-gold);
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.online-dot,
.game-sidebar .online-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin: 0;
  border: 2px solid var(--msp2-surface);
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

/* Fame XP Meter */
.game-sidebar .compact-level {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 6px;
  margin: -10px 0 0 58px;
}

.game-sidebar .compact-level > i {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(40, 20, 70, 0.8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.game-sidebar .compact-level > i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--msp2-pink) 0%, var(--msp2-gold) 100%);
  box-shadow: 0 0 10px var(--msp2-pink-glow);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-sidebar .compact-level > span,
.msp2-meter-labels {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.game-sidebar .compact-level small {
  overflow: hidden;
  color: var(--msp2-muted);
  font-size: 0.46rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar Nav Items */
.game-sidebar-nav {
  display: grid;
  flex: 1;
  align-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.game-sidebar-nav p { display: none; }

.game-sidebar-nav a {
  position: relative;
  display: flex;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 6px 4px;
  border: 1.5px solid transparent;
  border-radius: 16px;
  color: var(--msp2-muted);
  background: transparent;
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  transform: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.game-sidebar-nav a::before { display: none; }

.game-sidebar-nav .nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  color: currentColor;
  background: transparent;
  font-size: 1.15rem;
  filter: none;
  transform: none;
  transition: transform .18s ease;
}

.game-sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.game-sidebar-nav a:hover .nav-icon {
  transform: scale(1.15);
}

.game-sidebar-nav a.active {
  border-color: var(--msp2-border-strong);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 19, 137, 0.45) 0%, rgba(120, 20, 150, 0.5) 100%);
  box-shadow: 0 6px 18px var(--msp2-pink-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.game-sidebar-nav a.active .nav-icon {
  color: var(--msp2-gold);
}

.game-sidebar-nav .nav-count {
  position: absolute;
  top: 4px;
  right: 6px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--msp2-surface);
  border-radius: 999px;
  color: #fff;
  background: var(--msp2-pink);
  box-shadow: 0 0 8px var(--msp2-pink-glow);
  font-size: 0.5rem;
  font-weight: 900;
}

.game-sidebar-footer {
  display: grid;
  place-items: center;
  margin-top: auto;
  padding-top: 6px;
}

.game-sidebar-footer button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--msp2-border);
  border-radius: 12px;
  color: var(--msp2-muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all .15s ease;
}

.game-sidebar-footer button:hover {
  border-color: var(--msp2-pink);
  color: #fff;
  background: var(--msp2-pink);
  box-shadow: 0 0 12px var(--msp2-pink-glow);
}

.hub-app.sidebar-collapsed { --ui-sidebar-width: 68px; }
.hub-app.sidebar-collapsed .game-sidebar-nav a span,
.hub-app.sidebar-collapsed .compact-level { display: none; }
.hub-app.sidebar-collapsed .game-sidebar-nav a { min-height: 46px; }

/* ========================================================
   MSP2 ICONIC CURVED FLOATING BOTTOM DOCK
   ======================================================== */
.game-bottom-dock {
  position: fixed;
  z-index: 430;
  right: auto;
  bottom: var(--ui-edge-gap);
  left: 50%;
  display: grid;
  width: min(440px, calc(100vw - var(--ui-edge-gap) * 2));
  height: var(--ui-dock-height);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 14px;
  border: 2px solid var(--msp2-border-strong);
  border-radius: 36px;
  color: #fff;
  background: rgba(20, 10, 42, 0.88);
  backdrop-filter: blur(24px);
  box-shadow:
    0 16px 40px var(--msp2-shadow),
    0 0 24px var(--msp2-pink-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateX(-50%);
  animation: none;
  overflow: visible;
}

.game-bottom-dock::before,
.game-bottom-dock::after {
  display: none;
  content: none;
}

.msp2-dock-sheen {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  pointer-events: none;
}

.game-bottom-dock a,
.game-bottom-dock button,
.game-bottom-dock .dock-lobby {
  position: relative;
  isolation: auto;
  display: flex;
  width: auto;
  min-width: 0;
  height: 68px;
  min-height: 68px;
  flex-direction: column;
  place-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 4px;
  border: 1.5px solid transparent;
  border-radius: 22px;
  color: var(--msp2-muted);
  background: transparent;
  box-shadow: none;
  font-size: 0.58rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: none;
  transition: transform .18s cubic-bezier(0.2, 0.8, 0.2, 1), color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.dock-icon-bubble {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  transition: all .2s ease;
}

.game-bottom-dock :is(a, button) > i,
.game-bottom-dock .dock-lobby > i,
.dock-icon-bubble > i {
  color: currentColor;
  font-size: 1.25rem;
  filter: none;
}

.game-bottom-dock .dock-lobby > span {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.game-bottom-dock :is(a, button):hover {
  color: #fff;
  transform: translateY(-4px) scale(1.06);
}

.game-bottom-dock :is(a, button):hover .dock-icon-bubble {
  background: rgba(255, 19, 137, 0.25);
  box-shadow: 0 0 14px var(--msp2-pink-glow);
}

.game-bottom-dock :is(a, button).active,
.game-bottom-dock .dock-lobby.active {
  border-color: var(--msp2-border-strong);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 19, 137, 0.45) 0%, rgba(140, 20, 180, 0.5) 100%);
  box-shadow:
    0 8px 20px var(--msp2-pink-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
}

.game-bottom-dock :is(a, button).active .dock-icon-bubble {
  background: rgba(255, 255, 255, 0.2);
  color: var(--msp2-gold);
}

.game-bottom-dock :is(a, button).active > i,
.game-bottom-dock .dock-lobby.active > i {
  color: var(--msp2-gold);
}

.game-bottom-dock b {
  position: absolute;
  top: 2px;
  right: 15%;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--msp2-bg);
  border-radius: 999px;
  color: #fff;
  background: var(--msp2-pink);
  box-shadow: 0 0 10px var(--msp2-pink-glow);
  font-size: 0.5rem;
  font-weight: 900;
}

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */
@keyframes msp2-star-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 4px #ffd700); }
  50% { transform: scale(1.25) rotate(15deg); filter: drop-shadow(0 0 10px #ff1389); }
}

@keyframes msp2-star-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes msp2-vip-crown-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(-5deg); }
}

/* Responsive Shell Breakpoints */
@media (max-width: 899px) {
  :root {
    --ui-sidebar-width: 0px;
    --ui-profile-width: 0px;
    --ui-dock-height: 76px;
  }

  .game-topbar {
    left: var(--ui-edge-gap);
    gap: 8px;
  }

  .mobile-menu-button { display: grid !important; }

  .game-sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    width: 270px;
    border-radius: 0 24px 24px 0;
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.85);
  }

  .game-sidebar.open {
    transform: translateX(0);
  }

  .game-sidebar .sidebar-profile {
    position: static;
    width: 100%;
    margin-bottom: 12px;
  }

  .game-bottom-dock {
    width: calc(100vw - var(--ui-edge-gap) * 2);
    border-radius: 28px;
    padding: 4px 8px;
  }

  .game-bottom-dock a,
  .game-bottom-dock button {
    height: 60px;
    min-height: 60px;
    font-size: 0.5rem;
  }

  .dock-icon-bubble {
    width: 30px;
    height: 30px;
  }

  .dock-icon-bubble > i {
    font-size: 1.05rem;
  }
}
