:root {
  --felt: #06361f;
  /* deep casino green */
  --felt-2: #0a2f20;
  --gold: #ffd700;
  --accent: #ff4d4f;
  /* risky red */
  --muted: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.03);
}

/* Black Market mode: much darker gradient and a semi-opaque overlay to darken the scene
   without obscuring UI elements (overlay sits under the .shell container which is z-index:1) */
body.black-market-active {
  background: radial-gradient(circle at 20% 10%, rgba(255, 215, 0, 0.01), transparent 10%), linear-gradient(180deg, #020b07, #020b07);
}

/* The semi-opaque overlay sits above the decorative texture (body::before) but below
   the UI shell (z-index: 1) so only the background darkens */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0; /* same baseline as body::before; painting order places ::after above ::before */
  background: rgba(0,0,0,0); /* start transparent */
  transition: background 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

body.black-market-active::after {
  background: rgba(31, 8, 8, 0.479);
  opacity: 1;
}

/* So the decorative texture doesn't wash out the darker scene, tone it down */
body.black-market-active::before {
  opacity: 0.01; /* almost invisible */
  mix-blend-mode: multiply;
}

html,
body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, system-ui, -apple-system, "Helvetica Neue", Arial
}

body {
  background: radial-gradient(circle at 20% 10%, rgba(255, 215, 0, 0.03), transparent 10%), linear-gradient(180deg, var(--felt), var(--felt-2));
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background 0.5s ease;
}

body::before {
  content: "";
  position: fixed;
  top: -720px;
  left: -640px;
  width: calc(100% + 1280px);
  height: calc(100% + 720px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.02;
  background-image: url("../sprites/background-repeating.png");
  background-repeat: repeat;
  background-size: 1280px 720px;
  animation: noiseMove 120s linear infinite;
  will-change: transform;
  mix-blend-mode: overlay;
}

@keyframes noiseMove {
  0% { transform: translate3d(0, 0, 0); }
  12.5% { transform: translate3d(35px, 90px, 0); }
  25% { transform: translate3d(50px, 180px, 0); }
  37.5% { transform: translate3d(35px, 270px, 0); }
  50% { transform: translate3d(0, 360px, 0); }
  62.5% { transform: translate3d(-35px, 450px, 0); }
  75% { transform: translate3d(-50px, 540px, 0); }
  87.5% { transform: translate3d(-35px, 630px, 0); }
  100% { transform: translate3d(0, 720px, 0); }
}

body.no-background::before {
  display: none;
}

body.no-movement::before {
  animation: none;
}

.version {
  position: fixed;
  top: 8px;
  right: 12px;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.4;
  z-index: 10001;
  pointer-events: none;
  font-weight: 600;
}

.victory-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  animation: fadeIn 0.4s ease-out;
}

.intro-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25000;
  animation: fadeIn 0.5s ease-out;
}

.intro-content {
  background: linear-gradient(180deg, rgba(6, 54, 31, 0.95), rgba(10, 47, 32, 0.95));
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 48px 60px;
  max-width: 550px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2), 0 0 80px rgba(255, 215, 0, 0.15);
  animation: victoryPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.intro-title {
  font-size: 40px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 32px;
}

.intro-subtitle {
  font-size: 18px;
  color: var(--muted);
  opacity: 0.8;
  margin-bottom: 32px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.intro-message {
  font-size: 16px;
  color: var(--muted);
  opacity: 0.9;
  line-height: 1.8;
  margin-bottom: 36px;
}

.intro-message strong {
  color: var(--gold);
  font-weight: 800;
}

.intro-button {
  background: linear-gradient(180deg, #ffd700, #d4a500);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 48px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
  transition: all 0.2s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.intro-button:hover {
  background: linear-gradient(180deg, #ffe44d, #e0b000);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.intro-button:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.victory-content {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(6, 54, 31, 0.95));
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 48px 60px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3), 0 0 100px rgba(255, 215, 0, 0.2);
  animation: victoryPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes victoryPop {
  0% {
    transform: scale(0.5) translateY(100px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.victory-title {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 24px;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.8);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.8);
  }
}

.victory-rank {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.victory-rank-name {
  font-size: 42px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.victory-message {
  font-size: 16px;
  color: var(--muted);
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 32px;
}

.victory-button {
  background: linear-gradient(180deg, #ffd700, #d4a500);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 40px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
  transition: all 0.2s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.victory-button:hover {
  background: linear-gradient(180deg, #ffe44d, #e0b000);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.victory-button:active {
  transform: translateY(0);
}

.shell {
  width: 100%;
  max-width: 920px;
  padding: 28px;
  box-sizing: border-box;
  min-height: auto;
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 22px;
  text-align: center;
}

.title {
  font-weight: 800;
  color: var(--gold);
  font-size: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 13px;
  opacity: .9
}

.center-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.balance {
  font-size: 28px;
  margin-bottom: 14px;
  color: var(--gold);
  font-weight: 700
}

.btn-row {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
}

.btn {
  --size: 150px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  user-select: none;
  box-shadow: 0 12px 30px rgba(2, 8, 12, .65), inset 0 -8px 18px rgba(0, 0, 0, .25);
  transition: transform .15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .15s ease, filter .15s ease;
  position: relative;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 40%, transparent 60%);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.btn::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0.1) 50%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.btn:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 18px 40px rgba(2, 8, 12, .75), inset 0 -8px 18px rgba(0, 0, 0, .25);
  filter: brightness(1.15);
}

.btn:hover::before {
  opacity: 0.8;
}

.btn:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 6px 15px rgba(2, 8, 12, .65), inset 0 -4px 12px rgba(0, 0, 0, .3);
  animation: buttonPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* .btn.active-state was previously used for class-based pulse; now handled via Web Animations API */

.btn.cooldown {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: scale(0.98);
}

@keyframes buttonPop {
  0% { transform: scale(0.95) translateY(0); }
  50% { transform: scale(1.05) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}

.earn {
  background: linear-gradient(180deg, #1db954, #149046);
  color: #fff;
  font-weight: 800
}

.earn:hover {
  background: linear-gradient(180deg, #22d160, #16a450);
}

.work-harder {
  background: linear-gradient(180deg, #ff5722, #e64a19);
  color: #fff;
  font-weight: 800;
}

.work-harder:hover {
  background: linear-gradient(180deg, #ff7043, #f4511e);
}

.gamble {
  background: linear-gradient(180deg, #ffd700, #d4a500);
  color: #ffffff;
  font-weight: 900
}

.gamble:hover {
  background: linear-gradient(180deg, #ffe44d, #e0b000);
  box-shadow: 0 18px 40px rgba(2, 8, 12, .75), inset 0 -16px 36px rgba(0, 0, 0, .5);
}

.soft-gamble {
  background: linear-gradient(180deg, #9c27b0, #7b1fa2);
  color: #fff;
  font-weight: 900
}

.soft-gamble:hover {
  background: linear-gradient(180deg, #ab47bc, #8e24aa);
}

.hard-gamble {
  background: linear-gradient(180deg, #d32f2f, #b71c1c);
  color: #ffffff;
  font-weight: 900
}

.hard-gamble:hover {
  background: linear-gradient(180deg, #e53935, #c62828);
}

/* Confetti-only gamble button (visually distinct pink) */
#confetti-gamble-btn {
  background: linear-gradient(180deg, #ff69b4, #e91e63);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(233, 30, 99, 0.18), inset 0 -8px 18px rgba(0, 0, 0, .15);
}

#confetti-gamble-btn:hover {
  background: linear-gradient(180deg, #ff85c2, #f06292);
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 18px 40px rgba(233, 30, 99, 0.22), inset 0 -12px 26px rgba(0,0,0,0.18);
}

#confetti-gamble-btn:active {
  transform: scale(0.95) translateY(0);
}

.btn .label {
  font-size: 18px
}

.btn .sub {
  font-size: 12px;
  opacity: .95
}

.hint {
  margin-top: 40px;
  font-size: 13px;
  opacity: .85
}

.keybinds-section {
  margin-top: max(40px, 10vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px
}

.keybinds-title {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px
}

.keybinds {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap
}

.keybind {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px
}

.key {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  min-width: 50px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3)
}

.action {
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px
}

.meta-info {
  margin-top: 48px;
  margin-bottom: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.meta-description {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  line-height: 1.5;
  margin: 0;
}

.meta-description a {
  color: #ffd700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.meta-description a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.toast-container {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 10000;
  max-width: 90vw;
  align-items: center;
}

.toast {
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  color: var(--muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  font-weight: 700;
  white-space: nowrap;
}

/* Toast variants for better visual matching (black market / success / warning) */
.toast--bm-red {
  /* translucent glass with red tint so toasts stay consistent with the glassy style */
  background: linear-gradient(135deg, rgba(211,47,47,0.12), rgba(183,28,28,0.06));
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(211,47,47,0.12);
  box-shadow: 0 6px 20px rgba(183,28,28,0.08);
}

.toast--bm-green {
  background: linear-gradient(135deg, rgba(76,175,80,0.14), rgba(46,125,50,0.06));
  backdrop-filter: blur(6px);
  color: #e8f5e9;
  border: 1px solid rgba(76,175,80,0.32); /* stronger visible border */
  box-shadow: 0 8px 26px rgba(46,125,50,0.18), inset 0 1px 0 rgba(255,255,255,0.02);
  /* subtle outline to separate from background when contrast is low */
  outline: 1px solid rgba(0,0,0,0.06);
}

.toast--bm-orange {
  background: linear-gradient(135deg, rgba(255,152,0,0.12), rgba(239,108,0,0.05));
  backdrop-filter: blur(6px);
  color: #fff8e1;
  border: 1px solid rgba(255,152,0,0.10);
  box-shadow: 0 6px 20px rgba(239,108,0,0.06);
}

.toast--soft {
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(6px);
  color: var(--muted);
}

.active-events-container {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
  z-index: 9999;
  max-width: 300px;
}

.active-event-badge {
  padding: 12px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(91, 163, 255, 0.2), rgba(91, 163, 255, 0.1));
  border: 1px solid rgba(91, 163, 255, 0.4);
  color: #5ba3ff;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(91, 163, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: slideInLeft 0.3s ease-out;
  transition: opacity 0.5s ease-out;
}

.active-event-badge.fade-out {
  opacity: 0;
}

/* Active Black Market badges (top-right) */
.active-bm-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
  z-index: 9999;
  max-width: 320px;
  align-items: flex-end;
}

.active-bm-badge {
  padding: 12px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,82,82,0.18), rgba(255,82,82,0.08));
  border: 1px solid rgba(255,82,82,0.28);
  color: #ff5252;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(255,82,82,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
  transition: opacity 0.5s ease-out, transform 0.2s ease-out;
}

.active-bm-badge.fade-out { opacity: 0; }

.active-bm-badge.ending {
  animation: pulse 0.5s ease-in-out;
  border-color: rgba(255,100,100,0.6);
  background: linear-gradient(135deg, rgba(255,100,100,0.2), rgba(255,100,100,0.1));
  color: #ff6464;
}

.active-bm-time {
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

@keyframes slideInRight {
  from { transform: translateX(320px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.active-event-badge.ending {
  animation: pulse 0.5s ease-in-out;
  border-color: rgba(255, 100, 100, 0.6);
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(255, 100, 100, 0.1));
  color: #ff6464;
}

.active-event-time {
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-320px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.progress-bar-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4)
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  flex-wrap: wrap
}

.current-rank {
  color: var(--gold);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.next-rank {
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right
}

.progress-bar-bg {
  height: 22px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  position: relative
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.3));
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px
}

.progress-bar-current {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffed4e);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px
}

.progress-handle {
  font-size: 11px;
  font-weight: 800;
  color: #e7e7e7;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8)
}

/* Tabs + Shop grid */
.tabs{display:flex;gap:10px;margin:10px 0 16px;flex-wrap:wrap;align-items:center;}
.tab-button{
  background:transparent;
  border:1px solid rgba(255,255,255,0.06);
  color:var(--muted);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
  transition: all 0.2s ease;
}
.tab-button:hover:not(.active) {
  border-color: rgba(255,215,0,0.12);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.tab-button:active {
  animation: jiggle 0.3s ease;
}
.tab-button.active{
  background:linear-gradient(90deg, rgba(255,215,0,0.08), rgba(255,215,0,0.02));
  color:var(--gold);
  border-color:rgba(255,215,0,0.18);
  box-shadow: 0 0 12px rgba(255,215,0,0.15);
  transform: translateY(-1px) scale(1.15);
  animation: jiggle 0.3s ease;
}
/* Responsive tweaks: reduce padding and allow smaller buttons on narrow screens */
@media (max-width: 420px) {
  .tabs { gap: 8px; }
  .tab-button { padding: 6px 8px; font-size: 13px; }
}
@keyframes jiggle {
  0%, 100% { transform: translateY(-1px) scale(1.15) rotate(0deg); }
  25% { transform: translateY(-1px) scale(1.15) rotate(-2deg); }
  75% { transform: translateY(-1px) scale(1.15) rotate(2deg); }
}
.tab-content{display:none;min-height:0}
.tab-content.active{display:block}

/* Casino-specific button row spacing: target the main button row only */
#casino > .btn-row:first-of-type {
  margin-top: 28px;
  margin-bottom: 24px;
}

.shop-controls {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Allow the sort-controls area to take remaining space inside shop-controls
  and make inner toggle expand horizontally instead of using margin hacks */
.shop-controls .sort-controls { flex: 1 1 auto; align-items: center; }
.shop-controls .sort-controls .shop-toggle { display:flex; align-items:center; gap:12px; width:100%; justify-content:flex-start; }
/* Place Sort label + select on the left, push Reverse label+switch to the right */
.shop-controls .sort-controls .shop-toggle > label[for="sort-type"],
.shop-controls .sort-controls .shop-toggle > select {
  order: 0; /* left group */
}
.shop-controls .sort-controls .shop-toggle > label[for="sort-reverse"],
.shop-controls .sort-controls .shop-toggle > .switch {
  order: 1; /* right group */
  margin-left: auto; /* push this group to the far right */
}
.shop-controls .sort-controls .shop-toggle > select { margin-left: 8px; }

.sort-controls label {
  font-weight: 600;
  color: #ffd700;
  margin: 0;
}

.sort-controls select {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-controls select:hover {
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(0, 0, 0, 0.5);
}

.sort-controls select:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.sort-controls select option {
  background: #1a1a1a;
  color: #fff;
}



.reverse-control {
  display: flex;
  align-items: center;
  gap: 8px;
}



/* Shop toggle override */
.shop-toggle {
  margin-bottom: 0 !important;
  gap: 12px;
}

.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:10px}
.upgrade-card{
  background:linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding:16px;
  border-radius:12px;
  border:1px solid rgba(255,215,0,0.15);
  box-shadow:0 4px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,0.05);
  display:flex;
  flex-direction:column;
  gap:10px;
  transition:all 0.3s ease;
  position:relative;
  overflow:hidden;
}
.upgrade-card::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:2px;
  background:linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity:0.3;
}

/* Add a subtle solid overlay to mask background texture under cards to
   prevent decorative background from briefly showing through during
   animations or layer compositing. Keep very low opacity to preserve look. */
.upgrade-card::after{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(0,0,0,0.10);
  pointer-events: none;
  z-index: 0;
}

/* Ensure card children render above the overlay */
.upgrade-card > * {
  position: relative;
  z-index: 1;
}
.upgrade-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,215,0,0.3);
  box-shadow:0 6px 24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

.upgrade-card.maxed-out {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.15), rgba(0, 0, 0, 0.4));
  border-color: rgba(184, 134, 11, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.upgrade-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:2px;
}
.upgrade-title{
  font-weight:800;
  color:var(--gold);
  font-size:15px;
  text-shadow:0 2px 4px rgba(0,0,0,0.3);
  letter-spacing:0.3px;
  flex:1;
}
.upgrade-description{
  font-size:12px;
  opacity:0.8;
  line-height:1.5;
  margin-bottom:6px;
  color:rgba(255,255,255,0.9);
}
.upgrade-stats{
  display:flex;
  flex-direction:column;
  gap:6px;
  background:rgba(0,0,0,0.2);
  padding:10px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.05);
}
.stat-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
}
.stat-label{
  color:rgba(255,255,255,0.6);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.level-badge{
  background:linear-gradient(135deg, rgba(30,144,255,0.3), rgba(30,144,255,0.15));
  padding:4px 10px;
  border-radius:12px;
  font-weight:700;
  font-size:10px;
  border:1px solid rgba(30,144,255,0.3);
  color:#fff;
  white-space:nowrap;
  flex-shrink:0;
}
.level-badge.maxed{
  background:linear-gradient(135deg, rgba(255,215,0,0.35), rgba(255,215,0,0.2));
  border-color:rgba(255,215,0,0.5);
  color:var(--gold);
  font-weight:800;
}
.price-value{
  font-weight:700;
  color:#ff6b6b;
  font-size:12px;
  white-space:nowrap;
}
.price-value.affordable{
  color:#4CAF50;
}
.price-value.maxed{
  color:var(--gold);
}
.unlock-row{
  background:rgba(255,140,0,0.2);
  padding:8px;
  margin:-4px;
  border-radius:4px;
  border:1px solid rgba(255,140,0,0.4);
}
.unlock-row .stat-label{
  color:rgba(255,200,150,1);
  font-weight:700;
}
.unlock-value{
  font-weight:700;
  color:#FFD700;
  font-size:12px;
  text-shadow:0 1px 2px rgba(0,0,0,0.5);
}
.upgrade-locked-info{
  background:rgba(255,140,0,0.2);
  border:1px solid rgba(255,140,0,0.4);
  border-radius:8px;
  padding:12px;
  font-size:12px;
  color:#FFD700;
  text-align:center;
  font-weight:700;
  margin-top:auto;
  text-shadow:0 1px 2px rgba(0,0,0,0.5);
}
.unlock-info{
  background:rgba(255,77,79,0.15);
  border:1px solid rgba(255,77,79,0.3);
  border-radius:6px;
  padding:8px 10px;
  font-size:11px;
  color:rgba(255,200,200,0.9);
  text-align:center;
  font-weight:600;
}
.upgrade-actions{display:flex;gap:6px;margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.08)}
.buy-btn{
  flex:1;
  padding:10px 8px;
  border-radius:8px;
  border:0;
  cursor:pointer;
  font-weight:700;
  white-space:nowrap;
  font-size:11px;
  transition:all 0.2s ease;
  box-shadow:0 2px 6px rgba(0,0,0,0.3);
  will-change:transform, filter;
}
.buy-btn:hover:not(.locked){
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(0,0,0,0.4);
  filter: brightness(1.15);
}
.buy-btn:active:not(.locked){
  transform:translateY(0);
}
.buy-btn.shaking {
  animation: buttonShake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes buttonShake {
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-2deg); }
  20%, 80% { transform: translate3d(3px, 0, 0) rotate(3deg); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-5deg); }
  40%, 60% { transform: translate3d(6px, 0, 0) rotate(5deg); }
}
.buy-1{background:linear-gradient(135deg, #4CAF50, #388E3C);color:white;text-shadow:0 1px 2px rgba(0,0,0,0.3)}
.buy-5{background:linear-gradient(135deg, #2196F3, #1565C0);color:white;text-shadow:0 1px 2px rgba(0,0,0,0.3)}
.buy-max{background:linear-gradient(135deg, #ffd700, #ff8c00);color:#ffffff;border:1px solid rgba(255,215,0,0.4);text-shadow:0 1px 2px rgba(0,0,0,0.3);font-weight:800}
.locked{opacity:.4;filter:grayscale(.8);cursor:not-allowed;transform:none!important}

.disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.05)
}

.options-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.options-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.option-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  margin-bottom: 20px;
}

.option-section h3 {
  margin-top: 0;
}

.option-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.option-description {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 16px;
}

.option-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--gold), #d4a500);
  color: var(--felt);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255,215,0,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,215,0,0.4);
  background: linear-gradient(135deg, #ffe44d, #e0b000);
}

.option-btn:active {
  transform: translateY(0);
}

/* Danger Zone */
.danger-zone {
  border: 1px solid rgba(255, 80, 60, 0.3);
  background: rgba(255, 80, 60, 0.05);
}

.danger-zone h3 {
  color: #ff503c;
}

.option-btn.danger {
  background: rgba(255, 80, 60, 0.2);
  border: 1px solid rgba(255, 80, 60, 0.5);
  color: #ff503c;
}

.option-btn.danger:hover {
  background: rgba(255, 80, 60, 0.4);
  border-color: #ff503c;
}

.reset-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ff4d4f, #d32f2f);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255,77,79,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,77,79,0.5);
  background: linear-gradient(135deg, #ff6b6b, #f44336);
}

.reset-btn:active {
  transform: translateY(0);
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: particle-burst 0.8s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.3);
  }
}

/* Options Sliders */
.slider-container {
  margin-bottom: 16px;
}

.slider-container label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  transition: transform 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.advanced-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.advanced-slider-row label {
  flex: 0 0 90px;
  font-size: 13px;
  margin: 0;
  text-align: right;
  color: rgba(255, 255, 255, 0.8);
}

.advanced-slider-row input {
  flex: 1;
  margin: 0;
}

.advanced-slider-row .val-display {
  flex: 0 0 36px;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.format-preview-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
  list-style: disc;
}

.format-preview-list li {
  margin: 0 0 4px 0;
}

.toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* When toggle has a preview, stack the preview under the controls while keeping label + input on same row */
.toggle-container.has-preview {
  flex-direction: column;
  align-items: flex-start;
}

.toggle-main {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.toggle-main select { margin-left: auto; }

.toggle-container label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--gold);
  border-color: var(--gold);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--gold);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #fff;
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

@media(max-width:560px) {
  .btn {
    --size: 120px
  }

  .btn-row {
    gap: 14px;
    /* Remove global margin here, will use #casino scoped rule */
  }

  .balance {
    padding-top: 6px;
    font-size: 20px
  }

  body {
    align-items: flex-start;
    padding: 10px 0;
  }

  .shell {
    padding: 16px;
  }
}

@media(max-width:560px) {
  #casino > .btn-row:first-of-type {
    margin-top: 12px;
  }
}

/* Reset Modal */
.reset-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  animation: fadeIn 0.3s ease-out;
}

.reset-content {
  background: linear-gradient(135deg, #2a0e0e, #1a0505);
  border: 2px solid #ff503c;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 80, 60, 0.3);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reset-title {
  font-size: 24px;
  font-weight: 900;
  color: #ff503c;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.reset-message {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 24px;
}

.reset-message strong {
  color: #ff503c;
  font-weight: 700;
}

.reset-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.reset-button {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-transform: uppercase;
}

.reset-button.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.reset-button.cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.reset-button.confirm {
  background: #ff503c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 80, 60, 0.4);
}

.reset-button.confirm:hover {
  background: #ff6b5b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 80, 60, 0.5);
}

/* Event Modal */
.event-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 22000;
  animation: fadeIn 0.3s ease-out;
}

.event-content {
  background: linear-gradient(135deg, rgba(10, 50, 120, 0.95), rgba(20, 40, 100, 0.95));
  border: 2px solid #5ba3ff;
  border-radius: 16px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(91, 163, 255, 0.3), 0 0 80px rgba(91, 163, 255, 0.15);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-title {
  font-size: 28px;
  font-weight: 900;
  color: #5ba3ff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(91, 163, 255, 0.4);
}

.event-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: 24px;
}

.event-description strong {
  color: #5ba3ff;
  font-weight: 700;
}

.event-timer {
  font-size: 14px;
  color: rgba(91, 163, 255, 0.8);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 20px;
}

.event-button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.event-close-btn {
  background: #5ba3ff;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(91, 163, 255, 0.3);
}

.event-close-btn:hover {
  background: #7bb8ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(91, 163, 255, 0.4);
}

.event-close-btn:active {
  transform: translateY(0);
}

.event-modal.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Info Tab Version and Title Tweaks */
#info .option-section h2 {
  margin-top: 0.75em !important;
}
#info .version-display {
  margin-bottom: 0 !important;
}

@keyframes workPulseAnim {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.balance.work-pulse {
  animation: workPulseAnim 0.15s ease-out;
}

@keyframes gambleWinAnim {
  0% { transform: scale(1) rotate(0deg); color: var(--gold); text-shadow: none; }
  15% { transform: scale(1.3) rotate(-5deg); color: var(--gold); text-shadow: 0 0 25px var(--gold); }
  30% { transform: scale(1.3) rotate(5deg); color: var(--gold); text-shadow: 0 0 20px var(--gold); }
  50% { transform: scale(1.2) rotate(-3deg); color: var(--gold); text-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
  85% { transform: scale(1.05) rotate(1deg); color: var(--gold); text-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
  100% { transform: scale(1) rotate(0deg); color: var(--gold); text-shadow: none; }
}

.balance.gamble-win {
  animation: gambleWinAnim 1.5s ease-out;
}

/* Mirror balance animations for the floating HUD so it visually matches */
.floating-balance .value.work-pulse {
  animation: workPulseAnim 0.15s ease-out;
}

.floating-balance .value.gamble-win {
  animation: gambleWinAnim 1.5s ease-out;
}

/* Black Market Styles */
.bm-card {
  border: 1px solid rgba(255, 82, 82, 0.3);
  background: linear-gradient(145deg, rgba(40, 10, 10, 0.6), rgba(20, 5, 5, 0.8));
}

.bm-card:hover {
  border-color: rgba(255, 82, 82, 0.6);
  box-shadow: 0 4px 20px rgba(255, 82, 82, 0.15);
}

.bm-card .upgrade-title {
  color: #ff5252;
}

.bm-card.out-of-stock:not(.bm-active) {
  opacity: 0.6;
  filter: grayscale(0.8);
}

.bm-card.out-of-stock button {
  background: #333;
  color: #888;
  cursor: not-allowed;
}

.buff-active {
  font-size: 12px;
  text-align: center;
  margin: 8px 0;
  padding: 4px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.black-market-header h2 {
  color: #ff5252;
  text-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
}

.black-market-header p {
  color: #aaa;
  font-style: italic;
}


/* Black Market Button Styles */
.bm-buy-btn {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #ffcdd2;
  border: 1px solid rgba(255, 82, 82, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bm-buy-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
  border-color: rgba(255, 82, 82, 0.5);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
  transform: translateY(-1px);
}

.bm-buy-btn:active:not(:disabled) {
  transform: translateY(0);
}

.bm-buy-btn:disabled {
  background: #2a2a2a;
  color: #555;
  border-color: transparent;
  cursor: not-allowed;
  box-shadow: none;
}

/* Active state for black market button - uses same button but indicates ACTIVE */
.bm-buy-btn.active {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: #fff;
  border-color: rgba(76, 175, 80, 0.2);
  box-shadow: 0 6px 14px rgba(76, 175, 80, 0.25);
}

/* Fix for shaking cards */
.bm-card:hover {
  transform: none !important; /* Override default upgrade-card hover movement */
}

/* Active black market item - red glow */
.bm-card.bm-active {
  opacity: 1;
  filter: none;
  border-color: rgba(255, 82, 82, 0.8);
  box-shadow: 0 0 20px rgba(255, 82, 82, 0.5), 0 0 40px rgba(255, 82, 82, 0.3);
}

