/* ============================================================
   coins.css — Casino-style coin meter
   ============================================================ */

/* ── Counter panel ───────────────────────────────────────── */

#coin-counter {
  position: fixed;
  top: 52px;        /* below lang picker */
  right: 10px;
  z-index: 30;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(160deg, #1a1200 0%, #2a1f00 50%, #1a1200 100%);
  border: 2px solid #b8860b;
  border-radius: 14px;
  padding: 8px 14px 7px;
  box-shadow:
    0 0 0 1px #ffd70033,
    0 0 14px #ffa50055,
    inset 0 1px 0 rgba(255,215,0,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.4);
  min-width: 88px;
  transition: box-shadow 0.2s ease;
}

/* Label row */
.coin-label {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #b8860b;
  text-shadow: 0 0 6px #ffd70066;
  line-height: 1;
}

/* Score row */
.coin-score-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.coin-icon {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 6px #ffa500cc);
  animation: coin-rotate 2s linear infinite;
  display: inline-block;
}

#coin-display {
  font-size: 28px;
  font-weight: 900;
  font-family: 'Courier New', 'Lucida Console', monospace;
  color: #ffd700;
  text-shadow:
    0 0 10px #ffd700,
    0 0 20px #ffa500aa,
    0 1px 0 #7a5000;
  min-width: 44px;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1;
  transition: color 0.1s;
}

/* Fill bar */
.coin-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #7a5000;
}

.coin-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b8860b, #ffd700, #fff8dc);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 6px #ffd700aa;
}

/* Corner lights */
.coin-lights {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  overflow: hidden;
}

.coin-lights::before,
.coin-lights::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd700;
  box-shadow: 0 0 6px #ffd700, 0 0 12px #ffa500;
  opacity: 0.3;
}
.coin-lights::before { top: 4px; left: 4px; }
.coin-lights::after  { top: 4px; right: 4px; }

/* ── Glow pulse on award ──────────────────────────────────── */

#coin-counter.coin-counter-glow {
  box-shadow:
    0 0 0 2px #ffd700,
    0 0 20px #ffd700aa,
    0 0 40px #ffa50066,
    inset 0 1px 0 rgba(255,215,0,0.3);
  animation: casino-pulse 0.5s ease-out;
}

@keyframes casino-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.08); }
  60%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* ── Tick animation ───────────────────────────────────────── */

#coin-display.coin-tick {
  color: #fff8dc;
  text-shadow:
    0 0 12px #fff,
    0 0 20px #ffd700,
    0 0 32px #ffa500;
  animation: digit-pop 0.15s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes digit-pop {
  0%   { transform: scale(1) translateY(0); }
  50%  { transform: scale(1.3) translateY(-3px); }
  100% { transform: scale(1) translateY(0); }
}

/* ── Coin continuous rotation ─────────────────────────────── */

@keyframes coin-rotate {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ── Flying coin ─────────────────────────────────────────── */

.coin-fly {
  position: fixed;
  z-index: 200;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px #ffd700);
}

.coin-fly-animate {
  animation: coin-arc 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes coin-arc {
  0%   { transform: translate(0,0) scale(1.3) rotate(0deg);   opacity: 1; }
  40%  { transform: translate(var(--x1),var(--y1)) scale(1.6) rotate(180deg); opacity: 1; }
  100% { transform: translate(var(--x2),var(--y2)) scale(0.4) rotate(360deg); opacity: 0.7; }
}

/* ── Jackpot flash (fires when total hits milestone) ──────── */

#coin-counter.coin-jackpot {
  animation: jackpot-flash 0.8s ease-out;
}

@keyframes jackpot-flash {
  0%   { box-shadow: 0 0 0 2px #ffd700, 0 0 30px #ffd700, 0 0 60px #ffa500; }
  25%  { box-shadow: 0 0 0 4px #fff,    0 0 50px #fff,    0 0 80px #ffd700; }
  50%  { box-shadow: 0 0 0 2px #ffd700, 0 0 30px #ffd700, 0 0 60px #ffa500; }
  75%  { box-shadow: 0 0 0 4px #fff,    0 0 50px #fff,    0 0 80px #ffd700; }
  100% { box-shadow: 0 0 0 1px #ffd70033, 0 0 12px #ffa50044; }
}
