/* Russian roulette page, overlay and home card (public/russian.js). The page reuses coinflip's .cf-* layout. */
.rr-create-row { grid-template-columns: minmax(0, 1fr) auto auto; }
#rrCreate, #rrBot { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; white-space: nowrap; }
.rr-botbtn { border: 1px solid var(--line); color: var(--text); }
.rr-botbtn:hover { border-color: #ff4d5e; }

/* rows: a small revolver spins in the middle while the game plays; then how many pulls it took */
.rr-rowgun { display: grid; place-items: center; color: #ff4d5e; animation: rrRowSpin .8s linear infinite; }
.rr-mini { width: 30px; height: 30px; fill: currentColor; }
@keyframes rrRowSpin { to { transform: rotate(360deg); } }
.rr-rowres { display: grid; place-items: center; line-height: 1; font: 800 18px 'Bricolage Grotesque', sans-serif; color: var(--text); letter-spacing: 0; }
.rr-rowres small { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }

/* ---------- overlay ---------- */
.rr-box { width: 860px; overflow: hidden; }
.rr-box.shake { animation: rrShake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes rrShake {
  10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(5px, -3px); }
  30%, 50%, 70% { transform: translate(-8px, 4px); } 40%, 60% { transform: translate(8px, -2px); }
}
.rr-players { grid-template-columns: 1fr 320px 1fr; }
.rr-stage { position: relative; height: 300px; display: grid; place-items: center; perspective: 900px; }
.rr-stage > * { grid-area: 1 / 1; }
.rr-table {
  width: 290px; height: 290px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #3a1620 0%, #24101a 55%, #150a10 100%);
  box-shadow: inset 0 0 0 8px #1a0c12, inset 0 0 0 10px rgba(255, 77, 94, .25), inset 0 0 40px rgba(0, 0, 0, .7), 0 18px 40px -12px rgba(0, 0, 0, .8);
}
.rr-table::after { content: ''; position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .07); }
.rr-spin { position: relative; z-index: 1; width: 240px; aspect-ratio: 200 / 110; will-change: transform; }
.rr-face { width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.rr-hop { position: relative; width: 100%; height: 100%; will-change: transform; }
.rr-gun { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .55)); }
.rr-flutes { transition: none; }
/* muzzle flash + smoke, at the end of the barrel (they flip with the gun) */
.rr-flash {
  position: absolute; left: 98%; top: 35%; width: 90px; height: 70px; transform: translate(-12%, -50%) scale(.2); opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 25% 50%, #fff 0 12%, #fff3a8 22%, #ffb02e 40%, rgba(255, 77, 40, .6) 58%, transparent 70%);
  clip-path: polygon(0 50%, 30% 30%, 45% 0, 55% 32%, 100% 50%, 55% 68%, 45% 100%, 30% 70%);
}
.rr-flash.go { animation: rrFlash .28s ease-out; }
@keyframes rrFlash { 0% { opacity: 1; transform: translate(-12%, -50%) scale(.4); } 35% { opacity: 1; transform: translate(-12%, -50%) scale(1.25); } 100% { opacity: 0; transform: translate(-12%, -50%) scale(1.5); } }
.rr-smoke { position: absolute; left: 100%; top: 33%; width: 40px; height: 40px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(220, 220, 230, .55), rgba(160, 160, 170, 0) 70%); filter: blur(4px); }
.rr-smoke.go { animation: rrSmoke 1.6s ease-out .08s; }
@keyframes rrSmoke { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.4); } 100% { opacity: 0; transform: translate(10px, -70px) scale(3.2); } }
.rr-stage.hitflash::after {
  content: ''; position: absolute; inset: -60px; pointer-events: none; z-index: 3;
  background: radial-gradient(circle, rgba(255, 240, 200, .5), rgba(255, 60, 60, .18) 45%, transparent 70%); animation: rrHit .5s ease-out forwards;
}
@keyframes rrHit { from { opacity: 1; } to { opacity: 0; } }
/* "click" / "BANG" over the shooter's side of the table */
.rr-pop { position: absolute; z-index: 2; top: 16%; font: 800 22px 'Bricolage Grotesque', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  color: #dfe5ee; opacity: 0; pointer-events: none; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.rr-pop.left { justify-self: start; margin-left: 4px; }
.rr-pop.right { justify-self: end; margin-right: 4px; }
.rr-pop.go { animation: rrPop .9s ease-out; }
.rr-pop.bang { font-size: 44px; color: #ff4d5e; text-shadow: 0 0 18px rgba(255, 77, 94, .8), 0 3px 0 #5a0d16; }
.rr-pop.bang.go { animation: rrPop 1.4s ease-out forwards; }
@keyframes rrPop { 0% { opacity: 0; transform: scale(.5) rotate(-6deg); } 15% { opacity: 1; transform: scale(1.15) rotate(-6deg); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(1) rotate(-6deg); } }

/* players: whose turn it is, who got shot */
.rr-fp img { transition: box-shadow .3s, filter .4s; }
.rr-fp .rr-tag { min-height: 18px; font-weight: 700; }
.rr-fp.turn img { box-shadow: 0 0 0 3px var(--gold, #ffc940), 0 0 28px -4px var(--gold, #ffc940); animation: rrTurn 1s ease-in-out infinite; }
.rr-fp.turn .rr-tag { color: var(--gold, #ffc940); }
@keyframes rrTurn { 50% { transform: scale(1.04); } }
.rr-fp.shot { opacity: 1; }
.rr-fp.shot img { filter: grayscale(1) brightness(.55); box-shadow: 0 0 0 3px #ff4d5e, 0 0 34px -2px #ff4d5e; animation: rrKnock .6s cubic-bezier(.2, .8, .3, 1); }
.rr-fp.shot .n, .rr-fp.shot .rr-tag { color: #ff4d5e; }
@keyframes rrKnock { 0% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-14px) rotate(-10deg); } 60% { transform: translateX(4px) rotate(3deg); } 100% { transform: none; } }
.rr-fp.won .rr-tag { color: var(--green); }
.flip-result .prize.rr-lost { color: #ff4d5e; }

/* six chambers: pulled-and-empty, the live one, the shot */
.rr-chambers { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.rr-chambers i { flex: none; box-sizing: border-box; padding: 0; margin: 0; width: 16px; height: 16px; border-radius: 50%; background: #0d1017; box-shadow: inset 0 0 0 2px #39425a; transition: background .2s, box-shadow .2s; }
.rr-chambers i.live { box-shadow: inset 0 0 0 2px var(--gold, #ffc940), 0 0 12px -2px var(--gold, #ffc940); }
.rr-chambers i.empty { background: #39425a; box-shadow: inset 0 0 0 2px #4b556d; }
.rr-chambers i.bang { background: #ff4d5e; box-shadow: 0 0 14px #ff4d5e; }

@media (max-width: 960px) {
  .rr-create-row { grid-template-columns: 1fr 1fr; }
  .rr-create-row .cf-amount-box { grid-column: span 2; }
  .rr-players { grid-template-columns: 1fr 170px 1fr; }
  .rr-stage { height: 220px; }
  .rr-table { width: 170px; height: 170px; }
  .rr-table::after { width: 90px; height: 90px; }
  .rr-spin { width: 150px; }
  .rr-pop { font-size: 16px; }
  .rr-pop.bang { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .rr-box.shake, .rr-fp.turn img, .rr-rowgun { animation: none; } }

/* ---------- home card (drawn, like the Upgrader card) ---------- */
.rr-cover { background: linear-gradient(180deg, #4923a5 0%, #3b1a8e 40%, #2b1369 70%, #1f0d48 100%); border-radius: inherit; }
.rr-cover .rrc-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rrc-halo { fill: #5329b5; }
.rrc-shadow { fill: #2a0d60; opacity: .85; }
.rr-cover .rrc-gun { position: absolute; left: 50%; top: 40%; width: 80%; aspect-ratio: 200 / 110; transform: translate(-50%, -50%) rotate(-10deg); transition: transform .35s cubic-bezier(.2, .8, .3, 1.3); }
.rr-cover .rrc-gun .rr-gun { filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .5)); }
.game-card:hover .rr-cover .rrc-gun { animation: rrcSpin 1.8s cubic-bezier(.2, .7, .2, 1) infinite; }
@keyframes rrcSpin {
  0% { transform: translate(-50%, -50%) rotate(-10deg); }
  55% { transform: translate(-50%, -50%) rotate(-370deg); }
  62% { transform: translate(-50%, -50%) rotate(-370deg); }
  66% { transform: translate(-52%, -50%) rotate(-382deg); }
  80%, 100% { transform: translate(-50%, -50%) rotate(-370deg); }
}
.rr-cover .rrc-flash { position: absolute; left: 86%; top: 22%; width: 18%; aspect-ratio: 1.3; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 50%, #fff 0 12%, #fff3a8 25%, #ffb02e 45%, transparent 70%);
  clip-path: polygon(0 50%, 30% 30%, 45% 0, 55% 32%, 100% 50%, 55% 68%, 45% 100%, 30% 70%); }
.game-card:hover .rr-cover .rrc-flash { animation: rrcFlash 1.8s linear infinite; }
@keyframes rrcFlash { 0%, 62% { opacity: 0; transform: scale(.4); } 64% { opacity: 1; transform: scale(1.2); } 72%, 100% { opacity: 0; transform: scale(1.4); } }
.rr-cover .rrc-tag { position: absolute; left: 8%; bottom: 18.5%; display: flex; align-items: center; gap: 5px; font-size: clamp(7px, 4.2cqw, 10px); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #b9a8dc; }
.rr-cover .rrc-tag::before { content: ''; width: .75em; height: .75em; border-radius: 50%; background: #ff4d5e; }
.rr-cover .rrc-name { position: absolute; left: 8%; bottom: 6%; font-size: clamp(12px, 9.5cqw, 22px); font-weight: 900; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .game-card:hover .rr-cover .rrc-gun, .game-card:hover .rr-cover .rrc-flash { animation: none; } }
