:root {
  --green: #3dff8b;
  --mint: #8affc8;
  --ink: #06110c;
  --panel: rgba(6, 17, 12, 0.72);
  --line: rgba(61, 255, 139, 0.35);
  /* pump.fun rarity colors */
  --common: #e9ecf4;
  --uncommon: #4da3ff;
  --rare: #a970ff;
  --epic: #ff9a2e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: Rubik, system-ui, sans-serif; color: #fff; }

/* 1920x1080 stage, scaled to fit the window (OBS captures it 1:1) */
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: center; overflow: hidden; background: #020604; }
#room, #roomvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#roomvid { animation: fadein 1.2s ease; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
#girl { position: absolute; inset: 0; width: 100%; height: 100%; }

#desk { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(#141a17, #070a08 60%); box-shadow: 0 -18px 40px rgba(0,0,0,.55); }
#desk .led { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--green); box-shadow: 0 0 18px var(--green), 0 0 46px rgba(61,255,139,.6); }

.label { font-weight: 900; letter-spacing: .14em; font-size: 15px; color: var(--mint); }

#who { position: absolute; left: 36px; top: 30px; display: flex; gap: 14px; align-items: center; padding: 10px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
#who .live { background: #ff2d55; padding: 4px 10px; border-radius: 8px; font-weight: 900; font-size: 16px; }
#who .name { font-weight: 900; font-size: 30px; letter-spacing: .04em; }
#who .ticker { color: var(--green); font-weight: 700; font-size: 22px; }

#meter { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); width: 600px; padding: 10px 18px 12px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-align: center; display: flex; gap: 14px; align-items: center; }
#meter .mini-pack { width: 40px; height: 72px; border-radius: 3px; flex: none; filter: drop-shadow(0 0 8px rgba(255,255,255,.25)); }
#meter .meter-body { flex: 1; }
#meter .pack-name { color: #fff; }

#ladder { position: absolute; right: 36px; top: 200px; width: 230px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
#ladder .rungs { display: flex; flex-direction: column-reverse; gap: 4px; margin-top: 8px; }
.rung { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 3px 6px; border-radius: 8px; color: #6f8b7c; }
.rung img { width: 18px; height: 32px; border-radius: 2px; opacity: .45; filter: grayscale(.8); }
.rung .mc { margin-left: auto; font-size: 12px; font-weight: 500; }
.rung.done { color: #cfe; } .rung.done img { opacity: 1; filter: none; }
.rung.now { background: rgba(61,255,139,.16); color: #fff; box-shadow: inset 0 0 0 1px var(--green); }
.rung.now img { opacity: 1; filter: none; }
.rung.next { color: var(--mint); }
#levelup { position: absolute; left: 50%; top: 360px; transform: translateX(-50%); text-align: center; animation: pop .5s ease; }
#levelup .big { font-weight: 900; font-size: 64px; letter-spacing: .06em; color: var(--epic); text-shadow: 0 0 30px var(--epic), 0 4px 0 #000; }
#levelup img { width: 160px; margin-top: 10px; filter: drop-shadow(0 0 30px var(--epic)); }
#levelup .small { font-weight: 900; font-size: 30px; text-shadow: 0 3px 0 #000; }
#meter .bar { position: relative; margin-top: 8px; height: 34px; border-radius: 17px; background: #0c1f15; overflow: hidden; border: 1px solid var(--line); }
#meter .fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: linear-gradient(90deg, #16c060, var(--green)); box-shadow: 0 0 22px var(--green); transition: width .6s ease; }
#meter .text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #fff; text-shadow: 0 1px 3px #000; }
#meter.full .fill { animation: pulse .5s ease-in-out infinite alternate; }

#best { position: absolute; right: 36px; top: 30px; width: 230px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
#best .best-card { margin-top: 8px; min-height: 60px; font-size: 15px; font-weight: 700; }

#wall { position: absolute; left: 36px; top: 120px; width: 210px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
#wall .list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pull { display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.25; animation: slidein .5s ease; }
.pull .mini { width: 34px; height: 48px; border-radius: 4px; flex: none; border: 2px solid var(--c); box-shadow: 0 0 10px var(--c); background-size: cover; background-position: center; }
.pull b { display: block; color: var(--c); font-size: 12px; letter-spacing: .08em; }

#sub { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); max-width: 1100px; text-align: center; font-size: 34px; font-weight: 700; line-height: 1.25; text-shadow: 0 2px 0 #000, 0 0 12px #000, 0 0 24px #000; }

#banner { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); padding: 12px 34px; border-radius: 40px; font-weight: 900; font-size: 34px; letter-spacing: .08em; background: var(--green); color: var(--ink); box-shadow: 0 0 40px var(--green); animation: pop .4s ease; }
#winner { position: absolute; left: 50%; top: 140px; transform: translateX(-50%); padding: 14px 30px; border-radius: 16px; background: var(--panel); border: 2px solid var(--c, var(--green)); font-size: 26px; font-weight: 700; box-shadow: 0 0 30px var(--c, var(--green)); animation: pop .4s ease; white-space: nowrap; }
#winner small { display: block; font-size: 16px; color: #9fb; font-weight: 500; margin-top: 4px; }

/* ---------- the rip (pump.fun style) ---------- */
@property --r { syntax: '<percentage>'; inherits: false; initial-value: 0%; }

/* behind her: room dims, golden god rays, orbit rings */
#ripbg { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s ease; --c: var(--epic); }
#ripbg.on { opacity: 1; }
#ripbg .dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(30,18,4,.55), rgba(0,0,0,.86) 70%); }
#ripbg .godrays { position: absolute; left: 50%; top: -120px; width: 1400px; height: 1100px; transform: translateX(-50%);
  background: conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(255,196,90,.6) 6deg, transparent 12deg, rgba(255,210,120,.45) 18deg, transparent 25deg, rgba(255,190,80,.65) 30deg, transparent 37deg, rgba(255,220,140,.5) 41deg, transparent 47deg);
  -webkit-mask: linear-gradient(#000 20%, transparent 85%); mask: linear-gradient(#000 20%, transparent 85%); filter: blur(6px); animation: rays 6s ease-in-out infinite alternate; }
#ripbg .rings { position: absolute; left: 50%; top: 520px; width: 0; height: 0; }
#ripbg .rings i { position: absolute; left: -420px; top: -110px; width: 840px; height: 220px; border-radius: 50%; border: 3px solid rgba(255,200,100,.55);
  box-shadow: 0 0 18px rgba(255,190,80,.6), inset 0 0 18px rgba(255,190,80,.4); animation: orbit 3.2s linear infinite; }
#ripbg .rings i:nth-child(2) { left: -330px; top: -260px; width: 660px; height: 170px; animation-duration: 4.4s; animation-direction: reverse; opacity: .7; }
#ripbg .rings i:nth-child(3) { left: -520px; top: 80px; width: 1040px; height: 260px; animation-duration: 5.6s; opacity: .5; }

#rip { position: absolute; left: 50%; top: 560px; width: 0; height: 0; --c: var(--common); }

/* magic circle on the floor under the pack */
#rip .circle { position: absolute; left: -330px; top: -60px; width: 660px; height: 660px; border-radius: 50%; opacity: 0;
  transform: rotateX(72deg) scale(.6); transition: opacity .4s, transform .6s;
  background:
    radial-gradient(circle, transparent 0 38%, rgba(255,200,100,.9) 38.5% 39.3%, transparent 40%),
    radial-gradient(circle, transparent 0 46%, rgba(255,200,100,.7) 46.5% 47.5%, transparent 48%),
    repeating-conic-gradient(from 0deg, rgba(255,210,120,.85) 0 2deg, transparent 2deg 15deg),
    radial-gradient(circle, transparent 0 30%, rgba(255,180,60,.25) 31%, transparent 50%);
  -webkit-mask: radial-gradient(circle, transparent 0 28%, #000 29% 50%, transparent 51%); mask: radial-gradient(circle, transparent 0 28%, #000 29% 50%, transparent 51%);
  filter: drop-shadow(0 0 14px rgba(255,190,80,.9)); }
#rip.charge .circle { opacity: 1; transform: rotateX(72deg) scale(1); animation: spinflat 2.4s linear infinite; }

/* light streaks bursting out while charging */
#rip .streaks { position: absolute; left: -450px; top: -450px; width: 900px; height: 900px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255,240,200,.0) 0 7deg, rgba(255,240,210,.85) 7deg 7.6deg, rgba(255,240,200,0) 7.6deg 19deg);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 30%, transparent 60%); mask: radial-gradient(circle, transparent 0 22%, #000 30%, transparent 60%); }
#rip.charge .streaks { animation: streaks .5s linear infinite; opacity: 1; }

/* the real pump.fun pack */
#rip .pack { position: absolute; left: -125px; top: -224px; width: 250px; height: 447px; transform: translateY(620px) scale(.9); opacity: 1;
  transition: transform .7s cubic-bezier(.2,.9,.3,1.15), filter .3s; filter: drop-shadow(0 22px 40px rgba(0,0,0,.7)); }
#rip .pack .pack-img { width: 100%; height: 100%; border-radius: 6px; display: block; }
#rip.in .pack { transform: translateY(0) scale(1); animation: float 2.2s ease-in-out infinite; }
#rip.charge .pack { transform: translateY(-10px) scale(1.12); animation: buzz .07s linear infinite;
  filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 30px var(--c)) drop-shadow(0 0 60px var(--c)) brightness(1.25); }
#rip.burst .pack { opacity: 0; transition: opacity .05s; }

/* shards = pieces of the real pack flying apart */
#rip .shards { position: absolute; left: 0; top: 0; }
#rip .shard { position: absolute; width: 250px; height: 447px; left: -125px; top: -224px; background-size: 250px 447px;
  transition: transform 1.1s cubic-bezier(.15,.7,.3,1), opacity 1.1s ease-in; filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,255,255,.6)); }

/* full-screen white flash at the burst */
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .55s ease-out; }

/* graded slab = the real slab photos from the machine (685x1136) */
#rip .slab { position: absolute; left: -165px; top: -276px; width: 330px; height: 547px; opacity: 0;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,.7)); transform: perspective(1200px) rotateY(540deg) scale(.4); }
#rip.slabin .slab { opacity: 1; transform: perspective(1200px) rotateY(0deg) scale(1); transition: transform 1s cubic-bezier(.2,.8,.25,1), opacity .2s; }
#rip .slab img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
#rip .slab .sfront { opacity: 0; }
#rip.sil .slab .sback { opacity: 0; }
#rip.sil .slab .sfront { opacity: 1; }
#rip .slab.noimg .sback { background: radial-gradient(circle at 50% 50%, #2d5bd6 0 18%, #e8e8e8 18.5% 21%, #1d2f73 21.5% 46%, #10194a 70%); }
/* rarity silhouette over the card window of the slab, burns away from the middle */
#rip .slab .sil { position: absolute; left: 9.5%; right: 9.5%; top: 27.5%; bottom: 7.5%; border-radius: 10px; --r: 0%; opacity: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 3px, transparent 3px 11px),
    radial-gradient(ellipse 40% 18% at 30% 25%, rgba(255,255,255,.55), transparent 70%),
    radial-gradient(ellipse 35% 22% at 72% 55%, rgba(255,255,255,.45), transparent 70%),
    radial-gradient(ellipse 30% 14% at 40% 80%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(ellipse 25% 30% at 80% 15%, rgba(0,0,0,.25), transparent 70%),
    radial-gradient(ellipse 30% 20% at 20% 60%, rgba(0,0,0,.25), transparent 70%),
    var(--c);
  box-shadow: 0 0 0 3px #fff, 0 0 40px var(--c), 0 0 90px var(--c);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 6%)); mask: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 6%)); }
#rip.sil .slab .sil { opacity: 1; animation: silpulse .6s ease-in-out infinite alternate; }
#rip.burn .slab .sil { --r: 95%; transition: --r .9s ease-in; animation: none; }

/* result: "RARE PULL", gold value, card name */
#rip .result { position: absolute; left: -500px; top: -528px; width: 1000px; text-align: center; opacity: 0; transform: translateY(-14px); transition: all .45s ease; }
#rip.done .result { opacity: 1; transform: none; }
#rip .result .title { font-weight: 900; font-size: 60px; letter-spacing: .04em; color: #fff; text-shadow: 0 0 24px var(--c), 0 4px 0 #000; }
#rip .result .value { font-weight: 900; font-size: 50px; color: #ffc93d; text-shadow: 0 0 20px rgba(255,190,60,.8), 0 3px 0 #000; }
#rip .result .rname { position: absolute; left: 150px; right: 150px; top: 132px; font-weight: 700; font-size: 20px; color: #e8f0ff; text-shadow: 0 3px 0 #000, 0 0 12px #000; }
#rip.away .slab { transform: translate(-760px, -330px) scale(.2); opacity: 0; transition: transform .8s ease-in, opacity .8s ease-in; }
#rip.away .result { opacity: 0; }

@keyframes rays { from { opacity: .75; transform: translateX(-50%) rotate(-2deg) } to { opacity: 1; transform: translateX(-50%) rotate(2deg) } }
@keyframes orbit { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }
@keyframes spinflat { from { transform: rotateX(72deg) rotate(0) } to { transform: rotateX(72deg) rotate(360deg) } }
@keyframes streaks { from { transform: rotate(0) scale(.9) } to { transform: rotate(12deg) scale(1.15) } }
@keyframes float { 0%,100% { translate: 0 0 } 50% { translate: 0 -12px } }
@keyframes buzz { 0% { translate: 0 0 } 25% { translate: -2px 1px } 50% { translate: 2px -1px } 75% { translate: -1px -1px } 100% { translate: 0 0 } }
@keyframes flash { 0% { opacity: 0 } 12% { opacity: 1 } 100% { opacity: 0 } }
@keyframes silpulse { from { filter: brightness(1) } to { filter: brightness(1.35) } }

@keyframes shake { 0% { transform: translate(0,0) rotate(0) } 25% { transform: translate(-5px,2px) rotate(-2deg) } 50% { transform: translate(4px,-2px) rotate(2deg) } 75% { transform: translate(-3px,-1px) rotate(-1deg) } 100% { transform: translate(0,0) rotate(0) } }
@keyframes tearoff { to { transform: translate(140px,-180px) rotate(38deg); opacity: 0 } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0 } to { transform: translateX(-50%) scale(1); opacity: 1 } }
@keyframes pulse { from { filter: brightness(1) } to { filter: brightness(1.5) } }
@keyframes slidein { from { transform: translateX(-30px); opacity: 0 } to { transform: none; opacity: 1 } }

/* during a rip the fee meter steps aside for the pump.fun title */
#meter { transition: opacity .4s; }
#stage.ripping #meter { opacity: 0; }
#stage.ripping #winner { top: auto; bottom: 14px; }

/* watch specials on the ladder + the WATCH RIP banner (gold) */
.rung.watch { color: #ffd479; background: rgba(255,200,90,.08); box-shadow: inset 0 0 0 1px rgba(255,200,90,.35); }
.rung.watch img { opacity: .9; filter: none; }
.rung.watch.done { opacity: .55; text-decoration: line-through; }
#levelup.watch .big { color: #ffd479; text-shadow: 0 0 30px #ffb52e, 0 4px 0 #000; }
#levelup.watch img { filter: drop-shadow(0 0 30px #ffb52e); }

/* HOT SEAT */
#seat { position: absolute; left: 36px; bottom: 140px; width: 400px; padding: 12px 14px; background: var(--panel); border: 2px solid #ff7a00; border-radius: 14px; box-shadow: 0 0 0 1px #000; }
#seat .top { display: flex; align-items: center; gap: 10px; }
#seat .head { flex: 1; font-weight: 900; font-size: 17px; letter-spacing: .05em; color: #ffb054; }
#seat .timer { font-weight: 900; font-size: 30px; color: #fff; background: #ff7a00; padding: 0 12px; border-radius: 8px; min-width: 92px; text-align: center; }
#seat.hot { animation: seatpulse .5s ease-in-out infinite alternate; }
#seat.hot .timer { background: #ff2d55; }
#seat.locked { border-color: var(--green); }
#seat.locked .timer { background: var(--green); color: #04130b; font-size: 22px; padding: 4px 10px; }
#seat .rule { margin-top: 6px; font-size: 14px; color: #ffd9b0; }
#seat .rule b { color: #fff; }
#seat.locked .rule { color: #9fb; font-size: 12px; }
#seat .list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
#seat .sr { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 8px; border-radius: 6px; background: rgba(255,122,0,.12); }
#seat .sr b { flex: 1; }
#seat .sr span { color: #ffd479; font-weight: 700; }
#seat .sr i { font-style: normal; font-weight: 900; font-size: 12px; background: #ff7a00; color: #fff; padding: 1px 6px; border-radius: 5px; }
#seat .sr.empty { background: none; color: #9a9; font-style: italic; }
#seat .count { margin-top: 6px; font-size: 12px; color: #9fb; text-align: right; }
@keyframes seatpulse { from { box-shadow: 0 0 0 1px #000, 0 0 0 rgba(255,45,85,0); } to { box-shadow: 0 0 0 1px #000, 0 0 40px rgba(255,45,85,.7); } }

/* KEEP OR RISK IT */
#decide { position: absolute; right: 36px; top: 330px; width: 470px; padding: 16px 18px 14px; background: rgba(6,10,8,.92); border: 3px solid #ffd479; border-radius: 18px; text-align: center; animation: popin .4s ease; }
@keyframes popin { from { transform: scale(.7); opacity: 0 } to { transform: none; opacity: 1 } }
#decide .q { font-weight: 900; font-size: 34px; letter-spacing: .03em; color: #ffd479; }
#decide .who { font-size: 18px; margin-top: 2px; }
#decide .timer { position: absolute; top: -18px; right: 18px; border: 2px solid #111; font-weight: 900; font-size: 22px; background: #ffd479; color: #111; padding: 0 10px; border-radius: 8px; }
#decide .opts { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
#decide .keep, #decide .risk { width: 170px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#decide img { height: 150px; border-radius: 6px; }
#decide .keep b { font-size: 26px; font-weight: 900; color: #9fe; }
#decide .risk b { font-size: 26px; font-weight: 900; color: #ff7a00; }
#decide .v { font-size: 15px; font-weight: 700; }
#decide .or { font-weight: 900; font-size: 22px; color: #888; }
#decide .how { margin-top: 10px; font-size: 13px; color: #9a9; }
#decide.done.keep .keep, #decide.done.risk .risk { border-color: #ffd479; background: rgba(255,212,121,.18); transform: scale(1.06); }
#decide.done.keep .risk, #decide.done.risk .keep { opacity: .3; }

/* before LIVE: a calm lower card, the room + her stay up; no meter / pulls / best pull yet */
#soon { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); text-align: center; padding: 22px 54px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 0 60px rgba(61,255,139,.18); animation: pop .5s ease; }
#soon .k { display: inline-block; font-weight: 900; letter-spacing: .22em; font-size: 20px; color: var(--ink); background: var(--green); padding: 6px 16px; border-radius: 30px; box-shadow: 0 0 24px var(--green); animation: soonpulse 2.4s ease-in-out infinite; }
#soon .t { margin-top: 12px; font-weight: 900; font-size: 64px; letter-spacing: .01em; line-height: 1; }
#soon .t b { color: var(--green); }
#soon .s { margin-top: 10px; font-size: 22px; font-weight: 500; color: var(--mint); letter-spacing: .04em; }
@keyframes soonpulse { 50% { box-shadow: 0 0 6px var(--green); opacity: .85 } }
body[data-stage="soon"] #meter, body[data-stage="soon"] #wall, body[data-stage="soon"] #best, body[data-stage="soon"] #seat, body[data-stage="soon"] #decide { display: none; }

/* public page: clean capture, no mouse pointer on the show */
body.public { cursor: none; }
