



.pet-img {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
}

.pet-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22%;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35));
}

.pet-img.no-img img { display: none; }
.pet-img.no-img::before { content: ''; width: 60%; height: 60%; border-radius: 30%; background: var(--line-2); }

.pet-img.is-rainbow img { animation: rainbowHue 4s linear infinite; }

@keyframes rainbowHue {
  from { filter: hue-rotate(0deg) saturate(1.4) drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
  to { filter: hue-rotate(360deg) saturate(1.4) drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
}


.pet-img.is-shiny::before,
.pet-img.is-shiny::after {
  content: '';
  position: absolute;
  width: 34%;
  height: 34%;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.pet-img.is-shiny::before { top: -6%; right: -4%; }
.pet-img.is-shiny::after { bottom: 4%; left: -6%; width: 24%; height: 24%; animation-delay: .8s; }

@keyframes twinkle {
  0%, 100% { transform: scale(.2) rotate(0deg); opacity: 0; }
  50% { transform: scale(1) rotate(45deg); opacity: 1; }
}



.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 250; }

.float-delta {
  position: fixed;
  z-index: 300;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 17px;
  pointer-events: none;
  text-shadow: 0 2px 0 #0d0822;
  animation: floatUp 1.3s ease-out forwards;
}
.float-delta.gain { color: var(--win); }
.float-delta.spend { color: var(--loss); }

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -4px) scale(.8); }
  15% { opacity: 1; transform: translate(-50%, 6px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, 34px) scale(1); }
}

.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }

@keyframes shake {
  20%, 80% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
}

.pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes pop { 40% { transform: scale(1.35); } }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes blink { 50% { opacity: .45; } }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}



body.ready .sidebar-left .brand-section,
body.ready .sidebar-left .nav-group,
body.ready .top-navbar,
body.ready .giveaway-banner {
  animation: riseIn .5s cubic-bezier(.2, .8, .3, 1) backwards;
}
body.ready .sidebar-left .nav-group:nth-of-type(1) { animation-delay: .06s; }
body.ready .sidebar-left .nav-group:nth-of-type(2) { animation-delay: .12s; }
body.ready .giveaway-banner { animation-delay: .1s; }

.brand-icon { transition: transform .3s cubic-bezier(.2, .9, .3, 1.5); }
.brand-section:hover .brand-icon { transform: rotate(-10deg) scale(1.08); }

.nav-item .nav-svg { transition: transform .2s; }
.nav-item:hover .nav-svg { transform: scale(1.12); }



.balance-pill.gain { animation: pillGain .7s ease-out; }
.balance-pill.spend { animation: pillSpend .5s ease-out; }

@keyframes pillGain {
  0% { border-color: var(--win); box-shadow: 0 0 0 0 rgba(52, 215, 123, .5); }
  100% { box-shadow: 0 0 0 10px rgba(52, 215, 123, 0); }
}
@keyframes pillSpend { 0% { border-color: var(--loss); } }



.live-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  flex: none;
}

.live-strip-label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-weight: 900;
  font-size: 13px;
}

.live-track {
  display: flex;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
  mask-image: linear-gradient(90deg, #000 80%, transparent);
}

.live-track:empty::before {
  content: "Bets show up here as they happen";
  color: var(--dim);
  font-size: 13px;
  font-weight: 700;
}

.live-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 30px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}

.live-item img { width: 22px; height: 22px; border-radius: 50%; background: var(--raised); }
.live-name { font-weight: 800; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.live-game { color: var(--dim); font-weight: 700; }
.live-amount { font-weight: 900; }
.live-amount.won { color: var(--win); }
.live-amount.lost { color: var(--dim); }

.live-item.entering { animation: liveIn .5s cubic-bezier(.2, .9, .3, 1.2); }

@keyframes liveIn {
  from { opacity: 0; margin-left: -140px; transform: scale(.85); }
}



.giveaway-art {
  top: 50%;
  bottom: auto;
  right: 28px;
  width: 168px;
  height: 168px;
  transform: translateY(-50%);
}

.giveaway-pet {
  position: relative;
  width: 100%;
  height: 100%;
  animation: bob 3.4s ease-in-out infinite;
}

.giveaway-pet img { filter: drop-shadow(0 8px 0 rgba(13, 8, 34, .55)); }

.art-block {
  position: absolute;
  border-radius: 28%;
  background: rgba(139, 92, 246, .35);
  animation: drift 6s ease-in-out infinite;
}
.art-block.b1 { width: 26px; height: 26px; left: -18px; top: 6px; }
.art-block.b2 { width: 16px; height: 16px; right: -6px; top: -6px; background: rgba(255, 203, 61, .45); animation-delay: -2s; }
.art-block.b3 { width: 20px; height: 20px; left: 6px; bottom: 2px; animation-delay: -4s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(6px, -12px) rotate(25deg); }
}

.giveaway-banner .btn-gold:not(:disabled) { animation: nudge 4s ease-in-out 2s infinite; }

@keyframes nudge {
  0%, 92%, 100% { transform: translateY(0); }
  95% { transform: translateY(-4px); }
}



.room-card.first { animation: riseIn .4s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--i) * 60ms); }
.room-card.is-new { animation: newRoom 1.2s ease-out; }

@keyframes newRoom {
  0% { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .45); transform: translateX(-8px); }
  30% { transform: none; }
}

.room-card.status-playing { border-color: rgba(139, 92, 246, .45); }

.room-live {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
  color: var(--violet-hi);
  background: rgba(139, 92, 246, .18);
  animation: blink 1.4s ease-in-out infinite;
}

.item-thumb-card {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: 12px;
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.5);
}
.item-thumb-card .pet-img { width: 34px; height: 34px; }
.item-thumb-card:hover { transform: translateY(-3px) scale(1.08); }

.item-more { align-self: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.item-none { align-self: center; font-size: 13px; color: var(--dim); font-weight: 700; }

.player-bubble.side-a img { border-color: var(--side-a); }
.player-bubble.side-b img { border-color: var(--side-b); }

.btn-join-room { animation: joinGlow 2.4s ease-in-out infinite; }
@keyframes joinGlow { 50% { filter: brightness(1.15); } }

.room-card.skeleton { grid-template-columns: 1.6fr 1fr 96px; height: 68px; }

.room-card.skeleton span {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--raised) 0%, var(--line-2) 50%, var(--raised) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }



.dice-3d-box { transition: transform .25s, opacity .25s, box-shadow .25s; }

.pips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 64%;
  height: 64%;
  gap: 8%;
}

.pips i { border-radius: 50%; }
.dice-a .pips i.on { background: #2a0f6a; }
.dice-b .pips i.on { background: #3a2500; }

.dice-3d-box.tumbling { animation: tumble .18s linear infinite; }

@keyframes tumble {
  0% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(14deg) translateY(-8px); }
  100% { transform: rotate(-10deg) translateY(0); }
}

.dice-3d-box.settled { animation: settle .35s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes settle { 0% { transform: scale(1.25) rotate(-8deg); } }

.dice-3d-box.round-win { transform: scale(1.12); }
.dice-a.round-win { box-shadow: 0 6px 0 var(--violet-lip), 0 0 0 6px rgba(167, 139, 250, .35); }
.dice-b.round-win { box-shadow: 0 6px 0 var(--gold-lip), 0 0 0 6px rgba(255, 203, 61, .35); }
.dice-3d-box.round-lose { opacity: .45; transform: scale(.92); }

.fighter-score { display: inline-block; margin-top: 6px; }
.fighter-score.pop { color: var(--gold); }

.fighter-side { transition: opacity .3s; }
.fighter-side.loser { opacity: .45; }
.fighter-side.winner .fighter-avatar { animation: winnerRing 1.2s ease-out infinite; }
.fighter-side.winner .fighter-name { color: var(--gold); }

@keyframes winnerRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 203, 61, .7); }
  100% { box-shadow: 0 0 0 14px rgba(255, 203, 61, 0); }
}

.pot-pets { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 150px; }
.pot-pets .pet-img { width: 34px; height: 34px; }

.match-status-bar.waiting { animation: blink 1.6s ease-in-out infinite; }
.match-status-bar.done { color: var(--gold); background: rgba(255, 203, 61, .1); }



.mine-tile {
  background: transparent;
  perspective: 500px;
  animation: tileIn .35s cubic-bezier(.2, .9, .3, 1.3) backwards;
  animation-delay: calc(var(--i) * 14ms);
}

@keyframes tileIn { from { opacity: 0; transform: scale(.6); } }

.mine-tile.gem, .mine-tile.mine, .mine-tile.mine-reveal { background: transparent; animation: none; }

.tile-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.3, 1.3, .5, 1);
}

.mine-tile.revealed .tile-inner { transform: rotateY(180deg); }

.tile-front, .tile-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tile-front { background: var(--raised); transition: background-color .15s; }
.mine-tile:not(.revealed):hover .tile-front { background: #35266c; }
.tile-back { transform: rotateY(180deg); background: var(--panel); }
.mine-tile.gem .tile-back { background: #183a5c; box-shadow: inset 0 0 0 2px rgba(63, 208, 255, .5); }
.mine-tile.mine .tile-back { background: #4a1630; box-shadow: inset 0 0 0 2px rgba(255, 90, 118, .65); }
.tile-back svg { width: 46%; height: 46%; }
.mine-tile.gem .tile-back svg { animation: gemSpin .6s cubic-bezier(.2, .9, .3, 1.5) .2s backwards; }

@keyframes gemSpin { from { transform: scale(0) rotate(-90deg); } }

.mines-board-wrapper { transition: border-color .3s, box-shadow .3s; }
.mines-board-wrapper.live { border-color: rgba(63, 208, 255, .45); box-shadow: 0 0 0 4px rgba(63, 208, 255, .08); }

#minesMultiplier { display: inline-block; }



.coin-wrap { display: grid; justify-items: center; gap: 22px; perspective: 800px; }

.coin-shadow {
  width: 130px;
  height: 18px;
  border-radius: 50%;
  background: rgba(5, 2, 16, .5);
}

.coin-wrap:has(.flipping) .coin-shadow { animation: shadowShrink 2s cubic-bezier(.3, .1, .3, 1); }

@keyframes shadowShrink {
  50% { transform: scale(.55); opacity: .5; }
}

.stage.landed .coin-wrap { animation: landBounce .45s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes landBounce { 30% { transform: translateY(6px) scaleY(.94); } }




.wheel-ticks {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(13, 8, 34, .45) 0 1.2deg, transparent 1.2deg 15deg);
}

.wheel-pointer { transform-origin: 50% 0; filter: drop-shadow(0 3px 0 #0d0822); }
.upgrader-wheel-box.spinning .wheel-pointer { animation: pointerTick .1s ease-in-out infinite alternate; }

@keyframes pointerTick { to { transform: rotate(-12deg); } }



.crash-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.crash-screen.flying { animation: gridMove .8s linear infinite; }

@keyframes gridMove {
  to { background-position: 0 56px, -56px 0, 0 0; }
}

.crash-rocket {
  left: 0;
  top: 100%;
  bottom: auto;
  margin: 0;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) rotate(50deg);
  transition: opacity .25s;
  z-index: 2;
  filter: drop-shadow(0 4px 0 rgba(13, 8, 34, .6));
}

.crash-rocket .flame { opacity: 0; transform-origin: 24px 31px; }
.crash-screen.flying .crash-rocket .flame { opacity: 1; animation: flame .09s ease-in-out infinite alternate; }

@keyframes flame { to { transform: scaleY(1.35); fill: #ffcb3d; } }

.crash-screen.crashed .crash-rocket { opacity: 0; }
.crash-screen.crashed #crashLine { stroke: var(--loss); }
.crash-screen.won #crashLine { stroke: var(--win); }
.crash-multiplier-big, .crash-status-text { z-index: 1; }
.crash-screen.won .crash-multiplier-big { animation: pop .5s cubic-bezier(.2, .9, .3, 1.5); }



.inventory-item-card .pet-img { width: 52px; height: 52px; margin-bottom: 4px; }
.inventory-item-card { transition: transform .15s, border-color .15s; }
.inventory-item-card:hover { transform: translateY(-2px); }

.value-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  animation: riseIn .35s ease-out backwards;
  animation-delay: calc(min(var(--i), 24) * 22ms);
  transition: transform .2s, border-color .2s;
}

.value-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.value-card:hover .value-img { animation: bob 1.6s ease-in-out infinite; }
.value-img { width: 64px; height: 64px; }
.value-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.value-amount { margin-top: 2px; }

.giveaway-card { animation: riseIn .4s ease-out backwards; animation-delay: calc(var(--i) * 70ms); }

.giveaway-card-art {
  display: grid;
  place-items: center;
  height: 132px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 70%, rgba(255, 203, 61, .18), transparent 60%), var(--bg);
}

.giveaway-card-art .pet-img { width: 104px; height: 104px; transition: transform .3s cubic-bezier(.2, .9, .3, 1.5); }
.giveaway-card:hover .giveaway-card-art .pet-img { transform: scale(1.08) rotate(-4deg); }
.giveaway-card-body { display: flex; flex-direction: column; gap: 2px; }
.giveaway-card-body .giveaway-prize-tag { font-size: 20px; }

.mini-giveaway-img { width: 40px; height: 40px; }

.custom-table tbody tr { animation: riseIn .35s ease-out backwards; animation-delay: calc(var(--i) * 40ms); }

.chat-msg.system { padding: 8px; margin: 0 -8px; border-radius: 12px; background: rgba(139, 92, 246, .12); }
.chat-msg.system .chat-msg-name { color: var(--violet-hi); }
.chat-msg.system .chat-msg-text { color: var(--text); font-weight: 700; }



.crash-history {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.crash-chip {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}
.crash-chip.good { color: var(--win); border-color: rgba(52, 215, 123, .35); }
.crash-chip.big { color: var(--gold); border-color: rgba(255, 203, 61, .45); background: rgba(255, 203, 61, .08); }
.crash-chip.latest { animation: liveIn .5s cubic-bezier(.2, .9, .3, 1.2); }

.crash-screen.betting .crash-rocket { opacity: 0; }
.crash-screen.betting .crash-multiplier-big { color: var(--muted); font-size: clamp(44px, 6vw, 64px); }

.crash-countdown {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  height: 6px;
  border-radius: 3px;
  background: var(--raised);
  overflow: hidden;
  opacity: 0;
  transition: opacity .2s;
}
.crash-countdown span {
  display: block;
  height: 100%;
  background: var(--violet);
  transform-origin: left;
}
.crash-screen.betting .crash-countdown { opacity: 1; }

.crash-screen.crashed .crash-multiplier-big { color: var(--loss); animation: pop .4s cubic-bezier(.2, .9, .3, 1.5); }
.crash-screen.won:not(.crashed) .crash-multiplier-big { color: var(--win); }

.btn.cashout-live { animation: cashPulse 1s ease-in-out infinite; }
@keyframes cashPulse { 50% { filter: brightness(1.15); transform: translateY(-1px); } }

.crash-players { margin-top: 16px; padding: 16px 18px; }

.crash-players-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.crash-players-head h3 { font-size: 16px; font-weight: 900; }
.crash-players-head span { color: var(--muted); font-size: 13px; font-weight: 700; }

.crash-bets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}

.crash-bet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
  animation: riseIn .3s ease-out;
  transition: background-color .3s;
}
.crash-bet img { width: 28px; height: 28px; border-radius: 9px; background: var(--raised); flex: none; }
.crash-bet.mine { box-shadow: inset 0 0 0 2px var(--violet); }
.crash-bet.cashed { background: rgba(52, 215, 123, .1); }
.crash-bet.lost { opacity: .6; }
.bet-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-wager { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.bet-result { min-width: 92px; text-align: right; font-size: 13px; font-weight: 800; color: var(--dim); }
.bet-result.won { color: var(--win); }
.bet-result.won b { display: block; font-size: 12px; }
.bet-result.lost { color: var(--loss); }

.crash-empty { color: var(--dim); font-size: 14px; padding: 8px 2px; }

.crash-fair { margin-top: 10px; font-size: 12px; color: var(--dim); font-weight: 700; overflow-wrap: anywhere; }
.crash-fair code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
}

@media (max-width: 900px) {
  .live-strip { padding: 0 16px; }
  .giveaway-art { width: 120px; height: 120px; right: 12px; top: 32%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
