:root {
  --bbxs-header-height: 64px;
  color-scheme: dark;
  --bg: #100f14;
  --bg-main: #141319;
  --bg-panel: #18171d;
  --bg-raised: #1e1d25;
  --bg-soft: #25232c;
  --line: #24222b;
  --line-strong: #33303b;
  --text: #ffffff;
  --muted: #8d8b99;
  --muted-2: #666373;
  --orange: #ffae4f;
  --orange-2: #ff9d28;
  --yellow: #ffcc4f;
  --danger: #ff4c4c;
  --success: #f2f2f2;
  --unique: #ffcc4f;
  --strange: #ffae4f;
  --vintage: #48b3ff;
  --collector: #ff484b;
  --unusual: #ff48e7;
  --haunted: #38f3ab;
  --genuine: #4d7455;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 174, 79, 0.05), transparent 38%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.bbxs-site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  min-height: var(--bbxs-header-height);
  border-bottom: 1px solid #212026;
  background: rgba(15, 14, 18, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

.bbxs-header-inner {
  display: flex;
  min-height: var(--bbxs-header-height);
  align-items: center;
  gap: 24px;
  padding: 0 18px;
}

.bbxs-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.bbxs-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: skewX(-8deg);
  border: 1px solid rgba(255, 174, 79, 0.65);
  border-radius: 10px 4px 10px 4px;
  background: linear-gradient(145deg, #ffbf54, #e98119);
  box-shadow: 0 0 24px rgba(255, 174, 79, 0.18);
  color: #171117;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.bbxs-brand-copy {
  display: grid;
  gap: 1px;
}

.bbxs-brand-copy strong {
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0.075em;
  line-height: 1;
}

.bbxs-brand-copy small {
  color: #68666f;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.25em;
}

.bbxs-nav {
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.bbxs-nav::-webkit-scrollbar {
  display: none;
}

.bbxs-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 17px;
  color: #777581;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.bbxs-nav a:hover,
.bbxs-nav a:focus-visible {
  color: #c8c7cb;
  background: rgba(255, 255, 255, 0.025);
  outline: none;
}

.bbxs-nav a.bbxs-is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 174, 79, 0.1), transparent);
}

.bbxs-nav a.bbxs-is-active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: #ffae4f;
  box-shadow: 0 0 14px rgba(255, 174, 79, 0.5);
}

.bbxs-nav a span {
  color: #ffae4f;
  font-size: 17px;
}

bbxs-account-hub {
  display: inline-flex;
  flex: 0 0 auto;
}

.upgrader-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 10px;
  min-height: calc(100dvh - var(--bbxs-header-height));
  padding: 14px 14px 0 32px;
}

.upgrader-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding-bottom: 14px;
}

.top-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 180px minmax(300px, 1fr);
  align-items: center;
  min-height: 252px;
}

.selection-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 238px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 174, 79, 0.08), transparent 25%),
    var(--bg-panel);
}

.selection-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  background: url("upgraderitembg.svg") center / 282px 282px no-repeat;
  opacity: 0.48;
  pointer-events: none;
}

.deposit-panel {
  border-radius: 28px 78px 78px 28px;
  padding-right: 84px;
}

.target-panel {
  border-radius: 78px 28px 28px 78px;
  padding-left: 84px;
}

.wheel-card {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  height: 262px;
  margin-inline: -42px;
}

.wheel-shell {
  --arrow-radius: 112px;
  position: relative;
  width: 262px;
  height: 262px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 42%),
    #17161c;
  box-shadow:
    inset 0 0 0 10px #1d1c23,
    0 0 0 9px #111016,
    0 24px 80px rgba(0, 0, 0, 0.34);
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}

.wheel-shell:active {
  cursor: grabbing;
}

.wheel-glow {
  position: absolute;
  inset: 55px;
  border-radius: 50%;
  background: #343434;
  opacity: 0.5;
  filter: blur(42px);
}

.chance-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chance-ring circle {
  fill: transparent;
  stroke-width: 10;
}

.ring-track {
  stroke: #24232b;
}

.ring-progress {
  stroke: var(--orange);
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    stroke-dashoffset 0.18s ease,
    transform 0.18s ease,
    stroke 0.18s ease;
}

.wheel-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: translate(-50%, -112px) rotate(-90deg);
  transform-origin: 50% 127px;
  filter: drop-shadow(0 5px 9px rgba(255, 255, 255, 0.38));
  will-change: transform;
}

.chance-readout {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
}

.chance-readout strong {
  color: var(--orange);
  font-size: 30px;
  line-height: 1.1;
}

.chance-readout span {
  color: #c9c8d2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chance-readout small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.fast-mode {
  margin-top: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}

.fast-mode.is-on {
  color: #38f3ab;
  background: rgba(32, 185, 121, 0.14);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(56, 243, 171, 0.28), 0 0 18px rgba(56, 243, 171, 0.38);
  text-shadow: 0 0 18px rgba(56, 243, 171, 0.75);
}

.panel-stat {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-stat-left {
  bottom: 24px;
  left: 30px;
}

.panel-stat-right {
  right: 30px;
  bottom: 22px;
}

.deposit-panel .panel-stat-right {
  right: 78px;
}

.target-panel .panel-stat-left {
  left: 72px;
}

.muted {
  color: #8e8ba0;
  font-size: 13px;
  font-weight: 800;
}

.panel-stat strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.panel-stat-left strong {
  color: var(--orange);
}

.coin-dot {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffc465, #ff9d2c);
  box-shadow: inset 0 0 0 2px rgba(255, 233, 173, 0.2);
  vertical-align: middle;
}

.coin-dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #4b2b0c;
}

.soft-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 0 13px;
  border-radius: 10px;
  background: #27262f;
  color: #a5a2b4;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.soft-action:hover:not(:disabled) {
  background: #302e39;
  color: #dedce8;
}

.soft-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.soft-action img {
  width: 17px;
  height: 17px;
}

.remove-selected {
  position: absolute;
  top: 22px;
  z-index: 3;
  min-height: 36px;
  padding-inline: 10px;
}

.deposit-panel .remove-selected {
  right: 52px;
}

.target-panel .remove-selected {
  right: 30px;
}

.selected-items {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: min(72%, 460px);
  min-height: 118px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.selected-mini {
  position: relative;
  width: 82px;
  height: 94px;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rarity) 34%, transparent), transparent 58%),
    rgba(39, 37, 47, 0.72);
  border: 1px solid var(--rarity);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity) 34%, transparent),
    0 0 28px color-mix(in srgb, var(--rarity) 42%, transparent),
    0 14px 40px rgba(0, 0, 0, 0.22);
}

.selected-mini::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--rarity);
  opacity: 0.24;
  filter: blur(18px);
}
.selected-mini img {
  position: absolute;
  z-index: 1;
  inset: 14px 10px 24px;
  width: calc(100% - 20px);
  height: 52px;
  object-fit: contain;
}

.selected-mini span {
  position: absolute;
  z-index: 1;
  right: 6px;
  bottom: 6px;
  left: 6px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(280px, 1fr);
  gap: 14px;
  min-height: 52px;
}

.balance-button,
.side-select,
.upgrade-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 13px;
  font-weight: 900;
  cursor: pointer;
}

.balance-button {
  background: #18171d;
  color: #fff;
}

.balance-button.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 174, 79, 0.5);
}


.balance-control {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(260px, 1fr);
  gap: 10px;
  min-width: 0;
}

.balance-amount {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #15141a;
  color: #fff;
  font-weight: 900;
}

.balance-amount:focus {
  border-color: rgba(255, 174, 79, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 174, 79, 0.13);
}

.balance-button:disabled,
.balance-amount:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.side-buttons {
  display: flex;
  gap: 14px;
}

.side-select {
  position: relative;
  min-width: 106px;
  overflow: hidden;
  background: #1e1d24;
  color: #c9c7d2;
}

.side-select img {
  width: 18px;
  height: 18px;
}

.side-select.is-selected {
  background-image: linear-gradient(270deg, rgba(0, 0, 0, 0) 20%, rgba(255, 174, 79, 1));
  border: 1px solid #ffa048;
  color: #fff;
}

.side-select.is-selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background-image: linear-gradient(270deg, rgb(11, 11, 11, 0.62), rgba(10, 10, 10, 0.86));
  animation: fadeInScale 0.5s ease forwards;
}

.side-select > * {
  position: relative;
  z-index: 1;
}

.upgrade-button {
  background: linear-gradient(180deg, #ffbd65, #ffa437);
  color: #141215;
  box-shadow:
    inset 0 0 0 1px rgba(255, 218, 126, 0.6),
    0 12px 30px rgba(255, 156, 43, 0.14);
}

.upgrade-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.58;
}

.upgrade-button img {
  width: 18px;
  height: 18px;
}

.lists-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  gap: 16px;
  min-height: 350px;
}

.list-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-panel);
}

.list-header {
  display: grid;
  grid-template-columns: auto minmax(120px, 260px) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 11px 12px 10px;
  background: var(--bg-panel);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 105px;
}

.panel-title img {
  width: 20px;
  height: 20px;
}

.panel-title h2,
.hot-wins h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 38px;
  border: 1px solid #25232b;
  border-radius: 10px;
  background: #15141a;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 35px 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dfdde9;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #676474;
}

.search-box img {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0;
  background: transparent;
  color: #b4b1bf;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.sort-button img {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.sort-button.is-asc img {
  transform: rotate(180deg);
}

.list-body {
  height: min(48dvh, 455px);
  min-height: 300px;
  overflow-y: auto;
  padding: 14px 12px;
  scrollbar-color: #2c2a32 transparent;
  scrollbar-width: thin;
}

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

.item-card {
  --rarity: var(--unique);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 118px;
  overflow: hidden;
  padding: 8px 8px 9px;
  border: 1px solid color-mix(in srgb, var(--rarity) 58%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--rarity) 20%, transparent), transparent 45%),
    rgba(39, 37, 47, 0.7);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.item-card::before {
  content: "";
  position: absolute;
  top: -64px;
  left: 50%;
  width: 94px;
  height: 94px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--rarity);
  opacity: 0.14;
  filter: blur(30px);
}

.item-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--rarity);
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.item-card.is-selected {
  border-color: var(--rarity);
  box-shadow:
    0 0 0 1px var(--rarity),
    0 0 30px color-mix(in srgb, var(--rarity) 45%, transparent),
    inset 0 0 26px color-mix(in srgb, var(--rarity) 16%, transparent),
    0 12px 35px rgba(0, 0, 0, 0.28);
}
.item-card.is-locked {
  pointer-events: none;
  opacity: 0.65;
}

.item-card .upgrader-item-bg {
  position: absolute;
  top: 47%;
  left: 50%;
  width: 92px;
  height: 64px;
  opacity: 0.32;
  filter: blur(30px);
  background: var(--rarity);
  transform: translate(-50%, -50%);
}

.item-card img.item-art {
  position: absolute;
  top: 15px;
  left: 50%;
  z-index: 1;
  width: 68px;
  height: 58px;
  object-fit: contain;
  transform: translateX(-50%);
}

.item-name,
.item-price {
  position: relative;
  z-index: 2;
  min-width: 0;
  text-align: left;
}

.item-name {
  display: -webkit-box;
  min-height: 26px;
  overflow: hidden;
  color: #b4adbb;
  font-size: 11px;
  font-weight: 800;
  line-height: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.item-price .coin-dot {
  width: 11px;
  height: 11px;
}

.item-price .coin-dot::after {
  inset: 4px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  gap: 18px;
  padding: 35px 22px 20px;
  text-align: center;
}

.empty-bag {
  position: relative;
  width: 86px;
  height: 86px;
  opacity: 0.72;
}

.empty-bag::before,
.empty-bag::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2930;
}

.empty-bag::before {
  top: 20px;
  width: 66px;
  height: 70px;
  border-radius: 12px;
}

.empty-bag::after {
  top: 10px;
  width: 28px;
  height: 22px;
  border: 5px solid #2a2930;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
}

.empty-bag span {
  position: absolute;
  right: 20px;
  bottom: 17px;
  left: 20px;
  z-index: 1;
  height: 14px;
  border-radius: 3px;
  background: #17161c;
}

.empty-state p {
  margin: 0;
  color: #8f8ca0;
  font-size: 13px;
  font-weight: 800;
}

.deposit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(100%, 542px);
  min-height: 41px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffbd65, #ffa437);
  color: #17120f;
  font-weight: 900;
  cursor: pointer;
}

.deposit-button img {
  width: 18px;
  height: 18px;
}

.hot-wins {
  min-width: 0;
  height: calc(100dvh - var(--bbxs-header-height));
  overflow: auto;
  padding: 14px 16px 24px;
  border-left: 1px solid #1e1d22;
  background: #121117;
}

.hot-wins header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 12px;
}

.hot-wins header img {
  width: 22px;
  height: 22px;
}

.wins-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.win-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 10px;
  align-items: center;
}

.winner {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.winner img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: #27262f;
}

.winner strong,
.winner span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner strong {
  color: #fff;
  font-size: 12px;
}

.winner span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.win-profit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.win-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mini-win-card {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--rarity) 70%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rarity) 19%, transparent), transparent 46%),
    #201b1b;
}

.mini-win-card img {
  display: block;
  width: 70px;
  height: 54px;
  margin: 6px auto 12px;
  object-fit: contain;
}

.mini-win-card strong,
.mini-win-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-win-card strong {
  color: #fff;
  font-size: 12px;
}

.mini-win-card span {
  color: #a8a4b6;
  font-size: 11px;
}

.result-toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(360px, calc(100vw - 28px));
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(24, 23, 29, 0.96);
  border: 1px solid #2a2932;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, -120%);
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
}

.result-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.result-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, 100%);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.result-toast.hidden {
  display: none;
}

.result-toast::before {
  content: "";
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #201f25;
}

.result-toast.is-win::before {
  box-shadow: 0 -1px 38.2px 0 rgba(221, 221, 221, 0.52);
}

.result-toast.is-loss::before {
  box-shadow: 0 -1px 38.2px 0 rgba(255, 48, 48, 0.52);
}

.result-toast strong {
  display: block;
  font-size: 15px;
}

.result-toast span {
  display: block;
  margin-top: 3px;
  color: #a8a4b6;
  font-size: 12px;
  font-weight: 800;
}

.unique-upg-bg { background: rgba(255, 204, 79, 0.1); }
.unique-upg-border { border: 1px solid rgba(255, 204, 79, 1); }
.strange-upg-bg { background: rgba(255, 174, 79, 0.1); }
.strange-upg-border { border: 1px solid rgba(255, 174, 79, 1); }
.vintage-upg-bg { background: rgba(72, 179, 255, 0.1); }
.vintage-upg-border { border: 1px solid rgba(72, 179, 255, 1); }
.collector-upg-bg { background: rgba(255, 72, 75, 0.1); }
.collector-upg-border { border: 1px solid rgba(255, 72, 75, 1); }
.unusual-upg-bg { background: rgba(255, 72, 231, 0.1); }
.unusual-upg-border { border: 1px solid rgba(255, 72, 231, 1); }
.haunted-upg-bg { background: rgba(56, 243, 171, 0.1); }
.haunted-upg-border { border: 1px solid rgba(56, 243, 171, 1); }
.genuine-upg-bg { background: rgba(77, 116, 85, 0.1); }
.genuine-upg-border { border: 1px solid rgba(77, 116, 85, 1); }

.upgrader-item-bg {
  position: absolute;
  width: 149px;
  height: 100px;
  opacity: 0.3;
  filter: blur(40px);
  background: var(--unique);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.side-select-bg {
  background-image: linear-gradient(270deg, rgba(0, 0, 0, 0) 20%, rgba(255, 174, 79, 1));
  border: 1px solid #ffa048;
}

.side-select-bg-effect {
  height: 100%;
  width: 100%;
  background-image: linear-gradient(270deg, rgb(11, 11, 11, 0.6), rgba(10, 10, 10, 0.85));
  position: absolute;
  z-index: 0;
  top: 0;
  border-radius: 16px;
  animation: fadeInScale 0.5s ease forwards;
}

.rotate-icon {
  transition: transform 0.3s ease-in-out;
}

.side-select {
  transition:
    transform 0.5s ease,
    background-color 0.5s ease,
    border-color 0.5s ease;
}

.reserve-text {
  transition:
    opacity 0.5s ease-out,
    visibility 0.5s ease-out;
  opacity: 0;
  visibility: hidden;
}

.reserve-fade-in { opacity: 1; visibility: visible; }
.reserve-fade-out { opacity: 0; visibility: hidden; }

.slide-from-top-enter { transform: translateY(-100%); opacity: 0; }
.slide-from-top-enter-active { transition: transform 0.5s ease-out, opacity 0.5s ease-out; }
.slide-from-top-enter-active,
.slide-from-top-exit { transform: translateY(0); opacity: 1; }
.slide-from-top-exit-active {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

.slider {
  -webkit-appearance: none !important;
  height: 6px;
  outline: none;
  border: none;
  opacity: 1;
  transition: opacity 0.2s;
  border-radius: 18px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 20px;
  background: #fff;
  border-radius: 29px;
  cursor: pointer;
}

.slider-funding {
  -webkit-appearance: none !important;
  height: 8px;
  outline: none;
  border: none;
  opacity: 1;
  transition: opacity 0.2s;
  border-radius: 10px;
}

.slider-funding::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 100%;
  cursor: pointer;
}

.tick {
  position: absolute;
  width: 1px;
  height: 4px;
  background: #201f25;
}

.shadow {
  position: relative;
  width: 46px;
  height: 46px;
  z-index: 10;
}

.shadow::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  border-radius: 50%;
}

.red-shadow::before { box-shadow: 0 -1px 38.2px 0 rgba(255, 48, 48, 0.52); }
.black-shadow::before { box-shadow: 0 -1px 38.2px 0 rgba(221, 221, 221, 0.52); }

@keyframes fadeInScale {
  0% {
    opacity: 0.7;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatItem {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.floating-item {
  animation: floatItem 2.5s ease-in-out infinite;
}

@keyframes floatEffect {
  0%,
  100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-6px); }
}

.floating-effect {
  animation: floatEffect 2.5s ease-in-out infinite;
}

@media (max-width: 1440px) {
  .bbxs-header-inner {
    gap: 10px;
  }

  .bbxs-nav a {
    padding-inline: 10px;
    font-size: 10px;
  }

  .upgrader-page {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .list-header {
    grid-template-columns: minmax(115px, auto) minmax(120px, 1fr) auto;
  }
}

@media (max-width: 1180px) {
  .upgrader-page {
    grid-template-columns: 1fr;
    padding-right: 12px;
  }

  .hot-wins {
    height: auto;
    border-left: 0;
    border-top: 1px solid #1e1d22;
  }

  .wins-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }
}

@media (max-width: 980px) {
  .top-board {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wheel-card {
    order: -1;
    height: 196px;
    margin: 0;
  }

  .wheel-shell {
    --arrow-radius: 68px;
    width: 160px;
    height: 160px;
    box-shadow:
      inset 0 0 0 7px #1d1c23,
      0 0 0 7px #111016,
      0 18px 50px rgba(0, 0, 0, 0.34);
  }

  .wheel-arrow {
    width: 23px;
    height: 23px;
    transform-origin: 50% 80px;
  }

  .chance-readout strong {
    font-size: 24px;
  }

  .chance-readout span,
  .fast-mode {
    font-size: 10px;
  }

  .fast-mode {
    margin-top: 12px;
  }

  .selection-panel,
  .deposit-panel,
  .target-panel {
    min-height: 180px;
    padding: 0;
    border-radius: 20px;
  }

  .target-panel .panel-stat-left {
    left: 30px;
  }

  .control-row,
  .lists-grid {
    grid-template-columns: 1fr;
  }

  .balance-control {
    grid-template-columns: 1fr;
  }

  .side-buttons {
    width: 100%;
  }

  .side-select {
    flex: 1;
  }
}

@media (max-width: 700px) {
  .bbxs-header-inner {
    gap: 6px;
    padding-inline: 10px;
  }

  .bbxs-brand {
    gap: 7px;
  }

  .bbxs-brand-mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .bbxs-brand-copy strong {
    font-size: 11px;
  }

  .bbxs-nav a {
    padding-inline: 7px;
    font-size: 9px;
  }

  .bbxs-nav a span {
    font-size: 14px;
  }

  .upgrader-page {
    padding-left: 12px;
  }

  .list-header {
    grid-template-columns: 1fr auto;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 3;
  }

  .header-actions {
    gap: 9px;
  }

  .header-actions .soft-action span,
  .sort-button span {
    display: none;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }

  .item-card {
    height: 112px;
  }
}

@media (max-width: 560px) {
  .bbxs-brand-copy,
  .bbxs-nav a.bbxs-nav-home {
    display: none;
  }
}

@media (max-width: 480px) {
  .bbxs-header-inner {
    padding-inline: 8px;
  }

  .bbxs-brand-mark {
    width: 32px;
    height: 32px;
  }

  .bbxs-nav a {
    padding-inline: 5px;
    font-size: 8px;
  }

  .wheel-card {
    height: 170px;
  }

  .wheel-shell {
    --arrow-radius: 58px;
    width: 135px;
    height: 135px;
  }

  .wheel-arrow {
    width: 20px;
    height: 20px;
    transform-origin: 50% 69px;
  }

  .chance-readout strong {
    font-size: 20px;
  }

  .chance-readout small {
    font-size: 9px;
  }

  .panel-stat-right {
    display: none;
  }

  .remove-selected {
    display: none;
  }
}

.small-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-state.compact {
  min-height: 140px;
}



.item-card.is-selected::before {
  opacity: 0.42;
  filter: blur(18px);
}

.item-card.is-selected .upgrader-item-bg {
  opacity: 0.36;
  filter: blur(18px);
  transform: translate(-50%, -50%) scale(1.18);
}

.balance-amount.slider-funding {
  height: 8px;
  min-height: 8px;
  border-radius: 999px;
}

.balance-amount.slider-funding::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(255, 174, 79, 0.16), 0 0 18px rgba(255, 174, 79, 0.45);
}



/* codex-fast-mode-hit-target */
.fast-mode {
  position: relative;
  z-index: 8;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: auto;
}

.fast-mode.is-on {
  color: #38f3ab;
  background: rgba(32, 185, 121, 0.2);
  text-shadow: 0 0 12px rgba(56, 243, 171, 0.55);
}

.verify-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 7px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffbc62, #ff9d2d);
  color: #171114;
  font-weight: 900;
  font-size: 11px;
  text-decoration: none;
}

.item-card.is-selected::before,
.selected-mini::before,
.mini-win-card::before {
  background: var(--rarity) !important;
}

/* codex-wheel-smoothing-20260703 */
.wheel-shell {
  touch-action: none;
}

.ring-progress {
  transition: stroke-dasharray 120ms ease, transform 120ms ease;
  will-change: stroke-dasharray, transform;
}

.wheel-shell.is-dragging .ring-progress {
  transition: none;
}

.wheel-arrow {
  will-change: transform;
  backface-visibility: hidden;
}

.fast-mode {
  cursor: pointer;
  user-select: none;
}

/* Demirci catalog, forge and account history */
.balance-shortcuts { display:flex; gap:6px; margin-top:8px; }
.balance-shortcuts button { flex:1; min-height:26px; border:1px solid rgba(255,174,79,.26); border-radius:7px; background:#17151c; color:#c8c2d1; font-size:10px; font-weight:900; cursor:pointer; }
.balance-shortcuts button:hover { color:#171114; background:#ffad45; transform:translateY(-1px); }
.economy-note { display:block; margin-top:7px; color:#8f899d; font-size:10px; line-height:1.35; }
.item-card { position:relative; cursor:pointer; }
.item-card .source-chip { position:absolute; z-index:3; left:8px; top:7px; max-width:calc(100% - 62px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-chip { display:inline-flex; padding:3px 7px; border:1px solid rgba(255,174,79,.25); border-radius:999px; background:rgba(16,14,20,.86); color:#ffb157; font-size:8px; font-weight:900; letter-spacing:.03em; }
.item-detail-button { position:absolute; z-index:4; right:7px; top:7px; min-height:23px; padding:0 7px; border:1px solid #383441; border-radius:6px; color:#d8d1df; background:#17151c; font-size:9px; font-weight:900; cursor:pointer; opacity:0; transition:opacity .18s ease, transform .18s ease; }
.item-card:hover .item-detail-button,.item-card:focus-within .item-detail-button { opacity:1; transform:translateY(0); }
.forge-grid { display:grid; grid-template-columns:minmax(320px,.8fr) minmax(460px,1.2fr); gap:16px; margin-top:16px; }
.crafting-panel,.history-panel { min-height:190px; }
.recipe-grid { display:grid; gap:8px; padding:12px; max-height:310px; overflow:auto; }
.recipe-card { display:grid; grid-template-columns:54px 1fr auto; gap:10px; align-items:center; padding:9px; border:1px solid #2b2833; border-radius:9px; background:#131218; }
.recipe-card img { width:54px; height:46px; object-fit:contain; }
.recipe-card strong,.recipe-card span { display:block; }
.recipe-card span { color:#8f899d; font-size:10px; margin-top:4px; }
.recipe-card button,.history-actions button { border:1px solid rgba(255,174,79,.35); border-radius:7px; background:#ffad45; color:#171114; min-height:30px; padding:0 10px; font-weight:900; cursor:pointer; }
.recipe-card button:disabled { opacity:.35; cursor:not-allowed; }
.history-list { max-height:310px; overflow:auto; padding:10px 12px; }
.history-row { display:grid; grid-template-columns:56px 1fr auto; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid #282530; }
.history-row>img { width:54px; height:44px; object-fit:contain; border-radius:7px; background:#121117; }
.history-row.is-win { box-shadow:inset 3px 0 #32d797; padding-left:9px; }
.history-row.is-loss { box-shadow:inset 3px 0 #ef5367; padding-left:9px; opacity:.82; }
.history-main strong,.history-main span,.history-main small { display:block; }
.history-main span,.history-main small { margin-top:3px; color:#918b9f; font-size:10px; }
.history-actions { display:flex; align-items:flex-end; flex-direction:column; gap:5px; }
.history-actions time { color:#ffb157; font-size:9px; font-weight:800; }
.history-actions a { color:#d9d3e0; font-size:10px; font-weight:900; }
.history-actions button { min-height:23px; padding:0 7px; font-size:8px; }
.win-row.is-loss .win-profit { color:#ff6478; }
.underdog-badge { display:inline-flex; padding:3px 6px; border-radius:999px; color:#171114; background:#ffd455; font-size:8px; font-weight:1000; }
.forge-stage { position:absolute; z-index:3; inset:0; display:grid; place-items:center; pointer-events:none; opacity:0; transition:opacity .2s ease; }
.forge-stage.is-active { opacity:1; }
.forge-heat { position:absolute; width:76%; height:76%; border-radius:50%; background:radial-gradient(circle,rgba(255,93,23,.42),rgba(255,173,48,.12) 45%,transparent 70%); filter:blur(10px); animation:forgeHeat 650ms ease-in-out infinite alternate; }
.forge-anvil { position:absolute; bottom:52px; width:80px; height:24px; border-radius:4px 18px 5px 5px; background:linear-gradient(#b7afad,#4d4749); box-shadow:0 16px 0 -6px #393438; }
.forge-hammer { position:absolute; width:15px; height:92px; border-radius:8px; background:linear-gradient(90deg,#6f3d21,#b8753d,#57301e); transform-origin:50% 84%; transform:translate(32px,-22px) rotate(-48deg); }
.forge-hammer::before { content:""; position:absolute; left:-18px; top:-8px; width:50px; height:24px; border-radius:6px; background:linear-gradient(#ddd3cb,#625a5d); }
.forge-stage.is-active .forge-hammer { animation:forgeHammer var(--hammer-ms,680ms) cubic-bezier(.55,.02,.45,1) infinite; }
.forge-spark { position:absolute; bottom:87px; width:5px; height:5px; border-radius:50%; background:#fff3bd; box-shadow:18px -14px #ffb13d,-22px -20px #ff7835,30px -35px #ffd86c,-34px -42px #ff9f37; opacity:0; }
.forge-stage.is-active .forge-spark { animation:forgeSparks var(--hammer-ms,680ms) var(--spark-delay,110ms) infinite; }
@keyframes forgeHammer { 0%,45%{transform:translate(32px,-22px) rotate(-48deg)} 63%,75%{transform:translate(3px,25px) rotate(14deg)} 100%{transform:translate(32px,-22px) rotate(-48deg)} }
@keyframes forgeSparks { 0%,55%{opacity:0;transform:scale(.2)} 65%{opacity:1;transform:scale(1.3)} 100%{opacity:0;transform:translateY(-35px) scale(.5)} }
@keyframes forgeHeat { to{transform:scale(1.08);filter:blur(14px)} }
.item-drawer { position:fixed; z-index:1000; inset:0; pointer-events:none; visibility:hidden; }
.item-drawer.is-open { pointer-events:auto; visibility:visible; }
.drawer-backdrop { position:absolute; inset:0; width:100%; border:0; background:rgba(4,3,7,.74); opacity:0; transition:opacity .22s ease; }
.item-drawer.is-open .drawer-backdrop { opacity:1; }
.drawer-panel { position:absolute; right:0; top:0; bottom:0; width:min(430px,92vw); padding:26px; overflow:auto; border-left:1px solid #36313e; background:linear-gradient(145deg,#1b1820,#100f14); transform:translateX(100%); transition:transform .26s cubic-bezier(.2,.8,.2,1); }
.item-drawer.is-open .drawer-panel { transform:translateX(0); }
.drawer-close { position:absolute; right:16px; top:14px; width:36px; height:36px; border:1px solid #38333f; border-radius:50%; color:#fff; background:#17151b; font-size:24px; cursor:pointer; }
.drawer-hero { text-align:center; padding:22px 0; }
.drawer-hero>img { display:block; width:190px; height:160px; object-fit:contain; margin:auto; }
.drawer-hero h2 { margin:10px 0 5px; }
.drawer-hero>strong { color:#ffad45; font-size:20px; }
.drawer-panel label { display:block; margin-top:14px; color:#bcb5c8; font-size:11px; font-weight:900; }
.drawer-panel select { display:block; width:100%; min-height:42px; margin-top:6px; padding:0 11px; border:1px solid #37323f; border-radius:8px; background:#121116; color:#fff; }
.item-facts { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.item-facts div { padding:9px; border:1px solid #2c2933; border-radius:8px; background:#131218; }
.item-facts dt { color:#807a8b; font-size:9px; }.item-facts dd { margin:4px 0 0; font-size:11px; font-weight:800; }
.drawer-apply { width:100%; min-height:44px; margin-top:18px; border:0; border-radius:9px; background:linear-gradient(#ffc06b,#ff9e31); color:#171114; font-weight:1000; cursor:pointer; }
@media(max-width:900px){.forge-grid{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.history-row{grid-template-columns:48px 1fr}.history-actions{grid-column:2;align-items:flex-start}.balance-shortcuts{flex-wrap:wrap}}
