* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: system-ui, sans-serif; color: #fff;
  background: radial-gradient(circle at 20% 0%, #4b1d8f, transparent 50%), radial-gradient(circle at 90% 100%, #0e6b6b, transparent 50%), #0b0820; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
h1 { margin: 0; font-size: 2rem; font-weight: 900; letter-spacing: -1px; }
h1 span { background: linear-gradient(90deg, #ffd34d, #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #ffffff14; border: 1px solid #ffffff22; font-weight: 700; }
.hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.hud div { background: #ffffff10; border: 1px solid #ffffff1f; border-radius: 14px; padding: 10px; text-align: center; }
.hud small { display: block; opacity: .7; text-transform: uppercase; font-size: .7rem; letter-spacing: 1px; }
.hud b { font-size: 1.6rem; }
.warn { color: #ff5d73; }
.arena { position: relative; height: min(70vh, 520px); border-radius: 22px; overflow: hidden; touch-action: manipulation;
  background: linear-gradient(160deg, #1a1240, #120c2c); border: 2px solid #ffd34d44; box-shadow: 0 0 40px #7b3fff44 inset; }
.coin { position: absolute; width: 54px; height: 54px; margin: -27px; border-radius: 50%; border: 0; cursor: pointer;
  font-weight: 900; font-size: 1.4rem; animation: pop-in .25s ease-out, fade 1.6s linear forwards; }
.coin.gold { background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc400 45%, #c77800); color: #7a4500; box-shadow: 0 0 18px #ffc40088; }
.coin.gem { background: radial-gradient(circle at 35% 30%, #e0fbff, #33e1ff 45%, #0077b6); color: #00395a; box-shadow: 0 0 22px #33e1ffaa; }
.coin.bomb { background: radial-gradient(circle at 35% 30%, #ff9aa8, #e0213f 50%, #6b0012); color: #fff; box-shadow: 0 0 18px #ff2a4a88; }
@keyframes pop-in { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.pop { position: absolute; pointer-events: none; font-weight: 900; font-size: 1.3rem; color: #ffd34d; transform: translate(-50%, -50%);
  animation: rise .7s ease-out forwards; }
.pop.neg { color: #ff5d73; }
@keyframes rise { to { transform: translate(-50%, -160%); opacity: 0; } }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; gap: 8px; background: #0b082099; backdrop-filter: blur(4px); }
.overlay h2 { margin: 0; font-size: 2rem; }
.overlay p { margin: 0; opacity: .85; max-width: 380px; }
.big { font-size: 2.4rem; font-weight: 900; color: #ffd34d; opacity: 1 !important; }
.tag { color: #33e1ff; font-weight: 700; }
.play { margin: 12px auto 0; padding: 14px 32px; border: 0; border-radius: 999px; font-size: 1.1rem; font-weight: 900; cursor: pointer;
  color: #3a1d00; background: linear-gradient(90deg, #ffd34d, #ff8a00); box-shadow: 0 6px 24px #ff8a0066; }
.play:hover { transform: translateY(-2px); }
button:focus-visible { outline: 3px solid #33e1ff; outline-offset: 2px; }
h1 { text-shadow: 0 0 24px #7b3fff99; }
h1 span { animation: shine 3s linear infinite; background-size: 200% 100%; background-image: linear-gradient(90deg, #ffd34d, #ff8a00, #fff3b0, #ffd34d); }
@keyframes shine { to { background-position: -200% 0; } }
.arena { animation: glow 4s ease-in-out infinite; }
@keyframes glow { 50% { border-color: #33e1ff88; box-shadow: 0 0 60px #33e1ff33 inset, 0 0 30px #7b3fff55; } }
.grid-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%; pointer-events: none; opacity: .35;
  background-image: linear-gradient(#ff3fd8 1px, transparent 1px), linear-gradient(90deg, #ff3fd8 1px, transparent 1px);
  background-size: 40px 40px; transform: perspective(300px) rotateX(60deg); animation: floor 2s linear infinite;
  mask-image: linear-gradient(transparent, #000); -webkit-mask-image: linear-gradient(transparent, #000); }
@keyframes floor { to { background-position: 0 40px; } }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; pointer-events: none; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; transform: scale(.5); } }
.coin { z-index: 2; }
.coin.gold, .coin.gem { animation: pop-in .25s ease-out, fade 1.6s linear forwards, bob 1s ease-in-out infinite alternate; }
@keyframes bob { to { translate: 0 -6px; } }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 3; animation: burst .6s ease-out forwards; }
.spark.gold { background: #ffd34d; box-shadow: 0 0 10px #ffd34d; }
.spark.gem { background: #33e1ff; box-shadow: 0 0 10px #33e1ff; }
.spark.bomb { background: #ff5d73; box-shadow: 0 0 10px #ff2a4a; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
.pop { z-index: 4; text-shadow: 0 0 12px currentColor; }
.shake { animation: shake .4s; background: linear-gradient(160deg, #4a0f20, #120c2c); }
@keyframes shake { 20% { transform: translate(-8px, 4px); } 40% { transform: translate(8px, -4px); } 60% { transform: translate(-6px, 2px); } 80% { transform: translate(4px, -2px); } }
.flash { position: absolute; top: 40%; left: 0; right: 0; text-align: center; z-index: 5; pointer-events: none; font-size: 2.6rem; font-weight: 900;
  color: #fff; text-shadow: 0 0 20px #ff3fd8, 0 0 40px #7b3fff; animation: zoom .9s ease-out forwards; }
@keyframes zoom { from { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.overlay { z-index: 6; }
.play { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 6px 40px #ff8a00cc; transform: scale(1.04); } }
.note { text-align: center; opacity: .6; font-size: .85rem; }
