/* Smoke particles */
.smoke-particle {
  position: absolute;
  bottom: 30%;
  left: 60%;
  width: 14px;
  height: 14px;
  background: rgba(220, 220, 230, 0.6);
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
  animation: smokeRise 1.6s ease-out forwards;
}
@keyframes smokeRise {
  0%   { transform: translate(0, 0) scale(0.5); opacity: 0.8; }
  100% { transform: translate(var(--dx, 0), -120px) scale(1.8); opacity: 0; }
}

/* Cigarette icon */
.cig-icon-detail {
  width: 80px;
  height: 14px;
  position: relative;
  display: inline-block;
}
.cig-icon-detail .body {
  position: absolute;
  inset: 0 12px 0 0;
  background: linear-gradient(to bottom, #f5efe1 65%, #e8b75c 65%, #c88c2c 100%);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.cig-icon-detail .filter {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  background: linear-gradient(to bottom, #e8b75c, #c88c2c);
  border-radius: 0 2px 2px 0;
}
.cig-icon-detail .tip {
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffeb78 0%, #ff8040 70%, transparent 90%);
  box-shadow: 0 0 10px 2px rgba(255, 128, 64, 0.6);
  animation: tipGlow 1.2s ease-in-out infinite;
}
@keyframes tipGlow {
  0%, 100% { box-shadow: 0 0 8px 1px rgba(255, 128, 64, 0.5); opacity: 0.9; }
  50%      { box-shadow: 0 0 14px 3px rgba(255, 160, 80, 0.8); opacity: 1; }
}

/* Cigarette burn animation */
.cig-burn {
  animation: burnDown 0.9s ease-in forwards;
}
@keyframes burnDown {
  0%   { transform: scale(1) rotate(0deg); opacity: 1; }
  60%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(0.7) translateY(20px); opacity: 0; }
}

/* Coin flip */
.coin {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  margin: 0 auto;
}
.coin .face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 900;
  color: #5e3f00;
  background: radial-gradient(circle at 30% 30%, #fff2b0 0%, var(--gold) 50%, #b07e16 100%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 -8px 16px rgba(0, 0, 0, 0.15);
  backface-visibility: hidden;
}
.coin .tails {
  transform: rotateY(180deg);
}
.coin.spin {
  animation: coinSpin 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.coin.land-tails { transform: rotateY(180deg); }
@keyframes coinSpin {
  0%   { transform: rotateY(0); }
  100% { transform: rotateY(var(--spin, 1800deg)); }
}

/* Crash chart */
.crash-stage {
  position: relative;
  height: 240px;
  background: linear-gradient(180deg, rgba(255, 106, 61, 0.04) 0%, transparent 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.crash-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.crash-multiplier {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.crash-multiplier.running { color: var(--ember); }
.crash-multiplier.crashed { color: var(--danger); }
.crash-multiplier.won { color: var(--success); }

.crash-line {
  fill: none;
  stroke: var(--ember);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 106, 61, 0.6));
}
.crash-fill {
  fill: url(#crashGrad);
  opacity: 0.4;
}
.crashed .crash-line { stroke: var(--danger); }
.won .crash-line { stroke: var(--success); }

.crash-trail {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  filter: blur(2px);
  pointer-events: none;
  animation: trailFade 0.6s ease-out forwards;
}
@keyframes trailFade {
  to { opacity: 0; transform: scale(0.3); }
}

/* Confetti */
.confetti {
  position: fixed;
  width: 10px;
  height: 14px;
  top: 30%;
  left: 50%;
  border-radius: 2px;
  pointer-events: none;
  animation: confettiFall var(--dur, 1.5s) ease-out forwards;
  z-index: 150;
}
@keyframes confettiFall {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx, 0), 80vh) rotate(720deg); opacity: 0; }
}
