:root {
  --bg: #0b0b0e;
  --surface: #121217;
  --surface-2: #18181f;
  --surface-hover: #21212b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --crimson: #e11d48;
  --crimson-light: #f43f5e;
  --crimson-glow: rgba(225, 29, 72, 0.32);
  --trx-gold: #ffffff;
  --trx-red: #e11d48;
  --trx-orange: #f43f5e;
  --green: #10b981;
  --red: #e11d48;
  --radius: 18px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Chakra Petch', 'Rajdhani', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 70% 45% at 75% 10%, rgba(225, 29, 72, 0.14), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Hide default white scrollbars inside HUD lists & cards; keep smooth wheel scrolling */
[data-bet-list], .quick-inv-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
[data-bet-list]::-webkit-scrollbar, .quick-inv-grid::-webkit-scrollbar {
  display: none;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0b0b0e; }
::-webkit-scrollbar-thumb { background: rgba(244, 63, 94, 0.35); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(244, 63, 94, 0.65); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.card-title, .mine-balance, .mult-tile, .bet-col-header, .topbar-pill {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
}
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 12px; }

/* Strict Red/White Wordmark */
.wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, #ffffff 45%, var(--crimson-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.35); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary, .btn-gold {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 58%, #be123c 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  border-bottom: 3px solid #881337;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 22px var(--crimson-glow);
}
.btn-primary:hover, .btn-gold:hover {
  background: linear-gradient(180deg, #fb7185 0%, #f43f5e 60%, #e11d48 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 30px rgba(244, 63, 94, 0.55);
  transform: translateY(-1px);
}
.btn-primary:active, .btn-gold:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
}

.btn-white {
  background: #ffffff;
  color: #0b0b0e;
  border-color: #ffffff;
  font-weight: 700;
}
.btn-white:hover { background: #e5e7eb; }

.btn-danger { background: rgba(225, 29, 72, 0.14); color: #fda4af; border-color: rgba(225, 29, 72, 0.4); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn-lg { padding: 14px 20px; font-size: 15px; font-weight: 700; width: 100%; border-radius: 14px; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.input {
  width: 100%;
  padding: 11px 14px;
  background: #0b0b0e;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  user-select: text;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--crimson-light); }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Shell & Vertical 3D Game Icon Dock Sidebar (CSFAIL Reference Style) */
.app-shell {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #0b0b10;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  width: 100%;
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px 7px;
  border-radius: 16px;
  color: #7d8092;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-3d-icon-wrap {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
}
.nav-3d-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.38) 0%, transparent 72%);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.nav-3d-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.8));
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.24s ease;
  position: relative;
  z-index: 1;
}
.nav-badge-count {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.6);
}
.nav-label {
  display: block;
  max-width: 92px;
  text-align: center;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}
.nav-item:hover .nav-3d-icon-wrap::before,
.nav-item.active .nav-3d-icon-wrap::before {
  opacity: 1;
  transform: scale(1.15);
}
.nav-item:hover .nav-3d-icon {
  transform: translateY(-4px) scale(1.11) rotate(-3deg);
  filter: drop-shadow(0 12px 18px rgba(244, 63, 94, 0.45));
}
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.16) 0%, rgba(225, 29, 72, 0.04) 100%);
  border-color: rgba(225, 29, 72, 0.35);
}
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #f43f5e;
  box-shadow: 0 0 12px #f43f5e;
}
.nav-item.active .nav-3d-icon {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 10px 18px rgba(244, 63, 94, 0.55));
}
.nav-item.active .nav-label {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
}

.main-area { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--border);
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
}

/* CSFAIL-Inspired Header Brand Cluster + Breakout 3D "UPGRADE RIG" Bait Banner */
.header-brand-cluster {
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.brand-delta-svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 14px rgba(225, 29, 72, 0.55));
  transition: transform 0.2s ease;
}
.brand-logo-link:hover .brand-delta-svg {
  transform: scale(1.08) rotate(-4deg);
}
.brand-italic-title {
  font-size: 27px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.18);
}

/* Breakout 3D CTA Banner ("Прокачивайся" / "UPGRADE RIG") */
.upgrade-bait-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px 0 58px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(90deg, #be123c 0%, #e11d48 52%, #881337 100%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 6px 24px rgba(225, 29, 72, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  margin-left: 8px;
}
.upgrade-bait-banner::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.8), rgba(255, 255, 255, 0.7), rgba(225, 29, 72, 0.8));
  z-index: -1;
  filter: blur(8px);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.upgrade-bait-banner:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 10px 30px rgba(244, 63, 94, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.upgrade-bait-banner:hover::before {
  opacity: 0.95;
}
.upgrade-bait-medallion {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 12px rgba(244, 63, 94, 0.65));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.upgrade-bait-banner:hover .upgrade-bait-medallion {
  transform: translateY(-50%) scale(1.12) rotate(12deg);
}
.upgrade-bait-text {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.content { padding: 22px 26px; max-width: 1380px; width: 100%; margin: 0 auto; }

.card {
  background:
    radial-gradient(circle at 100% 0%, rgba(225, 29, 72, 0.06), transparent 55%),
    linear-gradient(180deg, #16161e 0%, #101015 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-title { font-size: 15px; font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.pill-fire { background: rgba(225, 29, 72, 0.16); color: #fda4af; border: 1px solid rgba(225, 29, 72, 0.4); }
.pill-gold { background: rgba(255, 255, 255, 0.12); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.25); }

/* CSFAIL-inspired Wheel Layout: Left Dock + Right Hero Stage with Animated 3D Mascot */
.wheel-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.wheel-layout > * { min-width: 0; }

.bet-dock {
  background:
    linear-gradient(180deg, #181822 0%, #101016 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.45);
}

/* Live Drop & High-Multiplier Ticker Bar */
.live-ticker-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(14, 14, 20, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}
.live-ticker-bar::-webkit-scrollbar { display: none; }
.live-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}
.live-ticker-pill.hot {
  background: rgba(225, 29, 72, 0.14);
  border-color: rgba(244, 63, 94, 0.42);
}

.wallet-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0b0b0e;
  border-radius: 14px;
  padding: 4px;
  border: 1px solid var(--border);
}
.wallet-tab {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  transition: all 0.15s;
}
.wallet-tab.active {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 14px var(--crimson-glow);
}

.mult-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mult-tile {
  padding: 11px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 3px solid #09090d;
  background: linear-gradient(180deg, #252533 0%, #171720 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: all 0.15s ease;
}
.mult-tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.45); }
.mult-tile.t-red {
  background: linear-gradient(180deg, #e11d48 0%, #9f1239 100%);
  border-color: rgba(255, 255, 255, 0.25);
  border-bottom-color: #6b0f2b;
  color: #ffffff;
}
.mult-tile.t-white {
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 100%);
  border-color: #ffffff;
  border-bottom-color: #71717a;
  color: #0b0b0e;
}
.mult-tile.selected {
  outline: 2px solid #ffffff;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.65);
  transform: translateY(-2px);
}

.stage-hero {
  background: #0b0b0e;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  min-height: 410px;
  display: grid;
  grid-template-columns: 1fr 275px;
  align-items: center;
  gap: 0px;
}

/* 2.5D Animated 3D Mascot Stage — overlaps right rim of the wheel so her hands push it! */
.mascot-stage {
  position: relative;
  height: 375px;
  margin-left: -34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  perspective: 800px;
  z-index: 6;
  pointer-events: none;
}
.mascot-aura {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.28) 0%, transparent 70%);
  top: 18%;
  filter: blur(18px);
  animation: auraPulse 3.2s ease-in-out infinite;
}
.mascot-img-wrap {
  position: relative;
  width: 285px;
  height: 370px;
  transform-origin: 70% 85%;
  animation: mascotIdle 3.4s ease-in-out infinite;
  will-change: transform;
}
.mascot-img-wrap.pushing {
  animation: mascotPushWheel 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mascot-img-wrap.spinning {
  animation: mascotExcited 0.65s ease-in-out infinite;
}
.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: lighten;
  mask-image: radial-gradient(ellipse 92% 94% at 52% 48%, #000 74%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 94% at 52% 48%, #000 74%, transparent 100%);
  filter: drop-shadow(0 12px 28px rgba(225, 29, 72, 0.24));
}

.push-spark {
  position: absolute;
  left: -8px;
  top: 44%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #f43f5e 40%, transparent 72%);
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
  z-index: 12;
}
.push-spark.active {
  animation: sparkBurst 0.55s ease-out forwards;
}

@keyframes sparkBurst {
  0% { opacity: 0; transform: scale(0.3); }
  25% { opacity: 1; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.8) translateY(35px); }
}

@keyframes mascotPushWheel {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  32% { transform: translate(16px, -16px) rotate(7deg) scale(1.02); }
  62% { transform: translate(-34px, 24px) rotate(-13deg) scale(1.05); }
  100% { transform: translate(-6px, 0px) rotate(-2deg) scale(1.01); }
}
/* Breathing chest-badge neon pulse overlay */
.mascot-chest-glow {
  position: absolute;
  top: 45%;
  left: 45%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.75) 0%, transparent 70%);
  mix-blend-mode: screen;
  animation: chestPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mascotIdle {
  0%, 100% {
    transform: translateY(0px) scaleY(1) scaleX(1) rotateZ(0deg);
  }
  35% {
    transform: translateY(-6px) scaleY(1.016) scaleX(0.994) rotateZ(-0.9deg);
  }
  70% {
    transform: translateY(-3px) scaleY(1.008) scaleX(0.997) rotateZ(0.8deg);
  }
}

@keyframes mascotExcited {
  0%, 100% {
    transform: translateY(0px) scale(1.02) rotateZ(-1.4deg);
  }
  50% {
    transform: translateY(-10px) scale(1.04) rotateZ(1.4deg);
  }
}

@keyframes chestPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.35); }
}

@keyframes auraPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.12); }
}

/* Wheel Container inside Stage */
.wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 24px solid #ffffff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
  z-index: 10;
}

.tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tier-card {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0b0e;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  color: var(--text);
}
.tier-card:hover { border-color: rgba(255, 255, 255, 0.3); }
.tier-card.active {
  border-color: var(--crimson-light);
  background: rgba(225, 29, 72, 0.14);
}

/* Mining & Nodes */
.mine-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(225, 29, 72, 0.16) 0%, transparent 65%),
    var(--surface);
}
.mine-balance { font-size: 38px; font-weight: 800; letter-spacing: -0.04em; }
.coin-wrap { position: relative; margin: 26px 0; display: grid; place-items: center; }
.orbital-ring {
  position: absolute;
  width: 266px;
  height: 266px;
  border-radius: 50%;
  border: 1px dashed rgba(225, 29, 72, 0.4);
  animation: spinSlow 20s linear infinite;
  pointer-events: none;
}
.orbital-ring-2 {
  position: absolute;
  width: 298px;
  height: 298px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: spinSlow 32s linear infinite reverse;
  pointer-events: none;
}
@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.coin-btn {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--crimson-light);
  background: radial-gradient(circle at 30% 25%, rgba(225, 29, 72, 0.35) 0%, #0b0b0e 70%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 40px rgba(225, 29, 72, 0.28);
}
.coin-btn:hover { border-color: #ffffff; }
.coin-btn:active { transform: scale(0.94); }

.float-num {
  position: absolute;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px var(--crimson);
  pointer-events: none;
  z-index: 10;
  animation: floatUp 0.75s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(1.18); }
}

.energy-wrap { width: 100%; max-width: 380px; }
.energy-bar {
  height: 8px;
  background: #0b0b0e;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  margin-top: 6px;
}
.energy-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--crimson), #ffffff);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.node-card {
  background: #0d0d12;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, border-color 0.15s;
}
.node-card:hover { transform: translateY(-2px); border-color: var(--crimson-light); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 9px 10px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* Auth */
.auth-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  overflow: hidden;
  background: #07070c;
}

/* Live Games Lobby Backdrop behind the Auth Modal */
.auth-bg-lobby {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  padding: 18px 26px;
  gap: 18px;
  opacity: 0.42;
  filter: blur(4px) saturate(1.15);
  transform: scale(1.02);
}
.auth-bg-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-radius: 16px;
  background: rgba(18, 18, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-bg-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.auth-bg-card {
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(24, 24, 38, 0.92), rgba(11, 11, 18, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  overflow: hidden;
  position: relative;
}
.auth-bg-cases-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.auth-bg-case-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.auth-bg-case-tile img {
  width: 100%;
  max-height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(225, 29, 72, 0.35));
}
.auth-bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 65% 55% at 50% 42%, rgba(225, 29, 72, 0.16), transparent 68%),
    rgba(6, 7, 13, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: none;
}

/* CS.FAIL-level 2-Column Split Auth Modal */
.auth-split-modal {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: 300px 1fr;
  background: linear-gradient(180deg, rgba(22, 24, 38, 0.96) 0%, rgba(13, 14, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(244, 63, 94, 0.45);
  border-radius: 26px;
  overflow: hidden;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.8),
    0 0 70px rgba(225, 29, 72, 0.18);
}

/* Left Character Showcase Panel */
.auth-hero-side {
  position: relative;
  min-height: 430px;
  background:
    radial-gradient(circle at 55% 32%, rgba(244, 63, 94, 0.48) 0%, rgba(159, 18, 57, 0.25) 45%, #090910 85%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-hero-char {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  transform: scaleX(-1) scale(1.06);
  filter: contrast(1.05) saturate(1.08);
  pointer-events: none;
}
.auth-hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 9, 16, 0.05) 35%, rgba(9, 9, 16, 0.86) 100%);
  pointer-events: none;
}
.auth-hero-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-hero-bonus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.25);
  border: 1px solid rgba(244, 63, 94, 0.6);
  color: #fda4af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.auth-hero-wordmark {
  font-family: 'Chakra Petch', 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 4px 18px rgba(225, 29, 72, 0.55);
}

/* Right Auth Controls Panel */
.auth-form-side {
  padding: 28px 32px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.auth-lang-bar {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 4px;
}
.auth-lang-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-lang-pill:hover { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.auth-lang-pill.active {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  border-color: rgba(253, 164, 175, 0.55);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}
.auth-heading {
  text-align: center;
  margin: 18px 0 24px;
}
.auth-heading h1 {
  margin: 0;
  font-family: 'Chakra Petch', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}
.auth-heading p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.auth-tg-cta {
  position: relative;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.55);
  background: linear-gradient(135deg, #2AABEE 0%, #0284c7 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(34, 158, 217, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.auth-tg-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(34, 158, 217, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}
.auth-tg-cta:disabled { opacity: 0.65; cursor: wait; }
.auth-tg-badge {
  position: absolute;
  right: 14px;
  bottom: -9px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #09090d;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.auth-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.08em;
}
.auth-seed-toggle {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-seed-toggle:hover {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fff;
}
.auth-seed-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(8, 9, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.auth-trust-row {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .auth-split-modal {
    grid-template-columns: 1fr;
    max-width: 410px;
  }
  .auth-hero-side {
    min-height: 185px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .auth-hero-char {
    object-position: 50% 12%;
  }
  .auth-form-side {
    padding: 22px 20px 22px;
  }
  .auth-bg-grid {
    grid-template-columns: 1fr;
  }
  .auth-bg-cases-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.demo-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0b0e;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.demo-btn:hover { border-color: var(--crimson-light); }

/* Toast */
.toast-root {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px; z-index: 200;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--crimson-light);
  padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,0.65);
}
.toast.err { border-left-color: #ff4d6d; color: #fda4af; }

/* Double Mode Ribbon & Cases Reel */
.double-viewport {
  position: relative;
  width: 100%;
  height: 110px;
  background: #0b0b0e;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.double-center-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #ffffff;
  box-shadow: 0 0 14px #ffffff;
  z-index: 10;
  pointer-events: none;
}
.double-track {
  display: flex;
  gap: 10px;
  padding: 0 50%;
  will-change: transform;
}
.double-tile {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dt-RED { background: linear-gradient(145deg, #f43f5e, #be123c); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.dt-BLACK { background: linear-gradient(145deg, #23232e, #14141b); color: #d1d5db; }
.dt-WHITE { background: #ffffff; color: #0b0b0e; box-shadow: 0 0 22px rgba(255,255,255,0.45); }

.case-card {
  background: linear-gradient(180deg, #17171f 0%, #0e0e13 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.case-card:hover, .case-card.selected {
  transform: translateY(-4px);
  border-color: var(--crimson-light);
  box-shadow: 0 14px 36px rgba(225, 29, 72, 0.25);
}
.case-card.selected {
  background:
    radial-gradient(circle at 50% 25%, rgba(225, 29, 72, 0.24), transparent 70%),
    linear-gradient(180deg, #1b1721 0%, #0f0e14 100%);
  border-width: 2px;
}

/* CSFAIL / CS2 Style 3D Case Roulette Viewport & Reel Cards */
.case-roulette-viewport {
  position: relative;
  height: 174px;
  background:
    radial-gradient(circle at 50% 50%, rgba(225, 29, 72, 0.15) 0%, transparent 65%),
    #09090d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.85);
}
.case-roulette-viewport::before,
.case-roulette-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  z-index: 4;
  pointer-events: none;
}
.case-roulette-viewport::before {
  left: 0;
  background: linear-gradient(90deg, #09090d 10%, transparent 100%);
}
.case-roulette-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, #09090d 10%, transparent 100%);
}
.case-laser-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff 0%, #f43f5e 50%, #ffffff 100%);
  box-shadow: 0 0 18px #f43f5e, 0 0 6px #ffffff;
  z-index: 5;
  pointer-events: none;
}
.case-laser-pointer::before,
.case-laser-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}
.case-laser-pointer::before {
  top: 0;
  border-top: 12px solid #ffffff;
  filter: drop-shadow(0 2px 6px #f43f5e);
}
.case-laser-pointer::after {
  bottom: 0;
  border-bottom: 12px solid #ffffff;
  filter: drop-shadow(0 -2px 6px #f43f5e);
}

.case-reel-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  will-change: transform;
}
.case-reel-card {
  width: 144px;
  height: 146px;
  flex-shrink: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #191923 0%, #101016 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 4px solid #71717a;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.case-reel-card.rarity-COMMON {
  border-bottom-color: #a1a1aa;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.08), #111117 75%);
}
.case-reel-card.rarity-RARE {
  border-bottom-color: #fb7185;
  background: radial-gradient(circle at 50% 38%, rgba(244,63,94,0.22), #121118 75%);
}
.case-reel-card.rarity-EPIC {
  border-bottom-color: #e11d48;
  background: radial-gradient(circle at 50% 38%, rgba(225,29,72,0.38), #150f16 75%);
  box-shadow: inset 0 0 18px rgba(225, 29, 72, 0.22);
}
.case-reel-card.rarity-LEGENDARY {
  border-bottom-color: #ffffff;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.34), #18121a 78%);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.25);
}

/* Full-Screen 3D Item Drop Reveal Modal (Pops up right in front of the player on win!) */
.case-win-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 9, 0.86);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease forwards;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn3DItem {
  0% { transform: scale(0.55) translateY(24px); opacity: 0; }
  65% { transform: scale(1.06) translateY(-6px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes spinRaysSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.case-win-modal {
  position: relative;
  width: 100%;
  max-width: 470px;
  background:
    radial-gradient(circle at 50% 28%, rgba(225, 29, 72, 0.36) 0%, transparent 68%),
    linear-gradient(180deg, #171722 0%, #0b0b0f 100%);
  border: 2px solid rgba(244, 63, 94, 0.65);
  border-radius: 26px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(225, 29, 72, 0.42);
  animation: popIn3DItem 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  overflow: hidden;
}
.case-win-showcase {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  margin: 8px 0 14px;
}
.case-win-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 20deg,
    rgba(244, 63, 94, 0.25) 20deg 40deg,
    transparent 40deg 60deg,
    rgba(255, 255, 255, 0.16) 60deg 80deg,
    transparent 80deg 120deg,
    rgba(244, 63, 94, 0.25) 120deg 140deg,
    transparent 140deg 180deg,
    rgba(255, 255, 255, 0.16) 180deg 200deg,
    transparent 200deg 240deg,
    rgba(244, 63, 94, 0.25) 240deg 260deg,
    transparent 260deg 300deg,
    rgba(255, 255, 255, 0.16) 300deg 320deg,
    transparent 320deg 360deg
  );
  mask-image: radial-gradient(circle, #000 10%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 68%);
  animation: spinRaysSlow 14s linear infinite;
  pointer-events: none;
}
.case-win-3d-img {
  position: relative;
  z-index: 2;
  max-width: 205px;
  max-height: 195px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 24px rgba(244, 63, 94, 0.55));
}

.rarity-COMMON { border-color: rgba(255, 255, 255, 0.16); }
.rarity-RARE { border-color: rgba(244, 63, 94, 0.45); }
.rarity-EPIC { border-color: #e11d48; box-shadow: 0 0 18px rgba(225, 29, 72, 0.22); }
.rarity-LEGENDARY { border-color: #ffffff; box-shadow: 0 0 24px rgba(255, 255, 255, 0.3); }

/* Esports HUD Tactical Panels, Smart Inventory & Quick Bet Dock */
.card, .bet-dock, .case-card, .node-card {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 45%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 22px);
}
.modal-backdrop, .modal {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.inv-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(18, 18, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.item-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.item-card:hover { transform: translateY(-2px); }
.item-card:hover .item-thumb { transform: scale(1.08); }
.item-thumb { transition: transform 0.22s ease; }
.item-card.selected-item {
  border-color: #f43f5e !important;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.38), inset 0 0 14px rgba(244, 63, 94, 0.12);
}
input[data-toggle-inv] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #0b0b0e;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
input[data-toggle-inv]:hover {
  border-color: #f43f5e;
}
input[data-toggle-inv]:checked {
  background: #e11d48;
  border-color: #f43f5e;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.55);
}
input[data-toggle-inv]:checked::after {
  content: '✓';
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.rarity-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
}
.rarity-bar-COMMON { background: rgba(255,255,255,0.3); }
.rarity-bar-RARE { background: linear-gradient(90deg, #9ca3af, #ffffff); box-shadow: 0 0 10px rgba(255,255,255,0.4); }
.rarity-bar-EPIC { background: linear-gradient(90deg, #e11d48, #f43f5e); box-shadow: 0 0 12px rgba(244,63,94,0.8); }
.rarity-bar-LEGENDARY { background: linear-gradient(90deg, #ffffff, #f43f5e, #ffffff); box-shadow: 0 0 14px rgba(255,255,255,0.9); }

.quick-inv-dock {
  background: rgba(11, 11, 14, 0.78);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-inv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px 3px;
  max-height: 164px;
  overflow-y: auto;
}
.quick-inv-chip {
  background: #14141b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.quick-inv-chip:hover { border-color: rgba(244,63,94,0.6); transform: translateY(-1px); }
.quick-inv-chip.active {
  border-color: #f43f5e;
  background: rgba(225,29,72,0.14);
  box-shadow: inset 0 0 10px rgba(225,29,72,0.32), 0 0 8px rgba(225,29,72,0.28);
}

@media (max-width: 960px) {
  html, body { max-width: 100vw; overflow-x: hidden; }
  .app-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 84px; max-width: 100vw; overflow-x: hidden; }
  .main-area, .content, .topbar, .live-ticker-bar, .card, .wheel-layout, .double-viewport, .case-roulette-viewport, .table-wrap { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .card, .double-viewport, .case-roulette-viewport { overflow-x: hidden; }
  .content { padding: 10px; }
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .header-brand-cluster { width: 100%; justify-content: space-between; gap: 8px; }
  .upgrade-bait-banner { height: 34px; padding: 0 12px 0 40px; margin-left: 4px; }
  .upgrade-bait-medallion { width: 42px; height: 42px; left: -6px; }
  .upgrade-bait-text { font-size: 11px; }
  .mine-arena { padding: 14px; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 50;
    padding: 6px 8px; border-right: none; border-top: 1px solid var(--border-strong);
    background: rgba(11, 11, 14, 0.96);
    height: auto;
  }
  .nav-list { flex-direction: row; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .nav-item { flex: 0 0 auto; width: auto; min-width: 68px; justify-content: center; padding: 6px 8px; font-size: 10px; white-space: nowrap; }
  .nav-3d-icon-wrap, .nav-3d-icon { width: 38px; height: 38px; }
  .wheel-layout, .stage-hero { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .case-roulette-viewport::before, .case-roulette-viewport::after { width: 34px; }
  .case-card { padding: 14px; }
  .case-win-overlay { padding: 12px; overflow-y: auto; }
  .case-win-modal { padding: 18px 14px 16px; border-radius: 20px; }
  .case-win-showcase { height: 165px; margin: 4px 0 10px; }
  .bet-dock { padding: 14px; gap: 10px; }
  .mult-tile { min-height: 44px; font-size: 13px; touch-action: manipulation; }
  .btn, .nav-item, .case-card, .node-card { touch-action: manipulation; }
  .btn-lg { min-height: 46px; font-size: 15px; }
  .btn-sm { min-height: 40px; }
  #inv-picker-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    max-height: 220px;
  }
}

@keyframes pulseOnline {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}
.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseOnline 1.8s ease-in-out infinite;
}
.balance-flash {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.balance-flash.win {
  color: #34d399 !important;
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.7);
}
