html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #0a0114; }
body { touch-action: manipulation; font-family: Inter, system-ui, sans-serif; color: #fff; }
#game-container {
  position: relative; z-index: 1; width: 100%; height: 100%;
  background: url("assets/strip-bg.webp") center / cover no-repeat;
  display: flex; justify-content: center; overflow: hidden;
}
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }

/* ---------- Stage backdrop: lasers + equalizer ---------- */
.backdrop { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; mix-blend-mode: screen; }
.beam {
  position: absolute; bottom: -10%; width: 14vw; max-width: 90px; height: 130vh; transform-origin: 50% 100%;
  background: linear-gradient(0deg, rgba(255,79,216,.55), rgba(255,79,216,0) 85%); filter: blur(6px); opacity: .45;
}
.b1 { left: 8%; animation: sweep 6s ease-in-out infinite alternate; }
.b2 { left: 32%; background: linear-gradient(0deg, rgba(95,246,255,.5), transparent 85%); animation: sweep 7.5s ease-in-out infinite alternate-reverse; }
.b3 { right: 32%; background: linear-gradient(0deg, rgba(255,214,79,.4), transparent 85%); animation: sweep 5.5s ease-in-out infinite alternate; }
.b4 { right: 8%; animation: sweep 8s ease-in-out infinite alternate-reverse; }
@keyframes sweep { from { transform: rotate(-28deg); } to { transform: rotate(28deg); } }
.eq { position: absolute; left: 0; right: 0; bottom: 0; height: 9vh; display: flex; gap: 3px; align-items: flex-end; opacity: .35; }
.eq i { flex: 1; height: 30%; background: linear-gradient(0deg, #ff4fd8, #5ff6ff); border-radius: 3px 3px 0 0; animation: eq 1.1s ease-in-out infinite alternate; }
@keyframes eq { 0% { height: 15%; } 50% { height: 85%; } 100% { height: 35%; } }

/* ---------- Screens ---------- */
.screen {
  position: relative; z-index: 3; width: 100%; max-width: 520px; height: 100%; box-sizing: border-box;
  padding: max(4vh, env(safe-area-inset-top)) 5vw max(4vh, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, rgba(20,0,40,.25), rgba(14,0,30,.88) 40%);
  overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; animation: screenIn .35s ease-out;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } }
.top-row { display: flex; justify-content: flex-end; margin-bottom: -10px; }

.title {
  font-family: Monoton, cursive; text-align: center; font-size: clamp(34px, 11vw, 60px); line-height: 1.05;
  color: #ff4fd8; text-shadow: 0 0 8px #ff4fd8, 0 0 24px #ff00a0, 0 0 3px #fff; margin: 1vh 0;
}
.game-logo { animation: neon-flicker 3.2s steps(1, end) infinite; }
@keyframes neon-flicker {
  0%, 29%, 39%, 65%, 75%, 100% { opacity: 1; color: #ff73e3; text-shadow: 0 0 5px #fff, 0 0 10px #ff4fd8, 0 0 24px #ff00a0, 0 0 44px #ff00a088; }
  30%, 33%, 66%, 69% { opacity: .55; color: #ff4fd8; text-shadow: 0 0 2px #ff4fd8, 0 0 7px #ff00a0; }
  34%, 38%, 70%, 74% { opacity: 1; color: #fff; text-shadow: 0 0 7px #fff, 0 0 16px #5ff6ff, 0 0 30px #ff4fd8, 0 0 52px #ff00a0; }
}
.sub { text-align: center; font-family: Orbitron, sans-serif; color: #5ff6ff; text-shadow: 0 0 8px #00e5ff; letter-spacing: 2px; }
.sub.big { font-size: 20px; font-weight: 700; margin-top: 4px; }
.hint { text-align: center; font-size: 13px; opacity: .75; }
.section { font-family: Orbitron, sans-serif; color: #ffd84f; letter-spacing: 2px; font-size: 13px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: Orbitron, sans-serif; font-weight: 700; font-size: 17px; color: #fff; min-height: 54px;
  border: 2px solid #5ff6ff; border-radius: 14px; padding: 12px;
  background: linear-gradient(180deg, rgba(120,0,160,.9), rgba(40,0,70,.92));
  box-shadow: 0 0 12px #00e5ff88, inset 0 0 10px #ff4fd855; transition: transform .1s, filter .15s;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { filter: grayscale(.6) brightness(.7); }
.btn.pink { border-color: #ff4fd8; box-shadow: 0 0 14px #ff4fd8aa; }
.btn.ghost { background: rgba(0,0,0,.4); font-size: 14px; min-height: 46px; }
.btn.small { min-height: 44px; font-size: 14px; padding: 8px 12px; white-space: nowrap; }
.btn.play-now {
  min-height: 72px; font-size: clamp(21px, 6vw, 25px); border-width: 3px;
  background: linear-gradient(180deg, #ff4fd8, #8a00b8 60%, #4a0070);
  box-shadow: 0 0 24px #ff4fd8cc, inset 0 0 14px #fff5; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 40px #ff4fd8, inset 0 0 18px #fff8; } }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.icon-btn {
  background: rgba(0,0,0,.45); border: 1px solid #fff6; color: #fff; border-radius: 10px;
  min-width: 44px; min-height: 44px; font-size: 17px; padding: 0 8px;
}
.icon-btn.armed { background: #c4163a; border-color: #ff9fa9; font-family: Orbitron, sans-serif; font-size: 13px; }
input {
  font-size: 18px; padding: 12px; border-radius: 10px; border: 2px solid #ff4fd8; background: #1a0030dd;
  color: #fff; text-align: center; font-family: Orbitron, sans-serif; outline: none;
}
input:focus { box-shadow: 0 0 16px #ff4fd8; }

/* ---------- Career card ---------- */
.career { background: rgba(0,0,0,.55); border: 1px solid #ffd84f66; border-radius: 14px; padding: 10px 12px; box-shadow: inset 0 0 18px #ffd84f22; }
.career-top { display: flex; align-items: center; gap: 8px; font-family: Orbitron, sans-serif; font-size: 13px; }
.lvl { background: #ffd84f; color: #200030; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.rank { flex: 1; color: #ffd84f; letter-spacing: 1px; }
.cash { color: #9fffc8; }
.stage-title { text-align: center; font-style: italic; margin: 6px 0; color: #ffb3f0; font-size: 14px; }
.xp-bar { height: 8px; border-radius: 6px; background: #ffffff1c; overflow: hidden; }
.xp-fill { height: 100%; background: linear-gradient(90deg, #ffd84f, #ff4fd8); box-shadow: 0 0 10px #ffd84f; transition: width .8s; }

/* ---------- Mode cards ---------- */
.mode-card {
  display: flex; align-items: center; gap: 14px; text-align: left; color: #fff; padding: 12px 14px; min-height: 76px;
  border-radius: 16px; border: 2px solid #ff4fd8; background: linear-gradient(120deg, rgba(110,0,150,.9), rgba(25,0,45,.92));
  box-shadow: 0 0 14px #ff4fd866; transition: transform .1s;
}
.mode-card:active:not(:disabled) { transform: scale(.97); }
.mode-card.locked { border-color: #555; filter: grayscale(.9); opacity: .65; }
.mode-icon { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 0 8px #ff4fd8); }
.ic { width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: -0.25em; }
.ach-badge { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; margin-right: 8px; }
.shop-item.dim .ach-badge { opacity: .6; }
.mode-info { display: flex; flex-direction: column; gap: 3px; }
.mode-info b { font-family: Orbitron, sans-serif; font-size: 17px; }
.mode-info small { opacity: .85; font-size: 13px; }
.mode-info em { color: #9fffc8; font-size: 12px; font-style: normal; }

/* ---------- Gig screen ---------- */
.hud { display: flex; align-items: center; gap: 6px; font-family: Orbitron, sans-serif; font-size: 14px; }
.chip { background: rgba(0,0,0,.5); border: 1px solid #ffffff33; border-radius: 9px; padding: 7px 9px; white-space: nowrap; }
.score-chip { color: #ffd84f; }
.hud-ctrls { margin-left: auto; display: flex; gap: 4px; }
.hud-ctrls .icon-btn { min-width: 40px; padding: 0 6px; }
.top-row { gap: 6px; }
.hype { position: relative; height: 22px; border-radius: 12px; background: rgba(0,0,0,.6); border: 1px solid #ff4fd866; overflow: hidden; }
.hype-fill { height: 100%; background: linear-gradient(90deg, #ff4fd8, #ffd84f); transition: width .5s; box-shadow: 0 0 14px #ff4fd8; }
.hype-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: 1px; text-shadow: 0 1px 3px #000; }
.fire .hype-fill { background: linear-gradient(90deg, #ff6a00, #ffd84f); animation: hot .5s infinite alternate; }
.solo .hype-fill { background: linear-gradient(90deg, #5ff6ff, #ff4fd8, #ffd84f); background-size: 200%; animation: hot .3s infinite alternate, slide 1s linear infinite; }
.fire { box-shadow: inset 0 0 50px #ff6a0055; }
.solo { box-shadow: inset 0 0 70px #ff4fd877; }
@keyframes hot { to { filter: brightness(1.4); } }
@keyframes slide { to { background-position: 200% 0; } }
.timer { height: 10px; border-radius: 6px; background: #ffffff1c; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #5ff6ff, #9fffc8); transition: width .1s linear; }
.timer-fill.low { background: linear-gradient(90deg, #ff2a4f, #ff8a00); animation: hot .25s infinite alternate; }
.cat-tag { align-self: center; font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: 2px; color: #ffd84f; background: #00000088; border: 1px solid #ffd84f55; border-radius: 20px; padding: 4px 12px; }
.question {
  font-size: clamp(19px, 5.4vw, 25px); font-weight: 800; text-align: center; padding: 18px 16px;
  border-radius: 16px; background: rgba(0,0,0,.6); border: 2px solid #ff4fd8; text-shadow: 0 2px 4px #000;
  box-shadow: 0 0 20px #ff4fd855, inset 0 0 20px #ff4fd822;
}
.answers { display: flex; flex-direction: column; gap: 9px; }
.btn.answer { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; font-family: Inter, sans-serif; font-size: 17px; overflow: hidden; }
.badge { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #5ff6ff; color: #200030; font-family: Orbitron, sans-serif; font-weight: 700; }
.ans-text { flex: 1; position: relative; z-index: 1; }
.pct { position: relative; z-index: 1; font-family: Orbitron, sans-serif; color: #ffd84f; }
.btn.polled::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--poll); background: #ffd84f33; transition: width .6s; }
.btn.smashed { opacity: .25; text-decoration: line-through; transform: rotate(-1.5deg); }
.btn.right { background: linear-gradient(180deg, #19c46b, #076b37); border-color: #9fffc8; box-shadow: 0 0 26px #3fff9a; filter: none; animation: pop-in .4s; }
.btn.wrong { background: linear-gradient(180deg, #d8263f, #6b0715); border-color: #ff9fa9; filter: none; animation: wobble .35s; }
@keyframes pop-in { 50% { transform: scale(1.05); } }
@keyframes wobble { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.lifelines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.life {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 56px; color: #fff;
  border-radius: 12px; border: 1px solid #ffd84f88; background: rgba(40,20,0,.7); padding: 6px 4px;
}
.life:disabled { opacity: .35; }
.life-icon { width: 26px; height: 26px; object-fit: contain; }
.life small { font-family: Orbitron, sans-serif; font-size: 10px; letter-spacing: 1px; }
.life em { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 11px; background: #ff4fd8; border-radius: 10px; padding: 1px 6px; font-weight: 800; }
.roast {
  position: fixed; left: 50%; top: 42%; z-index: 60; transform: translate(-50%, -50%) rotate(-3deg);
  width: min(88vw, 420px); padding: 18px 20px; border-radius: 18px; text-align: center; pointer-events: none;
  background: linear-gradient(180deg, rgba(60,0,20,.95), rgba(25,0,15,.95)); border: 3px solid #ff3b5c;
  box-shadow: 0 0 30px #ff3b5ccc, inset 0 0 18px #ff3b5c55;
  animation: roast-in .35s cubic-bezier(.2,1.6,.4,1), roast-out .3s ease-in 2s forwards;
}
.roast-head { font-family: Orbitron, sans-serif; font-weight: 900; font-size: clamp(26px, 8vw, 36px); color: #ff3b5c; text-shadow: 0 0 14px #ff3b5c; letter-spacing: 2px; }
.roast-text { margin-top: 8px; font-weight: 800; font-size: clamp(18px, 5.4vw, 23px); color: #fff; line-height: 1.25; text-shadow: 0 2px 0 #000; }
@keyframes roast-in { from { transform: translate(-50%, -50%) scale(.3) rotate(-12deg); opacity: 0; } }
@keyframes roast-out { to { transform: translate(-50%, -60%) scale(.9) rotate(-3deg); opacity: 0; } }
.reaction { min-height: 22px; text-align: center; font-weight: 700; color: #ffb3f0; font-size: 15px; }
#game-container.shake { animation: wobble .35s; }

/* ---------- Shop / vault ---------- */
.cash-big { text-align: center; font-family: Orbitron, sans-serif; font-size: 24px; color: #9fffc8; text-shadow: 0 0 12px #3fff9a; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab { min-height: 44px; border-radius: 10px; border: 1px solid #5ff6ff66; background: rgba(0,0,0,.5); color: #fff; font-family: Orbitron, sans-serif; font-size: 12px; }
.tab.active { background: #5ff6ff; color: #200030; font-weight: 700; box-shadow: 0 0 14px #5ff6ff; }
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.55); border: 1px solid #ff4fd855; border-radius: 12px; padding: 10px 12px; }
.shop-item.equipped { border-color: #9fffc8; box-shadow: 0 0 12px #3fff9a55; }
.shop-item.dim { opacity: .6; }
.shop-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.shop-info b { font-size: 15px; }
.shop-info small { opacity: .8; font-size: 12px; }
.reward { color: #9fffc8; font-family: Orbitron, sans-serif; font-size: 12px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.slot { border-radius: 12px; background: rgba(0,0,0,.5); border: 1px solid #5ff6ff55; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px; text-align: center; }
.slot img { width: 85%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 0 6px #ff4fd8); }
.slot small { font-size: 10px; line-height: 1.2; opacity: .85; margin-top: 2px; }
.slot.locked img { filter: brightness(0) opacity(.45); }

/* ---------- Results ---------- */
.result-card { text-align: center; background: rgba(0,0,0,.6); border: 2px solid #ffd84f; border-radius: 16px; padding: 14px; box-shadow: 0 0 22px #ffd84f55; }
.verdict { font-family: Orbitron, sans-serif; color: #ffd84f; letter-spacing: 3px; font-weight: 700; }
.big-score { font-family: Monoton, cursive; font-size: clamp(40px, 13vw, 64px); color: #5ff6ff; text-shadow: 0 0 16px #00e5ff; }
.result-line { font-weight: 700; }
.review { font-style: italic; opacity: .85; margin: 6px 0; font-size: 14px; }
.earned { font-family: Orbitron, sans-serif; color: #9fffc8; font-size: 14px; }
.missions {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; color: #fff;
  background: rgba(10, 20, 80, .6); border: 1px solid #5ff6ff88; box-shadow: 0 0 14px #3d7bff66;
}
.missions-head { font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: 1px; color: #5ff6ff; text-align: center; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; font-size: 13px; align-items: center; }
.mission .mission-bar { grid-column: 1 / -1; }
.mission-num { font-size: 12px; color: #ffd84f; font-weight: 700; }
.mission.done { opacity: .7; }
.mission.done .mission-fill { background: linear-gradient(90deg, #9fffc8, #5ff6ff); }
.mission-bar { height: 6px; border-radius: 4px; background: #ffffff1f; overflow: hidden; }
.mission-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff4fd8, #5ff6ff); transition: width .6s; }
.missions-foot { text-align: center; font-size: 12px; color: #9fffc8; }
.pb { margin-top: 6px; font-size: 13px; color: #ffd84f; }
.pb.new { font-size: 18px; font-weight: 800; text-shadow: 0 0 10px #ffd84f; animation: pop-in .6s; }
.next-level { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #fff; text-align: center; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.55); }
.result-card .next-level { background: none; padding: 6px 0 0; margin-top: 4px; }
.level-up-line { font-family: Orbitron, sans-serif; font-weight: 800; color: #ffd84f; text-shadow: 0 0 10px #ff4fd8; }
.end-row .btn { margin: 0; font-size: 15px; }
.level-up { text-align: center; font-weight: 800; padding: 10px; border-radius: 12px; background: linear-gradient(90deg, #ffd84f, #ff4fd8); color: #200030; animation: pop-in .6s; }

/* ---------- Leaderboard ---------- */
.board { background: rgba(0,0,0,.6); border: 1px solid #ff4fd844; border-radius: 12px; padding: 10px 12px; font-family: Orbitron, sans-serif; font-size: 13px; }
.board-head { color: #ff4fd8; margin-bottom: 4px; }
.board-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #ffffff10; }
.board-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-empty { opacity: .7; padding: 4px 0; }

/* ---------- Overlays & FX ---------- */
.popup {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(circle, rgba(80,0,90,.85), rgba(5,0,15,.95)); z-index: 20; animation: fade .4s ease-out; text-align: center; padding: 20px;
}
.popup img { width: min(60vw, 260px); filter: drop-shadow(0 0 20px #ff4fd8); animation: spin 1s ease-out; }
.popup-title { font-size: clamp(24px, 8vw, 34px); }
.tap-hint { opacity: .7; animation: hot .8s infinite alternate; }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { from { transform: scale(0) rotate(-200deg); } }
.fx-layer { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.particle { position: absolute; height: auto; pointer-events: none; transform: translate(-50%, -50%); animation: rise 4.5s linear forwards; }
.particle.burst { animation: burst 1.1s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes rise { to { transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(var(--rot)); opacity: 0; } }
@keyframes burst { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(.6); opacity: 0; } }
.float-text { position: absolute; transform: translateX(-50%); font-family: Orbitron, sans-serif; font-weight: 700; font-size: 26px; color: #ffd84f; text-shadow: 0 0 12px #ff4fd8, 0 2px 0 #000; animation: floatUp 1.2s ease-out forwards; }
@keyframes floatUp { to { transform: translate(-50%, -90px) scale(1.3); opacity: 0; } }
.flash { position: fixed; inset: 0; z-index: 25; pointer-events: none; animation: flashOut .45s ease-out forwards; }
.flash.good { background: radial-gradient(circle, #3fff9a55, transparent 70%); }
.flash.bad { background: radial-gradient(circle, transparent 40%, #ff2a4f66); }
@keyframes flashOut { to { opacity: 0; } }
.toast-layer { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; width: min(92vw, 440px); pointer-events: none; }
.toast {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, #2a0045f2, #4a0060f2); border: 2px solid #ffd84f; box-shadow: 0 0 20px #ffd84f88;
  animation: toastIn .35s ease-out; transition: opacity .35s, transform .35s;
}
.toast b { font-family: Orbitron, sans-serif; color: #ffd84f; font-size: 14px; }
.toast span { font-size: 13px; }
.toast.out { opacity: 0; transform: translateY(-20px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } }

/* ---------- Relic collection ---------- */
.crate-btn {
  border-color: #ffd84f; background: linear-gradient(180deg, #ffb800, #b35a00 70%, #6b2a00); color: #fff;
  text-shadow: 0 1px 2px #000; box-shadow: 0 0 20px #ffd84faa; animation: pulse-gold 1.4s ease-in-out infinite;
}
@keyframes pulse-gold { 50% { box-shadow: 0 0 34px #ffd84f, inset 0 0 12px #fff6; } }
.teaser {
  display: flex; flex-direction: column; gap: 4px; text-align: left; color: #fff; padding: 10px 12px;
  border-radius: 12px; border: 1px dashed #ffd84f99; background: rgba(40,20,0,.6);
}
.teaser b { font-family: Orbitron, sans-serif; font-size: 12px; color: #ffd84f; letter-spacing: 1px; }
.teaser small { font-size: 13px; opacity: .9; }
.set-done { color: #9fffc8; text-shadow: 0 0 8px #3fff9a; }
.slot { border-color: color-mix(in srgb, var(--glow, #5ff6ff) 60%, transparent); box-shadow: inset 0 0 12px color-mix(in srgb, var(--glow, #5ff6ff) 30%, transparent); }
.slot-art { width: 85%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 0 6px var(--glow, #ff4fd8)); }
.relic-emoji { display: grid; place-items: center; font-size: clamp(26px, 8vw, 40px); line-height: 1; }
.slot.locked .slot-art { filter: brightness(0) opacity(.45); }
.popup { --glow: #ff4fd8; }
.popup img, .popup-art { filter: drop-shadow(0 0 20px var(--glow)); animation: spin 1s ease-out; }
.popup-art.relic-emoji { font-size: min(36vw, 160px); }
.popup .sub { color: var(--glow); text-shadow: 0 0 10px var(--glow); font-size: 20px; }
.crate-stage { min-height: 300px; display: grid; place-items: center; }
.crate {
  font-size: 130px; background: none; border: none; line-height: 1; filter: drop-shadow(0 0 24px #ffd84f);
  animation: crate-idle 1.4s ease-in-out infinite;
}
.title-screen .mini-btn.title-download { flex: 0 0 auto; height: auto; display: block; width: 100%; max-width: 300px; margin: 6px auto 0; align-self: center; text-align: center; }
.backstage-btn { margin-top: 6px; }
.backstage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.backstage-tile { min-height: 70px; font-size: 15px; margin: 0; }
.crate .ic { width: 150px; height: 150px; vertical-align: middle; }
.icon-btn .ic { width: 24px; height: 24px; vertical-align: middle; }
.chip .ic, .cash .ic, .reward .ic { width: 1.1em; height: 1.1em; }
.crate:disabled { filter: grayscale(1) opacity(.4); animation: none; }
.crate.opening { animation: crate-shake .9s ease-in forwards; }
@keyframes crate-idle { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes crate-shake {
  0%, 20%, 40%, 60% { transform: rotate(-10deg) scale(1); } 10%, 30%, 50%, 70% { transform: rotate(10deg) scale(1.08); }
  100% { transform: scale(1.7); opacity: 0; filter: brightness(3) drop-shadow(0 0 40px #fff); }
}
.reveal {
  --glow: #fff; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 16px; border-radius: 18px; border: 3px solid var(--glow); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--glow) 35%, transparent), rgba(10,0,25,.92) 70%);
  box-shadow: 0 0 30px var(--glow); animation: reveal-in .6s cubic-bezier(.2,1.6,.4,1);
}
@keyframes reveal-in { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.rarity-label { font-family: Orbitron, sans-serif; font-weight: 700; letter-spacing: 4px; color: var(--glow); text-shadow: 0 0 12px var(--glow); }
.reveal-art { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 0 18px var(--glow)); }
.reveal-art.relic-emoji { font-size: 110px; }
.reveal-name { font-size: 22px; font-weight: 800; }
.reveal-set { opacity: .8; font-size: 14px; }
.reveal-new { color: #9fffc8; font-weight: 700; }
.reveal-dupe { color: #ffd84f; font-weight: 700; }
.reveal .btn { width: 100%; margin-top: 6px; }
.r-legendary, .r-mythic { animation: reveal-in .6s cubic-bezier(.2,1.6,.4,1), hot .4s .6s infinite alternate; }

/* ---------- Venues & progression colors ---------- */
#game-container { transition: background-image .8s ease; }

/* Rotating title scenes */
.scene-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: center / cover no-repeat; opacity: 0;
  transition: opacity 1.4s ease, transform 7s linear; transform: scale(1.08);
}
.scene-layer.show { opacity: 1; transform: scale(1); }
body.scenes-on #game-container { background-image: none !important; background-color: transparent; }

/* Simplified title screen */
.title-screen { justify-content: safe center; gap: 14px; background: linear-gradient(180deg, rgba(20,0,40,.35), rgba(14,0,30,.55) 35%, rgba(14,0,30,.9) 75%); }
.how-to { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.how-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 10px 6px; border-radius: 12px; background: rgba(10,0,25,.7); border: 1px solid #ff4fd855;
  color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2;
}
.how-icon { font-size: 24px; }
.title-screen .btn.play-now { min-height: 84px; font-size: clamp(26px, 8vw, 32px); }
.play-hint { text-align: center; color: #ffffffb0; font-size: 12px; margin-top: -6px; }
.mini-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid #ffffff44; background: rgba(10,0,25,.65);
  color: #fff; font-size: 13px; font-weight: 600;
}
.mini-btn.glow { border-color: #ffd84f; box-shadow: 0 0 12px #ffd84f88; }
.mini-btn.download-btn {
  flex-basis: 100%; max-width: 280px; margin: 2px auto 0; padding: 11px 18px; font-size: 15px; font-weight: 800;
  letter-spacing: 1px; color: #eaf6ff; border: 2px solid #5ff6ff;
  background: linear-gradient(180deg, rgba(40, 90, 255, .55), rgba(10, 20, 80, .85));
  text-shadow: 0 0 6px #5ff6ff, 0 0 14px #3d7bff;
  box-shadow: 0 0 10px #3d7bff, 0 0 22px #3d7bffaa, inset 0 0 12px #5ff6ff66;
  animation: dlGlow 2s ease-in-out infinite;
}
@keyframes dlGlow { 50% { box-shadow: 0 0 16px #5ff6ff, 0 0 34px #3d7bff, inset 0 0 18px #5ff6ff99; } }
@media (prefers-reduced-motion: reduce) { .mini-btn.download-btn { animation: none; } }
.more { color: #fff; }
.more summary {
  list-style: none; text-align: center; font-size: 12px; color: #ffffffb0; cursor: pointer; padding: 6px;
}
.more summary::-webkit-details-marker { display: none; }
.more[open] { display: flex; flex-direction: column; gap: 10px; }
.install-guide {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(5,0,15,.8); padding: 20px; animation: screenIn .25s ease-out;
}
.install-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; color: #fff;
  padding: 20px; border-radius: 16px; border: 2px solid #ff4fd8; background: #1a0530; box-shadow: 0 0 30px #ff4fd888;
}
.install-ask { text-align: center; font-weight: 700; font-size: 16px; }
.device-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.device-pick .device-btn { font-size: 14px; }
.device-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px;
  border: 2px solid #ffffff44; background: rgba(255,255,255,.06); color: #fff; font-size: 18px; font-weight: 800;
}
.device-btn span { font-size: 34px; }
.device-btn.active { border-color: #5ff6ff; background: linear-gradient(180deg, #5ff6ff33, #ff4fd833); box-shadow: 0 0 18px #5ff6ffaa; }
.device-panel { display: flex; flex-direction: column; gap: 10px; }
.install-warn { font-size: 13px; padding: 10px; border-radius: 10px; background: #ffd84f22; border: 1px solid #ffd84f; line-height: 1.35; }
.install-now { min-height: 56px; font-size: 20px; }
.install-or { text-align: center; font-size: 12px; color: #ffffffb0; }
.install-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.35; }
.install-steps li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.step-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ff4fd8; font-weight: 800; font-size: 14px; }
.step-icon { flex: none; font-size: 22px; width: 26px; text-align: center; }
.install-steps b { color: #5ff6ff; }
.install-card small { color: #ffffffb0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .scene-layer { transition: opacity .6s ease; transform: none; } }
.backdrop, .game-logo, .hype, .big-score, .question { filter: hue-rotate(var(--hue, 0deg)); transition: filter 1s ease; }
.venue-banner {
  display: flex; flex-direction: column; gap: 3px; text-align: center; color: #fff; padding: 10px 12px; border-radius: 12px;
  border: 2px solid #5ff6ff; background: linear-gradient(90deg, rgba(0,40,60,.75), rgba(40,0,70,.75));
  box-shadow: 0 0 16px #5ff6ff66; filter: hue-rotate(var(--hue, 0deg));
}
.venue-banner b { font-family: Orbitron, sans-serif; font-size: 13px; letter-spacing: 1px; color: #5ff6ff; }
.venue-banner small { font-size: 13px; }
.venue-banner em { font-size: 11px; color: #ffd84f; font-style: normal; opacity: .9; }
.venue-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; color: #fff; min-height: 84px; padding: 14px;
  border-radius: 14px; border: 2px solid #5ff6ff66; background: rgba(0,0,0,.6) center / cover no-repeat;
}
.venue-card b { font-family: Orbitron, sans-serif; font-size: 16px; text-shadow: 0 2px 4px #000; }
.venue-card small { text-shadow: 0 1px 3px #000; }
.venue-card.active { border-color: #9fffc8; box-shadow: 0 0 18px #3fff9a; }
.venue-card.locked { opacity: .5; filter: grayscale(1); }
.tabs.six { grid-template-columns: repeat(3, 1fr); }
.shop-item.track { width: 100%; color: #fff; text-align: left; font-family: inherit; }
.popup-desc { max-width: 360px; font-size: 16px; opacity: .9; font-style: italic; }
.popup .venue-art { width: min(80vw, 340px); border-radius: 16px; border: 3px solid var(--glow); }

@media (prefers-reduced-motion: reduce) {
  .game-logo { animation-duration: 8s; }
  .crate, .crate-btn { animation: none; }
  .beam, .eq i, .btn.play-now { animation: none; }
  .particle { display: none; }
}
