:root {
  --purple: #9a49aa; --purple-d: #6f2c80; --blue: #0bc2cf; --green: #4bc22e; --red: #e8312f; --gold: #ffcd05;
  --side: #2a1440; --text: #2b2b2b; --muted: #777;
  --shadow3d: inset 0 -6px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Nunito', system-ui, sans-serif; font-weight: 700; color: var(--text); background: var(--bgc, #4b1f63); overflow: hidden; user-select: none; }
.hidden { display: none !important; }
h1, h2, h3, .titan { font-family: 'Titan One', 'Nunito', sans-serif; font-weight: 400; margin: 0 0 8px; letter-spacing: .3px; }
.muted { color: var(--muted); }
input, select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 3px solid #ddd; outline: none; background: #fff; color: var(--text); }
input:focus, select:focus { border-color: var(--purple); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.row.center { justify-content: center; }

/* ===== animated blacket-style background ===== */
#bg-pattern { position: fixed; inset: -160px; z-index: 0; background-color: var(--bgc, #4b1f63);
  background-image: linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%),
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%);
  background-size: 80px 80px; background-position: 0 0, 40px 40px; animation: bgmove 12s linear infinite; }
@keyframes bgmove { to { transform: translate(80px, 80px); } }

/* ===== layout ===== */
#app { position: relative; z-index: 1; display: flex; height: 100vh; }
#sidebar { width: 230px; flex-shrink: 0; background: linear-gradient(180deg, #3b1a58, var(--side)); display: flex; flex-direction: column; box-shadow: 4px 0 18px rgba(0,0,0,.35); }
.logo { font-family: 'Titan One'; font-size: 44px; color: #fff; text-align: center; padding: 18px 0 12px; cursor: pointer; text-shadow: 0 4px 0 var(--purple-d), 0 6px 14px rgba(0,0,0,.4); transition: transform .2s; }
.logo:hover { transform: scale(1.06) rotate(-2deg); }
#nav { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px; flex: 1; overflow-y: auto; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #e9dcf1; font-family: 'Titan One'; font-size: 19px; cursor: pointer; transition: background .15s, transform .15s; }
#nav a:hover { background: rgba(255,255,255,.1); transform: translateX(4px); }
#nav a.active { background: #fff; color: var(--purple); box-shadow: var(--shadow3d); }
#nav .ico { font-size: 22px; width: 28px; text-align: center; }
.side-user { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.25); color: #fff; cursor: pointer; }
.side-user b { display: block; font-size: 15px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: #c9b3d6; }
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; background: rgba(0,0,0,.18); backdrop-filter: blur(4px); }
#topbar h1 { color: #fff; font-size: 34px; margin: 0; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.token-pill { display: flex; align-items: center; gap: 8px; background: #fff; padding: 6px 16px 6px 8px; border-radius: 30px; font-family: 'Titan One'; font-size: 22px; color: var(--text); box-shadow: var(--shadow3d); }
.token-pill.bump { animation: bump .45s; } .token-pill.bump-down { animation: bumpd .45s; }
@keyframes bump { 40% { transform: scale(1.18); background: #fff6c4; } }
@keyframes bumpd { 40% { transform: scale(.92); background: #ffd9d9; } }
#page { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
.page-inner { max-width: 1250px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: pagein .35s ease-out; }
@keyframes pagein { from { opacity: 0; transform: translateY(12px); } }

/* token icon */
.tok { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd21f 40%, #e69a00); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 0 0 2px #c27c00; position: relative; vertical-align: -.12em; flex-shrink: 0; }
.tok::after { content: 'B'; position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Titan One'; font-size: .6em; color: #b06d00; font-style: normal; }
.tok.big { width: 1.3em; height: 1.3em; }
.tokv { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; white-space: nowrap; }

/* cards & buttons */
.card { background: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--shadow3d), 0 6px 16px rgba(0,0,0,.2); }
.card-title { color: var(--purple); }
.btn { font-family: 'Titan One'; font-size: 17px; border: none; border-radius: 12px; padding: 10px 18px 13px; color: #fff; background: var(--purple); box-shadow: inset 0 -5px rgba(0,0,0,.25); cursor: pointer; transition: transform .1s, filter .15s; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn:hover:not(:disabled) { transform: scale(1.05); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(2px) scale(.98); box-shadow: inset 0 -2px rgba(0,0,0,.25); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.green { background: var(--green); } .btn.blue { background: #2f9bff; } .btn.red { background: var(--red); } .btn.gray { background: #8a8a9a; } .btn.gold { background: #f5a700; }
.btn.small { font-size: 14px; padding: 7px 12px 10px; }
.btn.big { font-size: 22px; padding: 14px 28px 18px; }

/* ===== Blook art ===== */
.blook { --s: 80px; --gl: transparent; width: var(--s); height: var(--s); position: relative; flex-shrink: 0; display: block; }
.blook .bimg { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 calc(var(--s) * .035) 0 rgba(0,0,0,.22)) drop-shadow(0 0 calc(var(--s) * .08) var(--gl)); }
.blook.locked .bimg { filter: brightness(0) opacity(.35) !important; }
.blook.r-Epic { --gl: rgba(232,49,47,.55); }
.blook.r-Legendary { --gl: rgba(255,145,15,.85); }
.blook.r-Chroma .bimg { --gl: #00e5ff; animation: chromaglow 2.4s linear infinite; }
.blook.r-Mystical .bimg { --gl: #c46bff; animation: mystglow 1.8s ease-in-out infinite; }
@keyframes chromaglow { 0% { filter: drop-shadow(0 0 calc(var(--s) * .1) #ff4d4d); } 33% { filter: drop-shadow(0 0 calc(var(--s) * .1) #4dff88); } 66% { filter: drop-shadow(0 0 calc(var(--s) * .1) #4dd8ff); } 100% { filter: drop-shadow(0 0 calc(var(--s) * .1) #ff4d4d); } }
@keyframes mystglow { 0%, 100% { filter: drop-shadow(0 0 calc(var(--s) * .08) #b64cff); } 50% { filter: drop-shadow(0 0 calc(var(--s) * .2) #e0a0ff); } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.b-desc { font-style: italic; color: var(--muted); margin: 2px 0 6px; }
.rv-desc { opacity: .9; font-style: italic; max-width: 420px; text-align: center; animation: rise .6s .65s backwards; }

/* rarity text */
.rt { font-family: 'Titan One'; font-size: 14px; padding: 2px 9px; border-radius: 8px; color: #fff; display: inline-block; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.rt-Common { background: #9a9aa8; } .rt-Uncommon { background: #4bc22e; } .rt-Rare { background: #2f7bff; } .rt-Epic { background: #e8312f; } .rt-Legendary { background: #ff910f; }
.rt-Chroma { background: linear-gradient(90deg, #ff4d4d, #ffb84d, #e8e000, #4dff88, #4dd8ff, #8a4dff, #ff4de1, #ff4d4d); background-size: 200% 100%; animation: slide 2s linear infinite; }
.rt-Mystical { background: linear-gradient(90deg, #5a14a8, #b64cff, #ff9cff, #b64cff, #5a14a8); background-size: 200% 100%; animation: slide 2.5s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }

/* ===== STATS ===== */
.stats-top { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
.profile { display: flex; gap: 24px; align-items: center; background: linear-gradient(120deg, #fff 55%, #f4e8fa); }
.profile-blook { animation: float 3s ease-in-out infinite; }
.profile h2 { font-size: 36px; color: var(--purple); }
.profile-info .row { margin-top: 14px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
.daily { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.daily-gift { font-size: 56px; }
.daily.ready .daily-gift { animation: wiggle 1.2s infinite; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg) scale(1.1); } 20%, 40% { transform: rotate(14deg) scale(1.1); } }
.daily-pop { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 300; font-family: 'Titan One'; font-size: 64px; color: #fff; text-shadow: 0 5px 0 #c27c00, 0 0 30px #ffd21f; display: flex; gap: 12px; align-items: center; animation: dailypop 1.6s forwards; pointer-events: none; }
@keyframes dailypop { 0% { transform: translate(-50%, -50%) scale(0); } 25% { transform: translate(-50%, -50%) scale(1.2); } 40% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-50%, -150%) scale(1); opacity: 0; } }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-box { background: #f6f1f9; border-radius: 14px; padding: 14px; text-align: center; box-shadow: inset 0 -4px rgba(0,0,0,.08); }
.sb-ico { font-size: 28px; } .sb-val { font-family: 'Titan One'; font-size: 26px; color: var(--purple); } .sb-lbl { color: var(--muted); font-size: 14px; }
.prog-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 26px; }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c1), var(--c2)); font-size: 20px; }
.prog-name { width: 100px; font-size: 14px; }
.prog-bar { flex: 1; height: 14px; background: #eee; border-radius: 10px; overflow: hidden; }
.prog-bar div { height: 100%; border-radius: 10px; transition: width .6s; }
.prog-num { width: 44px; text-align: right; font-size: 14px; color: var(--muted); }

/* ===== PLAY ===== */
.play-hero { display: flex; justify-content: space-between; align-items: center; }
.play-hero h2 { color: var(--purple); font-size: 30px; }
.hero-blooks { display: flex; gap: 8px; } .hero-blooks .blook { animation: float 3s ease-in-out infinite; }
.hero-blooks .blook:nth-child(2) { animation-delay: .4s; } .hero-blooks .blook:nth-child(3) { animation-delay: .8s; } .hero-blooks .blook:nth-child(4) { animation-delay: 1.2s; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mode-card { position: relative; border-radius: 20px; padding: 24px 20px 20px; color: #fff; cursor: pointer; overflow: hidden; background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 8px 18px rgba(0,0,0,.3); transition: transform .2s; min-height: 230px; }
.mode-card:hover { transform: translateY(-6px) scale(1.02); }
.mode-card:hover .mode-ico { transform: scale(1.2) rotate(-8deg); }
.mode-ico { font-size: 64px; transition: transform .25s; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.mode-name { font-family: 'Titan One'; font-size: 28px; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.mode-desc { opacity: .95; margin: 6px 0 14px; }
.mode-tag { display: inline-block; background: rgba(0,0,0,.25); padding: 4px 12px; border-radius: 20px; font-size: 13px; }

/* ===== MARKET ===== */
.market-banner { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(110deg, #fff 60%, #fff4cf); }
.market-banner h2 { color: var(--purple); font-size: 28px; }
.banner-tok { font-family: 'Titan One'; font-size: 34px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 18px; }
.pack-card { position: relative; height: 230px; border-radius: 18px; overflow: hidden; cursor: pointer; color: #fff; text-align: center; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.3); transition: transform .2s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pack-card::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px); }
.pack-card:hover { transform: translateY(-8px) rotate(-1.5deg); }
.pack-card:hover .pc-emo { transform: scale(1.18) rotate(6deg); }
.pack-card.poor { filter: saturate(.55); }
.pc-emo { font-size: 78px; transition: transform .25s; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); position: relative; }
.pc-name { font-family: 'Titan One'; font-size: 21px; text-shadow: 0 3px 0 rgba(0,0,0,.3); position: relative; }
.pc-owned { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.3); border-radius: 10px; padding: 2px 8px; font-size: 13px; }
.pc-flag { position: absolute; top: 10px; right: -30px; transform: rotate(35deg); background: #b64cff; font-size: 11px; padding: 3px 32px; font-family: 'Titan One'; box-shadow: 0 0 12px #d58cff; z-index: 2; }
.pc-price { position: relative; margin-top: 10px; background: #fff; color: var(--text); padding: 4px 14px; border-radius: 20px; font-family: 'Titan One'; box-shadow: inset 0 -3px rgba(0,0,0,.15); }
.pc-shine { position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); animation: shine 4s infinite; }
.pack-card:nth-child(3n) .pc-shine { animation-delay: 1.3s; } .pack-card:nth-child(3n+1) .pc-shine { animation-delay: 2.6s; }
@keyframes shine { 0%, 70% { left: -80%; } 100% { left: 140%; } }

.market-banner { position: relative; padding-right: 80px; }
.odds-btn { position: absolute; top: 12px; right: 12px; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; font-family: 'Titan One'; font-size: 26px; color: #fff; background: linear-gradient(145deg, #b64cff, #6f2c80); box-shadow: inset 0 -5px rgba(0,0,0,.25), 0 0 0 4px #fff, 0 4px 12px rgba(0,0,0,.3); transition: transform .2s; }
.odds-btn:hover { transform: scale(1.12) rotate(-8deg); }
.market-sec { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { color: #fff; margin: 0; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.sec-timer { background: rgba(0,0,0,.3); color: #fff; padding: 6px 14px; border-radius: 20px; font-family: 'Titan One'; font-size: 15px; }
.muted-l { color: #e5d3ef; }
.pack-card.daily-pack { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px var(--sr), 0 0 24px var(--sr); }
.pc-shoprar { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 12px; z-index: 2; display: none; }
.daily-pack .pc-shoprar { display: inline-block; position: absolute; top: 10px; bottom: auto; left: auto; right: 10px; transform: none; }
.daily-pack .pc-flag { display: none; }
.odds-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.odds-row { display: grid; grid-template-columns: 44px 1fr auto 80px; grid-template-rows: auto 8px; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #f6f1f9; cursor: pointer; transition: transform .15s; }
.odds-row:hover { transform: translateX(4px); }
.odds-row.today { background: #fff6cf; box-shadow: 0 0 0 3px #ffd21f; }
.odds-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(145deg, var(--c1), var(--c2)); }
.odds-n { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.odds-today { font-family: 'Titan One'; font-size: 11px; background: #ffd21f; color: #8a5a00; padding: 2px 8px; border-radius: 8px; }
.odds-n { grid-column: span 2; }
.odds-today.season { background: #ff910f; color: #fff; } .odds-today.off { background: #ddd; color: #777; }
.odds-pct { text-align: right; display: flex; flex-direction: column; } .odds-pct b { font-family: 'Titan One'; font-size: 20px; color: var(--purple); } .odds-pct small { color: var(--muted); }
.odds-bar { grid-column: 2 / -1; height: 8px; background: #e6dcec; border-radius: 6px; overflow: hidden; } .odds-bar div { height: 100%; border-radius: 6px; }
.odds-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* pack modal */
.pm-head { display: flex; gap: 16px; align-items: center; color: #fff; padding: 16px 20px; margin: -24px -24px 16px; border-radius: 20px 20px 0 0; background: linear-gradient(150deg, var(--c1), var(--c2)); }
.modal .pm-head h2 { margin: 0; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); } .pm-head .tokv { background: #fff; color: var(--text); padding: 2px 10px; border-radius: 14px; }
.pm-emo { font-size: 60px; }
.pm-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.pm-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #f6f1f9; }
.pm-n { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pm-c { font-family: 'Titan One'; color: var(--purple); }
.pm-btns { margin-top: 16px; }

/* ===== BLOOKS ===== */
.blooks-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.blooks-list { display: flex; flex-direction: column; gap: 14px; }
.blooks-head { display: flex; justify-content: space-between; align-items: center; }
.pack-sec h3 { display: flex; align-items: center; gap: 10px; color: var(--purple); }
.pack-sec h3 small { color: var(--muted); font-family: 'Nunito'; font-size: 14px; }
.ps-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c1), var(--c2)); font-size: 20px; }
.bgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.bcell { position: relative; cursor: pointer; border-radius: 18px; padding: 4px; transition: transform .15s; border: 3px solid transparent; }
.bcell:hover { transform: scale(1.08); }
.bcell.sel { border-color: var(--purple); background: #f2e4f7; }
.cnt { position: absolute; bottom: -2px; right: -2px; background: var(--purple); color: #fff; font-size: 12px; font-family: 'Titan One'; border-radius: 10px; padding: 1px 7px; border: 2px solid #fff; }
.blook-info { position: sticky; top: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bi-empty { color: var(--muted); padding: 40px 0; }
.bi-big { padding: 10px; border-radius: 30px; }
.bi-big.glow-Legendary, .bi-big.glow-Chroma, .bi-big.glow-Mystical, .bi-big.glow-Epic { background: radial-gradient(circle, var(--rc) 0%, transparent 70%); }
.bi-big .blook { animation: float 3s ease-in-out infinite; }
.bi-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bi-rows div { display: flex; justify-content: space-between; background: #f6f1f9; padding: 8px 12px; border-radius: 10px; }
.bi-rows span { color: var(--muted); }
.bi-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* ===== BAZAAR ===== */
.bz-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bz-top input { flex: 1; min-width: 160px; }
.tabs { display: flex; background: #eee; border-radius: 12px; padding: 4px; }
.tab { font-family: 'Titan One'; border: none; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 15px; }
.tab.on { background: #fff; color: var(--purple); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.bz-info { color: #e5d3ef; text-align: center; font-size: 14px; }
.bz-list { display: flex; flex-direction: column; gap: 10px; }
.bz-row { display: grid; grid-template-columns: 62px 1.4fr 1fr 150px 90px; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: inset 0 -4px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.15); animation: pagein .3s; border-left: 6px solid #bbb; }
.r-row-Uncommon { border-left-color: #4bc22e; } .r-row-Rare { border-left-color: #2f7bff; } .r-row-Epic { border-left-color: #e8312f; } .r-row-Legendary { border-left-color: #ff910f; }
.r-row-Chroma { border-left-color: #00e5ff; background: linear-gradient(90deg, #eafcff, #fff 40%); } .r-row-Mystical { border-left-color: #b64cff; background: linear-gradient(90deg, #f6e8ff, #fff 40%); }
.bz-name { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.bz-name b { font-size: 17px; }
.bz-seller { color: var(--muted); display: flex; flex-direction: column; font-size: 14px; } .bz-seller small { font-size: 12px; opacity: .8; }
.bz-price { font-family: 'Titan One'; font-size: 19px; display: flex; flex-direction: column; }
.deal { font-family: 'Nunito'; font-size: 12px; color: #e8571c; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.lm-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 36vh; overflow-y: auto; padding: 6px; background: #f6f1f9; border-radius: 12px; }
.lm-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lm-form label { display: flex; align-items: center; gap: 10px; font-family: 'Titan One'; }
.lm-form input { width: 160px; }
#lm-sel { display: flex; align-items: center; gap: 12px; }

/* ===== LEADERBOARD ===== */
.lb-podium { display: flex; justify-content: center; align-items: flex-end; gap: 20px; padding-top: 30px; background: linear-gradient(180deg, #fff, #f4e8fa); }
.lb-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; }
.lb-pod b { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-step { width: 100%; font-family: 'Titan One'; font-size: 40px; color: #fff; text-align: center; border-radius: 12px 12px 0 0; margin-top: 6px; box-shadow: var(--shadow3d); }
.p1 .lb-step { height: 120px; background: linear-gradient(#ffd21f, #e69a00); } .p2 .lb-step { height: 90px; background: linear-gradient(#d6dbe3, #9aa3b0); } .p3 .lb-step { height: 64px; background: linear-gradient(#e7a36a, #a8642c); }
.lb-pod.me b { color: var(--purple); }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-radius: 12px; background: #f6f1f9; }
.lb-row.me { background: #ffefb0; box-shadow: 0 0 0 3px #ffd21f; }
.lb-rank { font-family: 'Titan One'; width: 40px; color: var(--purple); } .lb-name { flex: 1; }

/* ===== SETTINGS ===== */
.settings { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.settings h3 { color: var(--purple); margin-top: 10px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 50px; height: 28px; border-radius: 20px; background: #ccc; position: relative; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle input:checked + span { background: var(--green); } .toggle input:checked + span::after { left: 25px; }
.small-note { font-size: 13px; }

/* ===== MODALS & TOASTS ===== */
#modal-root { position: relative; z-index: 400; }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 5, 30, .6); display: grid; place-items: center; padding: 16px; animation: fade .2s; z-index: 400; }
.modal { position: relative; background: #fff; border-radius: 20px; padding: 24px; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow3d), 0 20px 50px rgba(0,0,0,.5); animation: pop .3s cubic-bezier(.2, 1.5, .4, 1); }
.modal.wide { width: min(760px, 100%); } .modal.small { width: min(440px, 100%); }
.modal h2 { color: var(--purple); }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.15); color: #fff; font-size: 16px; cursor: pointer; }
.modal-x:hover { background: rgba(0,0,0,.3); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.welcome { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.welcome h1 { color: var(--purple); font-size: 32px; }
.welcome-blooks { display: flex; gap: 10px; } .welcome-blooks .blook { animation: float 2.5s ease-in-out infinite; } .welcome-blooks .blook:nth-child(2) { animation-delay: .5s; }
.welcome input { width: 100%; text-align: center; font-size: 20px; }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow3d), 0 8px 20px rgba(0,0,0,.35); border-left: 6px solid var(--purple); animation: toastin .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; max-width: 380px; }
.toast.good { border-left-color: var(--green); } .toast.bad { border-left-color: var(--red); }
.toast.out { opacity: 0; transform: translateX(40px); }
@keyframes toastin { from { transform: translateX(120%); } }

/* ===================== PACK OPENING ===================== */
#open-overlay.ov { position: fixed; inset: 0; z-index: 300; overflow: hidden; display: grid; place-items: center; color: #fff; --dim: .3; }
.ov.closing { animation: fadeout .3s forwards; }
@keyframes fadeout { to { opacity: 0; } }
.ov-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--c1) 0%, var(--c2) 35%, #07020d 80%); animation: fade .4s; }
.ov-bg::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--dim); transition: opacity .2s; }
.ov-stars i { position: absolute; width: var(--sz); height: var(--sz); border-radius: 50%; background: #fff; opacity: 0; animation: mote linear infinite; box-shadow: 0 0 6px #fff; }
@keyframes mote { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-120px); } }
.rays { position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 7deg, transparent 7deg 18deg); -webkit-mask: radial-gradient(circle, #000 0%, transparent 45%); mask: radial-gradient(circle, #000 0%, transparent 45%); opacity: 0; transition: opacity .6s; animation: spin 24s linear infinite; pointer-events: none; }
.rays.r2 { animation-direction: reverse; animation-duration: 36s; background: repeating-conic-gradient(from 5deg, var(--ray) 0deg 3deg, transparent 3deg 25deg); }
.rays.on { opacity: 1; }
.ov.rainbow .rays { filter: hue-rotate(0deg); animation: spin 18s linear infinite, huefil 3s linear infinite; background: repeating-conic-gradient(from 0deg, #ff4d4d88 0deg 7deg, transparent 7deg 18deg, #4dd8ff88 18deg 25deg, transparent 25deg 36deg); }
.ov.mystic .ov-bg { background: radial-gradient(circle at 50% 50%, #b64cff 0%, #3a0a6b 35%, #07020d 80%); }
@keyframes huefil { to { filter: hue-rotate(360deg); } }
@keyframes spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.stage { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; padding: 20px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; }
.flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.ov-skip { position: absolute; bottom: 20px; right: 20px; z-index: 7; background: rgba(255,255,255,.15); color: #fff; border: 2px solid rgba(255,255,255,.4); border-radius: 20px; padding: 6px 16px; font-family: 'Titan One'; cursor: pointer; }
.ov.quake { animation: quake .6s; } .ov.quake-sm { animation: quakesm .4s; }
@keyframes quake { 10%, 50%, 90% { transform: translate(-12px, 8px) rotate(-.6deg); } 30%, 70% { transform: translate(12px, -8px) rotate(.6deg); } }
@keyframes quakesm { 25%, 75% { transform: translate(-5px, 3px); } 50% { transform: translate(5px, -3px); } }

.pack-holder { position: relative; cursor: pointer; animation: packdrop .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes packdrop { from { transform: translateY(-120vh) rotate(-25deg); } }
.pack-holder:hover .pack3d:not(.charging):not(.torn) { transform: scale(1.05) rotate(-2deg); }
.pack3d { position: relative; width: 230px; height: 330px; transition: transform .3s; filter: drop-shadow(0 0 var(--gs, 14px) var(--glow, rgba(255,255,255,.5))) drop-shadow(0 18px 20px rgba(0,0,0,.5)); animation: idlefloat 2.6s ease-in-out infinite; }
@keyframes idlefloat { 50% { transform: translateY(-10px) rotate(1.5deg); } }
.pack3d .pk-top, .pack3d .pk-body { position: absolute; left: 0; width: 100%; background: linear-gradient(160deg, var(--c1), var(--c2)); overflow: hidden; }
.pk-top { top: 0; height: 64px; border-radius: 14px 14px 0 0; transition: transform .9s cubic-bezier(.2, .7, .3, 1), opacity .9s; }
.pk-body { top: 64px; height: 266px; border-radius: 0 0 14px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform 1s cubic-bezier(.5, 0, .8, .4), opacity 1s; }
.pk-top::before, .pk-body::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 14px, transparent 14px 28px); }
.pk-body { background-position: 0 -64px; background-size: 100% 330px; } .pk-top { background-size: 100% 330px; }
.crimp { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 4px, rgba(0,0,0,.15) 4px 8px); }
.crimp.b { top: auto; bottom: 0; }
.tear-line { position: absolute; bottom: 4px; left: 8px; right: 8px; border-bottom: 3px dashed rgba(255,255,255,.6); }
.pk-emo { font-size: 110px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.3)); position: relative; }
.pk-name { font-family: 'Titan One'; font-size: 30px; text-shadow: 0 4px 0 rgba(0,0,0,.35); position: relative; }
.pk-sub { font-family: 'Titan One'; font-size: 13px; letter-spacing: 4px; opacity: .8; position: relative; margin-bottom: 14px; }
.pk-shine { position: absolute; top: 0; left: -70%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: shine 3s infinite; }
.pack3d.charging { animation: shake .09s infinite; }
@keyframes shake { 0% { transform: translate(var(--amp), 0) rotate(var(--rot)); } 25% { transform: translate(calc(var(--amp) * -1), calc(var(--amp) * .5)) rotate(calc(var(--rot) * -1)); } 50% { transform: translate(calc(var(--amp) * .6), calc(var(--amp) * -.6)) rotate(var(--rot)); } 75% { transform: translate(calc(var(--amp) * -.6), 0) rotate(calc(var(--rot) * -1)); } }
.pack3d.torn { animation: none; }
.pack3d.torn .pk-top { transform: translate(180px, -420px) rotate(70deg); opacity: 0; }
.pack3d.torn .pk-body { transform: translateY(110vh) rotate(-14deg); opacity: 0; }
.hint { font-family: 'Titan One'; font-size: 24px; text-shadow: 0 3px 0 rgba(0,0,0,.4); animation: pulse 1.2s ease-in-out infinite; transition: opacity .3s; }
.hint.gone { opacity: 0; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .75; } }
.multi-stack .ghost { position: absolute; top: 0; left: 0; filter: brightness(.7); transition: transform .4s; }
.multi-stack .g1 { transform: rotate(-6deg) translate(-14px, 6px); } .multi-stack .g2 { transform: rotate(7deg) translate(16px, 10px); }
.multi-stack .ghost.fan.g1 { transform: rotate(-16deg) translate(-70px, 10px); } .multi-stack .ghost.fan.g2 { transform: rotate(16deg) translate(70px, 10px); }
.multi-count { position: absolute; top: -18px; right: -24px; background: var(--red); font-family: 'Titan One'; font-size: 26px; padding: 4px 14px; border-radius: 20px; box-shadow: var(--shadow3d); z-index: 3; transform: rotate(10deg); }

/* particles */
.pt { position: absolute; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); border-radius: 50%; background: var(--col); box-shadow: 0 0 10px var(--col); animation: ptfly var(--dur) cubic-bezier(.1, .8, .3, 1) forwards; }
.pt.star { border-radius: 2px; transform: rotate(45deg); }
@keyframes ptfly { to { transform: translate(var(--dx), var(--dy)) scale(0) rotate(180deg); opacity: 0; } }
.cf { position: absolute; top: -30px; background: var(--col); animation: fall var(--dur) cubic-bezier(.3, .2, .6, 1) forwards; border-radius: 2px; }
@keyframes fall { to { transform: translate(var(--rx), 112vh) rotate(900deg); } }
.shock { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 8px solid var(--col); animation: shock .9s ease-out forwards; }
@keyframes shock { to { transform: scale(30); opacity: 0; border-width: 1px; } }

/* single reveal */
.reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.rv-aura { position: absolute; top: -40px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, var(--rc) 0%, transparent 65%); opacity: .55; animation: aura 2s ease-in-out infinite; pointer-events: none; }
.reveal.t0 .rv-aura { opacity: .15; }
@keyframes aura { 50% { transform: scale(1.15); opacity: .8; } }
.rv-blook { animation: blookin 1s cubic-bezier(.2, 1.4, .4, 1); position: relative; }
.rv-blook .blook { animation: float 3s ease-in-out 1s infinite; }
.reveal.t4 .rv-blook .blook, .reveal.t5 .rv-blook .blook, .reveal.t6 .rv-blook .blook { filter: drop-shadow(0 0 30px var(--rc)); }
@keyframes blookin { 0% { transform: scale(0) rotateY(0) translateY(160px); } 60% { transform: scale(1.15) rotateY(720deg) translateY(-10px); } 100% { transform: scale(1) rotateY(720deg); } }
.rv-name { font-family: 'Titan One'; font-size: 46px; text-shadow: 0 4px 0 rgba(0,0,0,.4); animation: rise .6s .4s backwards; }
.rv-rar { font-size: 26px; padding: 4px 22px; border-radius: 14px; animation: rise .6s .55s backwards, rarglow 1.5s ease-in-out 1.2s infinite; box-shadow: 0 0 20px var(--rc); }
@keyframes rarglow { 50% { box-shadow: 0 0 40px var(--rc); } }
.rv-meta { opacity: .85; animation: rise .6s .7s backwards; }
.rv-btns { display: flex; gap: 12px; margin-top: 10px; animation: rise .6s .9s backwards; flex-wrap: wrap; justify-content: center; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.new-badge { position: absolute; top: -6px; right: -50px; z-index: 3; background: #ffd21f; color: #b0004a; font-family: 'Titan One'; font-size: 26px; padding: 4px 14px; border-radius: 10px; transform: rotate(14deg); box-shadow: var(--shadow3d), 0 0 20px #ffd21f; animation: stamp .5s 1s cubic-bezier(.2, 1.8, .4, 1) backwards; }
@keyframes stamp { from { transform: rotate(14deg) scale(3); opacity: 0; } }

/* multi reveal */
.multi { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.multi-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 900px; }
.mcard { width: 140px; height: 190px; perspective: 900px; cursor: pointer; animation: deal .55s cubic-bezier(.2, 1.3, .4, 1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes deal { from { transform: translateY(70vh) rotate(30deg) scale(.4); opacity: 0; } }
.mcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.mcard:hover:not(.flipped) .mcard-inner { transform: translateY(-8px) rotate(-2deg); }
.mcard.pre .mcard-inner { animation: preshake .1s infinite; filter: drop-shadow(0 0 18px var(--rc)); }
@keyframes preshake { 50% { transform: translate(3px, -2px) rotate(2deg); } }
.mcard.flipped .mcard-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.face.back { background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 -6px rgba(0,0,0,.3), 0 0 0 4px rgba(255,255,255,.7); font-size: 56px; }
.face.back em { font-family: 'Titan One'; font-style: normal; font-size: 28px; opacity: .8; }
.face.front { transform: rotateY(180deg); background: #1c1028; border: 4px solid var(--rc); box-shadow: 0 0 22px var(--rc); padding: 8px; text-align: center; }
.face.front.t5, .face.front.t6 { background: linear-gradient(160deg, #2a1040, #10061c); }
.mc-name { font-family: 'Titan One'; font-size: 15px; line-height: 1.1; }
.mc-new { position: absolute; top: -10px; right: -10px; background: #ffd21f; color: #b0004a; font-family: 'Titan One'; font-size: 13px; padding: 2px 8px; border-radius: 8px; transform: rotate(12deg); }
.multi-sum { display: flex; gap: 16px; background: rgba(0,0,0,.35); padding: 10px 20px; border-radius: 16px; font-family: 'Titan One'; animation: rise .4s; flex-wrap: wrap; justify-content: center; align-items: center; }

/* ===================== GAMES ===================== */
.g-crypto .q-box, .g-crypto .choose h2 { font-family: 'Courier New', monospace; font-weight: 900; }


.chest-wrap { text-align: center; } .chest-wrap h2 { font-size: 40px; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.chests { display: flex; gap: 30px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.chest { width: 190px; height: 210px; background: rgba(255,255,255,.15); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s; border: 4px solid rgba(255,255,255,.3); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.chest:nth-child(2) { animation-delay: .1s; } .chest:nth-child(3) { animation-delay: .2s; }
.chest:hover:not(.open) { transform: translateY(-10px) rotate(-3deg); }
.chest:hover:not(.open) .chest-lid { animation: wiggle 1s infinite; }
.chest-lid { font-size: 100px; transition: transform .4s, opacity .4s; }
.chest-res { display: none; font-family: 'Titan One'; font-size: 22px; flex-direction: column; align-items: center; }
.chest-res span { font-size: 70px; }
.chest.open .chest-lid { display: none; } .chest.open .chest-res { display: flex; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.chest.picked { background: #fff; color: var(--text); border-color: var(--gold); box-shadow: 0 0 40px var(--gold); transform: scale(1.08); }
.chest.dim { opacity: .45; }
.cbox { width: 180px; padding: 26px 10px; background: #0f3d22; border: 3px solid #3ee87f; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: 'Courier New', monospace; font-size: 20px; color: #3ee87f; box-shadow: 0 0 20px rgba(62,232,127,.3); transition: transform .2s; animation: pop .4s backwards; }
.cbox:hover { transform: scale(1.06); box-shadow: 0 0 40px rgba(62,232,127,.6); }
.cbox-ico { font-size: 60px; }
.muted-l { opacity: .8; }
.pw-list { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pw { font-family: 'Courier New', monospace; font-weight: 900; font-size: 22px; padding: 18px 26px; border-radius: 14px; border: 3px solid #3ee87f; background: #0f3d22; color: #3ee87f; cursor: pointer; transition: transform .15s; }
.pw:hover { transform: scale(1.06); } .pw.ok { background: #3ee87f; color: #0f3d22; } .pw.no { border-color: #ff4b4b; color: #ff4b4b; animation: quakesm .3s; }
.g-race .pw.power { font-family: 'Titan One'; background: #fff; color: var(--text); border-color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 190px; }
.pw.power span { font-size: 46px; } .pw.power small { font-family: 'Nunito'; font-size: 13px; color: var(--muted); }
.terminal h2 { color: #3ee87f; }

/* fishing */
.pond { width: 100%; max-width: 760px; height: 440px; border-radius: 24px; overflow: hidden; position: relative; background: linear-gradient(#8fd8ff 0 40%, #1b6fc0 40%); box-shadow: var(--shadow3d), 0 10px 26px rgba(0,0,0,.3); animation: pop .3s; }
.pond-sky { position: absolute; inset: 0 0 60% 0; }
.rod { position: absolute; left: 30px; top: 10px; font-size: 80px; transform: scaleX(-1); }
.line { position: absolute; left: 50%; top: 20px; width: 2px; height: 0; background: #333; animation: castline 1s .2s forwards; }
@keyframes castline { to { height: 190px; } }
.bobber { position: absolute; left: calc(50% - 12px); top: -40px; font-size: 22px; animation: bob 1s .2s forwards; }
@keyframes bob { 70% { top: 166px; } 100% { top: 160px; } }
.pond.bite .bobber { animation: bitebob .2s infinite; top: 160px; }
@keyframes bitebob { 50% { top: 172px; } }
.water { position: absolute; inset: 40% 0 0 0; overflow: hidden; }
.wave { position: absolute; top: -10px; left: -50%; width: 200%; height: 30px; background: radial-gradient(circle at 20px -5px, transparent 22px, #1b6fc0 23px); background-size: 40px 30px; animation: wave 3s linear infinite; opacity: .7; }
.wave.w2 { top: -4px; animation-duration: 5s; opacity: .4; }
@keyframes wave { to { transform: translateX(40px); } }
.swim { position: absolute; top: 60%; left: -10%; font-size: 40px; animation: swim 7s linear infinite; opacity: .6; }
.swim.s2 { top: 30%; animation-duration: 10s; animation-delay: 2s; font-size: 30px; }
@keyframes swim { to { left: 110%; } }
.pond-txt { position: absolute; top: 20px; right: 24px; font-family: 'Titan One'; font-size: 26px; color: #134; }
.pond.caught .pond-txt, .pond.frenzy .pond-txt { inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; animation: fade .3s; }
.pond.frenzy { animation: huefil 1s linear infinite; }
.catch { display: flex; flex-direction: column; align-items: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.catch-e { font-size: 120px; animation: float 2s ease-in-out infinite; } .catch b { font-size: 40px; } .catch small { font-size: 22px; }

/* racing */
.race { width: 100%; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.race-track { position: relative; background: rgba(0,0,0,.25); border-radius: 18px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; transition: filter .3s; }
.race-track.frozen .lane:not(.me) { filter: hue-rotate(180deg) brightness(1.3); }
.lane { position: relative; height: 46px; background: repeating-linear-gradient(90deg, #6b4a2b 0 30px, #7d5634 30px 60px); border-radius: 10px; display: flex; align-items: center; }
.lane.me { box-shadow: 0 0 0 3px #fff; }
.lane-name { position: absolute; left: 8px; font-size: 12px; opacity: .8; z-index: 1; }
.lane-run { position: absolute; transition: left .6s cubic-bezier(.3, 1.4, .5, 1); margin-left: 4px; }
.lane-n { position: absolute; right: 8px; font-family: 'Titan One'; }
.finish-line { position: absolute; top: 10px; bottom: 10px; right: 50px; width: 14px; background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.race-q { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.g-race .q-box { padding: 18px; font-size: 26px; } .g-race .ans { padding: 18px 10px; }


/* game setup modal */
.gs-head { display: flex; gap: 16px; align-items: center; color: #fff; padding: 18px 22px; margin: -24px -24px 16px; border-radius: 20px 20px 0 0; background: linear-gradient(150deg, var(--c1), var(--c2)); }
.gs-head > span { font-size: 64px; } .gs-head h2 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); margin: 0; } .gs-head p { margin: 4px 0 0; }
.modal h3 { color: var(--purple); margin-top: 12px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.set-card { border: 4px solid transparent; background: #f6f1f9; border-radius: 14px; padding: 12px; text-align: center; cursor: pointer; transition: transform .15s; display: flex; flex-direction: column; gap: 2px; }
.set-card:hover { transform: translateY(-3px); }
.set-card.sel { border-color: var(--c); background: #fff; box-shadow: 0 0 0 3px var(--c) inset; }
.set-ico { font-size: 34px; } .set-card small { color: var(--muted); }
.seg { display: flex; gap: 8px; }
.seg-b { font-family: 'Titan One'; font-size: 16px; padding: 10px 20px; border-radius: 12px; border: none; background: #eee; color: var(--muted); cursor: pointer; }
.seg-b.on { background: var(--purple); color: #fff; box-shadow: inset 0 -4px rgba(0,0,0,.25); }


/* play page */
.play-top { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.join-card h2, .play-hero h2 { color: var(--purple); }
.join-row { display: flex; gap: 8px; margin-top: 8px; }
.join-row input { flex: 1; min-width: 0; font-family: 'Titan One'; font-size: 26px; letter-spacing: 6px; text-align: center; }
.event-banner { background: linear-gradient(90deg, #ff7b1c, #7a2bd1); color: #fff; padding: 12px 18px; border-radius: 14px; text-align: center; box-shadow: 0 0 24px rgba(255,123,28,.5); animation: pulse 2.5s ease-in-out infinite; }
.mode-card.locked { filter: grayscale(.85) brightness(.75); cursor: not-allowed; }
.mode-card.locked:hover { transform: none; }
.mode-card.event { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px #ffd23f, 0 0 30px #ff910f; }
.mode-plus { position: absolute; top: 14px; right: 14px; background: #ffd23f; color: #6b3a00; font-family: 'Titan One'; font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.mode-card { min-height: 210px; }


/* battle royale */
.bracket { display: flex; gap: 4px; justify-content: center; margin: 6px 0 14px; } .bracket span { opacity: .8; } .bracket span.me { opacity: 1; transform: scale(1.25); }
.vs { display: flex; align-items: center; justify-content: center; gap: 30px; font-family: 'Titan One'; font-size: 48px; }
.vs-name { margin: 10px 0 16px; }
.duel-hud { display: flex; justify-content: space-between; gap: 20px; width: 100%; max-width: 900px; margin-bottom: 14px; }
.dh { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.25); padding: 8px 12px; border-radius: 14px; font-family: 'Titan One'; }
.dh.opp { flex-direction: row; }
.hpbar { flex: 1; height: 16px; background: rgba(0,0,0,.4); border-radius: 8px; overflow: hidden; } .hpbar div { height: 100%; background: linear-gradient(90deg, #4bc22e, #a6f06a); transition: width .4s; }
.dh.opp .hpbar div { background: linear-gradient(90deg, #e8312f, #ff8a6a); margin-left: auto; }
.duel-q { width: 100%; display: flex; justify-content: center; }
.g-royale .g-area { flex-direction: column; }

/* café */
.cafe { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 16px; }
.cafe-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seat { background: #fff8ec; color: var(--text); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 210px; box-shadow: var(--shadow3d); animation: pop .3s; }
.seat.ready { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; }
.empty-seat { justify-content: center; font-size: 60px; opacity: .4; background: rgba(255,255,255,.2); }
.cust { font-size: 60px; } .bubble { background: #fff; border: 3px solid #ddd; border-radius: 16px; padding: 4px 12px; font-size: 28px; }
.patience { width: 100%; height: 8px; background: #eee; border-radius: 6px; overflow: hidden; } .patience div { height: 100%; background: linear-gradient(90deg, #e8312f, #ffd23f, #4bc22e); background-size: 300px 100%; transition: width .25s linear; }
.cafe-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: rgba(0,0,0,.25); border-radius: 18px; padding: 12px; flex-wrap: wrap; }
.cafe-foods { display: flex; gap: 10px; flex-wrap: wrap; } .cafe-btns { display: flex; gap: 8px; }
.food { background: #fff; color: var(--text); border-radius: 12px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.food span { font-size: 30px; } .food b { font-family: 'Titan One'; } .food small { color: var(--muted); } .food.empty { opacity: .5; background: #fdd; }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shop-item { font: inherit; border: none; border-radius: 14px; background: #f6f1f9; padding: 12px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto auto; text-align: left; cursor: pointer; gap: 0 8px; }
.shop-item span { grid-row: span 3; font-size: 36px; } .shop-item small { color: var(--muted); } .shop-item em { font-style: normal; font-family: 'Titan One'; color: #2a9a1a; }
.shop-item:disabled { opacity: .45; cursor: not-allowed; } .shop-item:hover:not(:disabled) { background: #efe2f7; }

/* factory & bees & plush & santa (shared "panel + question" layouts) */
.factory, .bees, .plush, .santa { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 12px; }
.fac-head { display: flex; justify-content: space-between; font-family: 'Titan One'; font-size: 20px; }
.fac-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.fac-slot { background: rgba(255,255,255,.95); color: var(--text); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 140px; justify-content: center; box-shadow: var(--shadow3d); }
.fac-slot.empty { background: rgba(255,255,255,.12); color: #fff; font-size: 34px; box-shadow: none; border: 3px dashed rgba(255,255,255,.3); }
.fac-q, .bee-q, .pl-q, .sw-q { width: 100%; display: flex; justify-content: center; }
.fac-q .choose h2, .bee-q .choose h2, .sw-q .choose h2 { font-size: 22px; }
.hive-scene { position: relative; height: 220px; background: linear-gradient(#9de0ff, #c8f0a0); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow3d); }
.hive-row { position: absolute; top: 14px; left: 20px; font-size: 44px; letter-spacing: 4px; }
.flower-row { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 30px; white-space: nowrap; overflow: hidden; }
.bee-swarm span { position: absolute; left: var(--x); top: var(--y); font-size: 24px; animation: buzz var(--d) ease-in-out infinite alternate; }
@keyframes buzz { 0% { transform: translate(0, 0) rotate(-10deg); } 50% { transform: translate(40px, -20px) rotate(10deg); } 100% { transform: translate(-30px, 15px) scaleX(-1); } }
.bee-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; background: rgba(0,0,0,.25); padding: 8px; border-radius: 12px; }
.pl-top { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.25); padding: 10px 16px; border-radius: 14px; font-size: 22px; }
.pl-mats { display: flex; gap: 16px; font-family: 'Titan One'; }
.pl-orders, .sw-reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; min-height: 120px; }
.pl-order, .sw-req { background: #fff; color: var(--text); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--shadow3d); animation: pop .3s; }
.pl-order.ready, .sw-req.ready { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; }
.pl-ico, .sw-kid { font-size: 46px; } .pl-need { font-size: 18px; } .sw-wish { font-size: 28px; }
.sw-sleigh { background: rgba(0,0,0,.3); padding: 10px 16px; border-radius: 14px; font-size: 26px; text-align: center; }

/* claw */
.claw-machine { position: relative; width: 100%; max-width: 640px; background: linear-gradient(#ffe0f5, #d6c8ff); border-radius: 26px; padding: 20px; box-shadow: var(--shadow3d), 0 0 0 10px #ff5ecf; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.claw-rail { position: relative; width: 100%; height: 200px; border-top: 8px solid #666; }
.claw { position: absolute; top: 0; left: 0; width: 60px; margin-left: -30px; display: flex; flex-direction: column; align-items: center; }
.claw-rope { width: 4px; height: 20px; background: #555; transition: height .7s ease-in; }
.claw.drop .claw-rope { height: 150px; }
.claw-hand { font-size: 40px; transform: rotate(180deg); }
.claw.holding .claw-hand { transform: none; }
.claw-pit { display: grid; grid-template-columns: repeat(6, 1fr); width: 100%; gap: 6px; margin-top: -40px; }
.prize { display: flex; flex-direction: column; align-items: center; color: var(--text); font-family: 'Titan One'; } .prize span { font-size: 40px; } .prize.grabbed { opacity: 0; transition: opacity .3s; }

/* kingdom */
.kingdom { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.kd-stats { display: flex; gap: 22px; background: rgba(0,0,0,.3); padding: 12px 22px; border-radius: 18px; }
.kd-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 26px; }
.kd-stat b { font-size: 14px; } .kd-bar { width: 22px; height: 80px; background: rgba(255,255,255,.2); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.kd-bar div { width: 100%; background: linear-gradient(#ffd23f, #4bc22e); transition: height .5s; }
.kd-stat.low .kd-bar div { background: #e8312f; } .kd-stat.low { animation: pulse .8s infinite; }
.kd-visitor { background: #fff; color: var(--text); border-radius: 22px; padding: 20px 30px; text-align: center; width: 100%; box-shadow: var(--shadow3d); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.kd-visitor h2 { color: var(--purple); } .kd-visitor p { font-size: 20px; } .kd-ico { font-size: 80px; }
.kd-btns { display: flex; gap: 16px; } .kd-btns .btn { flex-direction: column; min-width: 170px; } .kd-btns small { font-family: 'Nunito'; font-size: 14px; }
.kd-q { width: 100%; }

.td-side { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 120px); overflow-y: auto; }
.td-money { display: flex; justify-content: space-between; background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; font-family: 'Titan One'; }
.td-towers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.td-tw { font: inherit; border: 3px solid transparent; border-radius: 12px; background: #fff; color: var(--text); padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.td-tw span { font-size: 28px; } .td-tw small { color: #2a9a1a; font-weight: 900; } .td-tw.sel { border-color: #ffd23f; box-shadow: 0 0 12px #ffd23f; } .td-tw:disabled { opacity: .5; }
.td-info { background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px; font-size: 14px; }
.td-q .q-box { font-size: 15px; padding: 10px; } .td-q .answers { grid-template-columns: 1fr; } .td-q .ans { font-size: 14px; padding: 9px; }
.td-q .feedback { padding: 12px 20px; }

/* study */
.study-hero { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(110deg, #fff 60%, #e3f3ff); }
.study-hero h2 { color: var(--purple); font-size: 30px; } .study-hero-ico { font-size: 80px; }
.set-card.big { padding: 22px 12px; background: #fff; box-shadow: var(--shadow3d), 0 6px 16px rgba(0,0,0,.2); } .set-card.big .set-ico { font-size: 50px; } .set-card.big b { font-size: 18px; }
.study-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .study-bar h2 { margin: 0; color: var(--purple); flex: 1; }
.fc-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fc-prog { color: #fff; font-family: 'Titan One'; font-size: 18px; }
.flashcard { width: min(620px, 100%); height: 320px; perspective: 1200px; cursor: pointer; }
.fc-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; font-family: 'Titan One'; font-size: 34px; box-shadow: var(--shadow3d), 0 12px 30px rgba(0,0,0,.3); }
.fc-face small { font-family: 'Nunito'; font-size: 13px; letter-spacing: 3px; opacity: .6; }
.fc-front { background: #fff; color: var(--text); } .fc-back { background: linear-gradient(145deg, #9a49aa, #5a2bd1); color: #fff; transform: rotateY(180deg); }
.fc-hint { font-size: 13px; }
.fc-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; max-width: 600px; } .fc-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.3); } .fc-dots i.known { background: #4bc22e; } .fc-dots i.cur { box-shadow: 0 0 0 3px #fff; }
.learn { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.learn-prog { display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Titan One'; }
.lp-bar { flex: 1; height: 16px; background: rgba(0,0,0,.3); border-radius: 10px; overflow: hidden; } .lp-bar div { height: 100%; background: linear-gradient(90deg, #4bc22e, #a6f06a); transition: width .4s; }
.ans.right { background: #4bc22e !important; box-shadow: 0 0 0 4px #fff, inset 0 -8px rgba(0,0,0,.25); } .ans.wrong { background: #e8312f !important; } .ans.fade { opacity: .35; }
.learn-fb { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 16px; font-size: 18px; color: #fff; animation: pop .3s; }
.learn-fb.good { background: #2a9a1a; } .learn-fb.bad { background: #c22; }
.learn-done, .test-start { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }
.learn-done h2, .test-start h2 { color: var(--purple); }
.test { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.test-q.ok { box-shadow: var(--shadow3d), 0 0 0 4px #4bc22e; } .test-q.no { box-shadow: var(--shadow3d), 0 0 0 4px #e8312f; }
.test-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.test-opts label { display: flex; gap: 8px; align-items: center; background: #f6f1f9; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 3px solid transparent; }
.test-opts label.sel { border-color: var(--purple); } .test-opts label.right { background: #d9f7cf; border-color: #4bc22e; }
.test-grade { display: flex; align-items: center; gap: 24px; } .test-grade h2 { color: var(--purple); font-size: 40px; margin: 0; }
.grade { width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center; font-family: 'Titan One'; font-size: 70px; color: #fff; box-shadow: var(--shadow3d); }
.grade.gA { background: #4bc22e; } .grade.gB { background: #2f9bff; } .grade.gC { background: #ff910f; } .grade.gF { background: #e8312f; }

/* ===== SEASONAL PACKS & CHROMA SHOPS ===== */
.season-pack.live { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px #ffd23f, 0 0 26px #ff910f; animation: seasonpulse 2.4s ease-in-out infinite; }
@keyframes seasonpulse { 50% { box-shadow: inset 0 -8px rgba(0,0,0,.25), 0 0 0 4px #ffd23f, 0 0 40px #ff910f; } }
.season-pack.locked { filter: grayscale(.85) brightness(.7); }
.season-pack.locked:hover { transform: translateY(-3px); }
.pc-season { position: absolute; top: 10px; right: 10px; z-index: 2; font-family: 'Titan One'; font-size: 11px; padding: 3px 9px; border-radius: 10px; background: #ffd23f; color: #6b3a00; }
.season-pack.locked .pc-season { background: rgba(0,0,0,.45); color: #fff; }
.cs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.cs-item { background: #f6f1f9; border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform .15s; }
.cs-item:hover { transform: translateY(-3px); } .cs-item.own { background: #eafbe4; }
.cs-item b { font-size: 14px; } .cs-item small { color: var(--muted); font-size: 12px; }
.end-tk-note { font-size: 13px; color: var(--muted); margin-top: -6px; }

/* ===== FRIENDS & TRADING ===== */
.fr-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; } .fr-hero h2 { color: var(--purple); }
.fr-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; } .fr-code span { color: var(--muted); }
.fr-code b { font-family: 'Titan One'; font-size: 30px; letter-spacing: 4px; color: var(--purple); background: #f2e4f7; padding: 2px 14px; border-radius: 12px; }
.fr-st { font-style: normal; font-size: 13px; }
.fr-add { display: flex; gap: 8px; } .fr-add input { width: 150px; font-family: 'Titan One'; font-size: 20px; letter-spacing: 3px; text-align: center; text-transform: uppercase; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #f6f1f9; margin-top: 8px; flex-wrap: wrap; }
.fr-row.on { background: #eefbe9; }
.fr-n { flex: 1; min-width: 140px; display: flex; flex-direction: column; } .fr-n small { color: var(--muted); }
.fr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #bbb; } .fr-dot.on { background: #4bc22e; box-shadow: 0 0 6px #4bc22e; }
.fr-waves { display: flex; gap: 2px; } .fr-waves button { border: none; background: #fff; border-radius: 8px; padding: 4px 6px; cursor: pointer; font-size: 15px; } .fr-waves button:disabled { opacity: .35; cursor: default; }
.fr-waves button:hover:not(:disabled) { transform: scale(1.2); }
.fr-x { border: none; background: none; color: #c44; font-size: 16px; cursor: pointer; }
.trade-modal { width: min(900px, 100%) !important; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .trade-cols h3 { margin-top: 4px; }
.tb-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 52px; background: #f6f1f9; border-radius: 12px; padding: 6px; }
.tb-item { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 3px 8px; font-size: 12px; }
.tr-tok { display: flex; align-items: center; gap: 6px; margin: 6px 0; } .tr-tok input { width: 120px; }
.tr-search { width: 100%; margin-bottom: 6px; }
.tr-grid { display: flex; flex-wrap: wrap; gap: 4px; max-height: 210px; overflow-y: auto; background: #f6f1f9; border-radius: 12px; padding: 6px; }
.tr-bl { position: relative; border: 2px solid transparent; background: #fff; border-radius: 10px; padding: 2px; cursor: pointer; }
.tr-bl.on { border-color: var(--purple); } .tr-bl i { position: absolute; bottom: -2px; right: -2px; font-style: normal; font-size: 10px; background: #888; color: #fff; border-radius: 6px; padding: 0 4px; }
.tr-bl em { position: absolute; top: -4px; left: -4px; font-style: normal; font-size: 11px; background: var(--purple); color: #fff; border-radius: 6px; padding: 0 5px; }
.trade-wait { background: #fff6cf; border-radius: 10px; padding: 8px 12px; font-weight: 800; margin: 6px 0; }
.trade-warn { color: #c22; font-weight: 800; }
@media (max-width: 700px) { .trade-cols { grid-template-columns: 1fr; } }

/* ===== VAULT & NEW SOLO MODES ===== */
#game-root.g-snowball { --gbg: #5a8ad6; } #game-root.g-towerdoom { --gbg: #2a1050; } #game-root.g-voyage { --gbg: #1f5a7a; }
#game-root.g-imposters { --gbg: #14142a; } #game-root.g-dive { --gbg: #0a3a6a; } #game-root.g-memory { --gbg: #a0406a; }
.hud-bar.big { width: 160px; height: 14px; }
/* snowball */
.snow { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 12px; }
.snow-teams { display: flex; align-items: center; gap: 10px; justify-content: center; }
.snow-team { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.15); border: 3px solid var(--tc); border-radius: 16px; padding: 8px 14px; }
.snow-team.mine { background: rgba(255,255,255,.3); box-shadow: 0 0 18px var(--tc); }
.snow-team span { font-size: 30px; } .snow-team b { flex: 1; font-family: 'Titan One'; } .snow-team em { font-style: normal; font-family: 'Titan One'; font-size: 28px; }
.snow-vs { font-family: 'Titan One'; font-size: 22px; }
.snow-field { display: flex; justify-content: space-between; gap: 20px; background: linear-gradient(#eaf6ff, #bfe2ff); border-radius: 18px; padding: 14px; min-height: 110px; color: var(--text); }
.snow-side { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .snow-side:last-child { justify-content: flex-end; }
.snow-p { display: flex; flex-direction: column; align-items: center; font-size: 11px; } .snow-p.me small { color: var(--purple); font-weight: 900; }
.snow-q { display: flex; justify-content: center; }
/* tower of doom */
.tdoom { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.td-hud { display: flex; gap: 20px; font-family: 'Titan One'; font-size: 20px; background: rgba(0,0,0,.3); padding: 6px 18px; border-radius: 14px; }
.td-enemy { display: flex; align-items: center; gap: 16px; background: rgba(232,49,47,.18); border: 3px solid #e8312f; border-radius: 18px; padding: 10px 20px; }
.td-enemy b { font-family: 'Titan One'; font-size: 22px; } .td-enemy small { opacity: .85; }
.td-pick { margin: 0; } .td-deck { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.td-card { width: 170px; background: #fff; color: var(--text); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; box-shadow: var(--shadow3d), 0 8px 18px rgba(0,0,0,.3); }
.td-card b { font-size: 14px; }
.td-stat { width: 100%; border: none; border-radius: 10px; padding: 7px; font-family: 'Titan One'; font-size: 15px; background: #f2e4f7; color: var(--purple); cursor: pointer; transition: transform .1s; }
.td-stat:hover { transform: scale(1.05); background: var(--purple); color: #fff; }
.td-q { width: 100%; display: flex; justify-content: center; }
/* pirate's voyage */
.voyage { width: 100%; display: flex; justify-content: center; }
.vg-board { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); gap: 6px; width: min(720px, 100%); aspect-ratio: 1; }
.vg-tile { position: relative; background: #f0dca0; border-radius: 12px; display: grid; place-items: center; font-size: 28px; box-shadow: inset 0 -4px rgba(0,0,0,.2); }
.vg-tile.t-storm, .vg-tile.t-kraken { background: #8a9ab0; } .vg-tile.t-raid { background: #c4887a; } .vg-tile.t-port { background: #9ad0f0; } .vg-tile.t-start { background: #7ad65a; } .vg-tile.t-chest { background: #ffd23f; } .vg-tile.t-whirl { background: #6ab8e0; }
.vg-tile.here { box-shadow: 0 0 0 4px #fff, 0 0 18px #ffd23f; }
.vg-ship { position: absolute; top: -10px; right: -8px; animation: float 1.6s ease-in-out infinite; }
.vg-center { grid-row: 2 / 6; grid-column: 2 / 6; background: rgba(10,40,70,.6); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; overflow: hidden; }
.vg-dice { font-family: 'Titan One'; font-size: 34px; min-height: 40px; } .vg-msg { font-weight: 900; } .vg-ups { font-size: 12px; opacity: .8; }
.vg-q { width: 100%; } .vg-q .q-box { font-size: 15px; padding: 8px; } .vg-q .ans { font-size: 13px; padding: 8px; } .vg-q .choose h2 { font-size: 18px; } .vg-q .opt { width: 120px; padding: 8px; } .vg-q .opt-ico { font-size: 28px; }
/* imposters */
.imp { width: 100%; max-width: 940px; display: flex; flex-direction: column; gap: 10px; }
.imp-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.imp-role { background: #2a6ad6; padding: 6px 14px; border-radius: 12px; font-weight: 900; } .imp-role.bad { background: #c4102f; }
.imp-tasks { display: flex; align-items: center; gap: 8px; } .imp-tasks i { background: #4bff7a !important; }
.imp-meet { background: rgba(232,49,47,.3); padding: 4px 12px; border-radius: 10px; font-family: 'Titan One'; }
.imp-crew { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: rgba(255,255,255,.06); border-radius: 16px; padding: 10px; }
.imp-c { display: flex; flex-direction: column; align-items: center; font-size: 11px; width: 74px; position: relative; } .imp-c.me small { color: #ffd23f; font-weight: 900; }
.imp-c.out { opacity: .35; } .imp-c em { font-style: normal; font-size: 10px; color: #ff9a9a; }
.imp-clues { background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; max-height: 120px; overflow-y: auto; }
.imp-q { display: flex; justify-content: center; }
/* deep dive */
.dive { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.dv-sea { position: relative; height: 200px; border-radius: 20px; overflow: hidden; background: linear-gradient(#1aa5e0, #0a3a6a); box-shadow: var(--shadow3d); }
.dv-sea::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--dark); pointer-events: none; }
.dv-diver { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); animation: float 2.4s ease-in-out infinite; z-index: 1; } .dv-diver span { position: absolute; top: 4px; right: -10px; font-size: 24px; }
.dv-depth { position: absolute; top: 10px; left: 14px; font-family: 'Titan One'; font-size: 26px; z-index: 1; }
.dv-bub { position: absolute; bottom: -10px; color: #bfeeff; animation: bubble 3.5s linear infinite; z-index: 1; } @keyframes bubble { to { transform: translateY(-230px); opacity: 0; } }
.dv-hud { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.3); padding: 8px 14px; border-radius: 14px; font-weight: 900; }
.dv-msg { text-align: center; font-weight: 900; min-height: 22px; }
.dv-q { display: flex; justify-content: center; } .dv-q .opt { width: 160px; }
/* memory match */
.memory { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mm-head { font-family: 'Titan One'; font-size: 20px; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.mm-card { height: 120px; perspective: 800px; cursor: pointer; }
.mm-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s; }
.mm-card.flip .mm-in, .mm-card.done .mm-in { transform: rotateY(180deg); }
.mm-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; box-shadow: inset 0 -5px rgba(0,0,0,.2); }
.mm-back { background: linear-gradient(145deg, #ff9a3a, #c4307a); font-size: 40px; }
.mm-front { transform: rotateY(180deg); background: #fff; color: var(--text); font-weight: 900; font-size: 14px; } .mm-front.a { background: #eafbe4; }
.mm-front small { font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.mm-card.done .mm-front { box-shadow: 0 0 0 4px #4bc22e; opacity: .7; }

/* ===== SECRETS ===== */
.rt-Secret { background: #111; color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #111; animation: secrettag 2.4s ease-in-out infinite; }
@keyframes secrettag { 50% { background: #fff; color: #111; box-shadow: inset 0 0 0 2px #111, 0 0 0 2px #fff; } }
/* Secrets: a solid two-tone outline (white inside, black outside) that slowly swaps — nothing else looks like it */
.blook.r-Secret { --o: max(1.5px, calc(var(--s) * .024)); --no: calc(var(--o) * -1); }
.blook.r-Secret .bimg { animation: secretline 2.4s ease-in-out infinite; }
@keyframes secretline {
  0%, 100% { filter: drop-shadow(var(--o) 0 0 #fff) drop-shadow(var(--no) 0 0 #fff) drop-shadow(0 var(--o) 0 #fff) drop-shadow(0 var(--no) 0 #fff) drop-shadow(var(--o) 0 0 #000) drop-shadow(var(--no) 0 0 #000) drop-shadow(0 var(--o) 0 #000) drop-shadow(0 var(--no) 0 #000) drop-shadow(0 0 calc(var(--s) * .06) rgba(255,255,255,.55)); }
  50% { filter: drop-shadow(var(--o) 0 0 #000) drop-shadow(var(--no) 0 0 #000) drop-shadow(0 var(--o) 0 #000) drop-shadow(0 var(--no) 0 #000) drop-shadow(var(--o) 0 0 #fff) drop-shadow(var(--no) 0 0 #fff) drop-shadow(0 var(--o) 0 #fff) drop-shadow(0 var(--no) 0 #fff) drop-shadow(0 0 calc(var(--s) * .12) rgba(255,255,255,.8)); }
}
.secrets-sec { background: linear-gradient(135deg, #1b1424, #2a2010); color: #fff; }
.secrets-sec h3 { color: #ffd700 !important; } .secrets-sec h3 small { color: #c9b98a !important; }
.secret-hint { color: #c9b98a; font-size: 13px; margin: -4px 0 8px; }
.secret-ico { background: linear-gradient(145deg, #3a3020, #000) !important; }
.secret-odds { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #fff6c0; background: rgba(255,215,0,.08); border: 1px solid rgba(255,215,0,.25); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; }
.secret-odds b { color: #ffd700; }
.secret-note { background: #2a2010 !important; color: #ffd700 !important; }
.secret-q { width: 70px; height: 70px; border-radius: 16px; background: #000; color: #ffd700; font-family: 'Titan One'; font-size: 38px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #5a4a00, 0 0 12px rgba(255,215,0,.35); }
.secret-q.big { width: 150px; height: 150px; font-size: 80px; }
.secret-banner { font-family: 'Titan One'; font-size: 30px; color: #ffd700; text-shadow: 0 0 20px #ffd700, 0 3px 0 #000; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1), pulse 1.2s 1s infinite; }
.ov.secret .ov-bg { background: radial-gradient(circle at 50% 50%, #5a4a00 0%, #1b1408 40%, #000 80%); }
.ov.secret .rays { --ray: rgba(255,215,0,.5) !important; }
.res-item.t7, .face.front.t7 { background: linear-gradient(160deg, #2a2010, #000); }

/* ===== MY SETS ===== */
.set-card { position: relative; }
.set-mine { position: absolute; top: 6px; right: 6px; font-size: 9px; font-family: 'Titan One'; background: var(--c); color: #fff; padding: 1px 6px; border-radius: 6px; }
.set-new { border: 3px dashed #c9b3d6 !important; background: #fff !important; color: var(--purple); }
.sets-hero { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; } .sets-hero h2 { color: var(--purple); }
.myset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.myset { border-top: 8px solid var(--c); display: flex; flex-direction: column; gap: 12px; }
.ms-top { display: flex; gap: 12px; align-items: center; } .ms-top b { display: block; font-size: 18px; } .ms-top small { color: var(--muted); }
.ms-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--c); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; box-shadow: inset 0 -4px rgba(0,0,0,.2); }
.ms-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.se-head { border-top: 8px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.se-title { display: flex; align-items: center; gap: 12px; } .se-big { font-size: 40px; }
.se-title input { flex: 1; font-family: 'Titan One'; font-size: 24px; }
.se-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .se-pick > span { font-family: 'Titan One'; color: var(--purple); width: 50px; }
.se-icon { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; border: 2px solid #eee; background: #fff; cursor: pointer; } .se-icon.on { border-color: var(--purple); background: #f2e4f7; }
.se-color { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px #ddd; } .se-color.on { box-shadow: 0 0 0 3px var(--purple); }
.se-qs { display: flex; flex-direction: column; gap: 10px; }
.se-q { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.se-qn { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; font-family: 'Titan One'; display: grid; place-items: center; flex-shrink: 0; }
.se-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.se-qtext { font-weight: 800; font-size: 16px; }
.se-ans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .se-ans input { min-width: 0; } .se-in.ok { border-color: #4bc22e; background: #f2fbef; }
.se-opt { display: flex; align-items: center; gap: 6px; border: 3px solid #f0d6d6; border-radius: 12px; padding: 3px 3px 3px 4px; background: #fff7f7; min-width: 0; }
.se-opt.ok { border-color: #4bc22e; background: #f2fbef; }
.se-opt input { flex: 1; min-width: 0; border: none; background: transparent; padding: 7px 6px; }
.se-tick { width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 8px; background: #e8a0a0; color: #fff; font-weight: 900; cursor: pointer; font-size: 14px; }
.se-opt.ok .se-tick { background: #4bc22e; }
.se-cnt { color: var(--muted); font-size: 12px; }
.se-del { border: none; background: none; font-size: 20px; cursor: pointer; opacity: .6; } .se-del:hover { opacity: 1; }
.se-bar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); padding: 12px 16px; border-radius: 16px; }
.se-bar .muted-l { flex: 1; font-size: 13px; }
#bulk-text { width: 100%; font: 14px 'Courier New', monospace; padding: 10px; border-radius: 10px; border: 3px solid #ddd; resize: vertical; }
.lb-bl { color: var(--muted); font-size: 13px; margin-right: 10px; }

/* ===== ADMIN PLAYERS ===== */
.ad-panel[data-key=players] { grid-column: 1 / -1; }
.pl-admin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.pla-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px 8px; color: #fff; cursor: pointer; text-align: left; font: inherit; }
.pla-row:hover { background: rgba(255,255,255,.15); }
.pla-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pla-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .pla-n small, .pla-s small { font-size: 10px; opacity: .7; }
.pla-s { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
.pe-head { display: flex; align-items: center; gap: 10px; } .pe-head b { display: block; } .pe-head small { opacity: .7; font-size: 11px; }
.pe-tok { font-family: 'Titan One'; font-size: 18px; margin-right: 6px; }
#pe-amt { max-width: 110px; }
.pe-owned { max-height: 200px; }
.pe-bl { position: relative; display: inline-flex; flex-direction: column; align-items: center; padding: 2px; }
.pe-bl i { position: absolute; top: 0; right: 0; font-style: normal; font-size: 10px; background: #9a49aa; border-radius: 6px; padding: 0 4px; }
.pe-bl button { border: none; width: 18px; height: 16px; font-size: 11px; line-height: 1; cursor: pointer; border-radius: 4px; position: absolute; bottom: 0; }
.pe-minus1 { left: 0; background: #e8312f; color: #fff; } .pe-plus1 { right: 0; background: #4bc22e; color: #fff; }

/* ===== BACKGROUND SETTINGS ===== */
body.no-pattern #bg-pattern { background-image: none; animation: none; }
.bg-swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bg-sw { width: 42px; height: 42px; border-radius: 12px; border: 3px solid #fff; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px #ddd, inset 0 -4px rgba(0,0,0,.25); transition: transform .15s; }
.bg-sw:hover { transform: scale(1.1); } .bg-sw.on { box-shadow: 0 0 0 3px var(--purple), inset 0 -4px rgba(0,0,0,.25); transform: scale(1.1); }
.bg-custom { display: flex; align-items: center; gap: 6px; cursor: pointer; font-family: 'Titan One'; color: var(--purple); }
.bg-custom input { width: 46px; height: 42px; padding: 2px; border-radius: 12px; cursor: pointer; }
.sec-timer.pass { background: #4bc22e; }

/* ===== BULK OPENING ===== */
.qty-quick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; width: 100%; }
.qty-custom { display: flex; gap: 8px; align-items: center; justify-content: center; width: 100%; font-family: 'Titan One'; }
.qty-custom input { width: 90px; text-align: center; font-family: 'Titan One'; font-size: 18px; padding: 6px; }
.pm-btns { flex-direction: column; }
.boost-note { background: #eafbe4; color: #2a7a1a; border-radius: 10px; padding: 6px 12px; font-size: 13px; }
.boost-badge { display: block; font-size: 14px; background: #4bc22e; color: #fff; border-radius: 10px; padding: 2px 10px; margin-top: 4px; text-align: center; }
.stage { max-height: 100vh; overflow-y: auto; }
.batch-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; font-family: 'Titan One'; background: rgba(0,0,0,.35); padding: 8px 18px; border-radius: 16px; }
.batch-head span { font-family: 'Nunito'; opacity: .85; }
.batch-bar { width: 160px; height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; } .batch-bar div { height: 100%; background: #4bff7a; }
.multi-grid.small { gap: 10px; max-width: 980px; }
.multi-grid.small .mcard { width: 100px; height: 138px; animation-delay: calc(var(--i) * 35ms); }
.multi-grid.small .face.back { font-size: 38px; } .multi-grid.small .face.back em { font-size: 20px; }
.multi-grid.small .mc-name { font-size: 11px; } .multi-grid.small .rt { font-size: 10px; padding: 1px 6px; }
.res-title { font-size: 40px; text-shadow: 0 4px 0 rgba(0,0,0,.4); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.res-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1000px; max-height: 52vh; overflow-y: auto; padding: 6px; }
.res-item { position: relative; width: 100px; background: #1c1028; border: 3px solid var(--rc); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 0 14px var(--rc); animation: deal .4s backwards; animation-delay: calc(var(--i) * 25ms); }
.res-item b { font-family: 'Titan One'; font-size: 18px; } .res-item small { font-size: 11px; text-align: center; line-height: 1.1; opacity: .85; }
.res-item em { position: absolute; top: -8px; right: -6px; font-style: normal; background: #ffd23f; color: #b0004a; font-family: 'Titan One'; font-size: 11px; padding: 1px 6px; border-radius: 6px; transform: rotate(10deg); }
.res-item.t0, .res-item.t1 { box-shadow: none; }

/* ===== ADMIN BAR ===== */
.top-right { display: flex; align-items: center; gap: 10px; }
.admin-toggle { width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); font-size: 20px; cursor: pointer; transition: transform .2s, background .2s; }
.admin-toggle:hover { transform: rotate(-20deg) scale(1.08); } .admin-toggle.on { background: #ffd23f; }
#admin-bar { background: #1c0f2a; border-bottom: 3px solid #ffd23f; padding: 12px 26px 16px; color: #fff; animation: adin .25s ease-out; max-height: 60vh; overflow-y: auto; }
@keyframes adin { from { transform: translateY(-12px); opacity: 0; } }
.ad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .ad-head b { font-family: 'Titan One'; font-size: 20px; color: #ffd23f; } .ad-head small { opacity: .6; flex: 1; }
.ad-x { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.ad-cmd { display: flex; align-items: center; gap: 8px; background: #0b0614; border: 2px solid #ffd23f; border-radius: 14px; padding: 6px 8px 6px 14px; box-shadow: 0 0 18px rgba(255,210,63,.25); }
.ad-cmd.shake { animation: quakesm .35s; border-color: #e8312f; }
.ad-prompt { font-family: 'Titan One'; color: #ffd23f; font-size: 22px; }
.ad-cmd input { flex: 1; min-width: 0; background: transparent; border: none; color: #fff; font-family: 'Courier New', monospace; font-weight: 900; font-size: 18px; padding: 6px 2px; }
.ad-cmd input:focus { border: none; }
.ad-eye { background: none; border: none; cursor: pointer; font-size: 16px; opacity: .7; }
.ad-log { min-height: 8px; margin: 6px 4px; font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 1px; }
.ad-log .ok { color: #8dff7a; } .ad-log .err { color: #ff8a8a; }
.ad-tools-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-tool { font-size: 12px; padding: 3px 10px; border-radius: 10px; background: rgba(255,255,255,.08); color: #aaa; display: inline-flex; align-items: center; gap: 4px; }
.ad-tool.on { background: rgba(75,194,46,.25); color: #b8ffa8; }
.ad-buffs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; background: rgba(255,255,255,.05); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.ad-buffs > b { font-family: 'Titan One'; font-weight: 400; color: #ffd23f; margin-right: 4px; }
.ad-buff { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(90deg, #4bc22e, #2f9bff); padding: 4px 4px 4px 12px; border-radius: 16px; font-size: 13px; font-weight: 800; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.ad-buff button { border: none; background: rgba(0,0,0,.3); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 10px; }
.ad-none { opacity: .55; font-size: 13px; }
.ad-help { font-size: 12px; opacity: .75; line-height: 1.6; } .ad-help code, .ad-head code { background: rgba(255,255,255,.12); padding: 0 5px; border-radius: 4px; color: #ffd23f; }
.rarity-seg { flex-wrap: wrap; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ad-season { flex-wrap: wrap; }
.ad-panel { background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ad-panel.open { border-color: #4bc22e; } .ad-panel.shake { animation: quakesm .35s; border-color: #e8312f; }
.ad-panel h4 { margin: 0; font-family: 'Titan One'; font-weight: 400; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.ad-ok { font-family: 'Nunito'; font-size: 10px; background: #4bc22e; padding: 1px 7px; border-radius: 6px; } .ad-lockico { margin-left: auto; }
.ad-lock, .ad-change { display: flex; gap: 6px; } .ad-lock input, .ad-change input { flex: 1; min-width: 0; padding: 7px 10px; border-width: 2px; }
.ad-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ad-row input, .ad-row select { flex: 1; min-width: 80px; padding: 6px 8px; border-width: 2px; }
#ad-qty { width: 64px; flex: none; min-width: 0; }
.ad-chip { border: none; border-radius: 10px; background: rgba(255,210,63,.2); color: #ffd23f; font-family: 'Titan One'; padding: 5px 10px; cursor: pointer; } .ad-chip:hover { background: rgba(255,210,63,.35); }
.ad-note { font-size: 12px; opacity: .75; display: flex; align-items: center; gap: 6px; } .ad-note input { width: 60px; padding: 4px; }
.ad-blooks { display: flex; flex-wrap: wrap; gap: 4px; max-height: 150px; overflow-y: auto; background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px; }
.ad-bl { position: relative; border: none; background: none; padding: 2px; cursor: pointer; border-radius: 8px; opacity: .55; } .ad-bl.own { opacity: 1; } .ad-bl:hover { background: rgba(255,255,255,.15); opacity: 1; }
.ad-bl i { position: absolute; bottom: 0; right: 0; font-style: normal; font-size: 10px; background: #9a49aa; border-radius: 6px; padding: 0 4px; }
.ad-seasons { display: flex; flex-direction: column; gap: 6px; }
.ad-season { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .ad-season span { display: flex; flex-direction: column; font-size: 14px; } .ad-season small { opacity: .6; font-size: 11px; } .ad-season small.live { color: #4bff7a; opacity: 1; }
.ad-seg { display: flex; background: rgba(0,0,0,.3); border-radius: 8px; padding: 2px; } .ad-seg button { border: none; background: none; color: #ccc; font-size: 11px; padding: 4px 7px; border-radius: 6px; cursor: pointer; font-weight: 800; } .ad-seg button.on { background: #ffd23f; color: #3a2a00; }
.ad-foot { display: flex; gap: 12px; margin-top: auto; } .ad-link { background: none; border: none; color: #c9b3d6; font-size: 12px; cursor: pointer; padding: 0; } .ad-link:hover { color: #fff; }
@media (max-width: 1000px) { .ad-grid { grid-template-columns: 1fr; } #admin-bar { padding: 10px 16px; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-top, .blooks-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-list { grid-template-columns: 1fr; }
  .blook-info { position: static; order: -1; }
  .bz-row { grid-template-columns: 56px 1fr auto; } .bz-seller { display: none; } .bz-row .btn { grid-column: 3; }
  .g-main { flex-direction: column; }
  .pm-list { grid-template-columns: 1fr; }
  .play-top { grid-template-columns: 1fr; }
  .td { flex-direction: column; } .td-side { width: 100%; max-height: none; }
  .fac-grid { grid-template-columns: repeat(3, 1fr); } .cafe-seats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .seat { min-height: 160px; padding: 8px; } .cust { font-size: 40px; }
  .test-opts { grid-template-columns: 1fr; } .lc-code { font-size: 44px; }
}
@media (max-width: 700px) {
  #app { flex-direction: column-reverse; }
  #sidebar { width: 100%; flex-direction: row; } .logo, .side-user { display: none; }
  #nav { flex-direction: row; padding: 4px; overflow-x: auto; } #nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; } #nav a:hover { transform: none; }
  #topbar { padding: 10px 16px; } #topbar h1 { font-size: 24px; }
  #page { padding: 14px 16px 30px; }
  .profile { flex-direction: column; text-align: center; } .play-hero .hero-blooks { display: none; }
  .answers { grid-template-columns: 1fr; } .ans { padding: 16px; font-size: 20px; } .q-box { font-size: 22px; padding: 18px; }
  .chest { width: 100px; height: 130px; } .chest-lid { font-size: 60px; } .chest-res span { font-size: 40px; } .chest-res { font-size: 15px; }
  .pod { width: 100px; } .end h1 { font-size: 36px; }
  .pack3d { transform: scale(.85); }
  .mcard { width: 100px; height: 140px; } .mcard .blook { --s: 56px !important; }
}

/* =====================================================================
   GAME SHELL — full-screen, immersive game experience (all modes)
   ===================================================================== */
#game-root.gx { position: fixed; inset: 0; z-index: 200; color: #fff; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #120a20; --m1: #9a49aa; --m2: #2a1450; }
#game-root.hidden { display: none; }
/* themed animated backdrop */
.gx-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--m1) 75%, transparent) 0, transparent 52%), radial-gradient(circle at 90% 95%, color-mix(in srgb, var(--m1) 45%, transparent) 0, transparent 50%), linear-gradient(165deg, color-mix(in srgb, var(--m2) 85%, #000) 0%, #0b0616 100%); }
.gx-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%), linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%); background-size: 80px 80px; background-position: 0 0, 40px 40px; animation: bgmove 14s linear infinite; }
.gx-blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .35; background: var(--m1); animation: blobdrift 22s ease-in-out infinite alternate; }
.gx-blob.b1 { top: -18vmax; left: -12vmax; } .gx-blob.b2 { bottom: -22vmax; right: -14vmax; background: color-mix(in srgb, var(--m1) 50%, #fff); opacity: .18; animation-duration: 28s; }
@keyframes blobdrift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.gx-floaters span { position: absolute; bottom: -80px; opacity: .16; animation: floatup linear infinite; filter: saturate(.8); }
@keyframes floatup { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(-115vh) rotate(200deg); } }
/* top HUD */
.gx-top { position: relative; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(10,5,25,.42); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.1); }
.gx-mode { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gx-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(145deg, var(--m1), var(--m2)); box-shadow: inset 0 -4px rgba(0,0,0,.25), 0 0 16px color-mix(in srgb, var(--m1) 60%, transparent); }
.gx-mode b { display: block; font-family: 'Titan One'; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gx-mode small { display: block; opacity: .7; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-clock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gx-clock .g-timer { font-family: 'Titan One'; font-size: 26px; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.gx-clock.untimed .g-timer { font-size: 16px; opacity: .85; }
.gx-clock-bar { width: 220px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; } .gx-clock-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #4bff7a, #ffd23f); transition: width .25s linear; }
.gx-clock.low .g-timer { color: #ff6b6b; animation: pulse .5s infinite; } .gx-clock.low .gx-clock-bar i { background: #ff4b4b; }
.gx-me { justify-self: end; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 4px 10px 4px 4px; transition: background .3s; }
.gx-me small { display: block; font-size: 11px; opacity: .75; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gx-me b { font-family: 'Titan One'; font-size: 19px; white-space: nowrap; }
.gx-me.up { animation: meup .6s; } .gx-me.down { animation: medown .6s; }
@keyframes meup { 30% { background: rgba(75,194,46,.7); transform: scale(1.06); } } @keyframes medown { 30% { background: rgba(232,49,47,.7); transform: scale(.96); } }
.gx-rank { font-family: 'Titan One'; padding: 3px 10px; border-radius: 10px; background: rgba(255,255,255,.2); }
.gx-rank.r1 { background: linear-gradient(#ffe15a, #e8a800); color: #4a3000; } .gx-rank.r2 { background: linear-gradient(#eef1f6, #a8b0bd); color: #333; } .gx-rank.r3 { background: linear-gradient(#f0b07a, #b0702e); color: #3a1a00; }
.gx-btns { display: flex; gap: 6px; }
.gx-b { width: 42px; height: 42px; border: none; border-radius: 13px; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s, transform .15s; }
.gx-b:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); } .gx-b.danger { background: #e8312f; }
/* stage */
.g-main { position: relative; z-index: 2; min-height: 0; display: flex; padding: clamp(10px, 2.2vh, 24px) clamp(10px, 2vw, 28px); transition: padding .3s; }
.g-area { flex: 1; display: flex; min-width: 0; min-height: 0; overflow: auto; }
.g-area > * { margin: auto; }
.g-area > .cv-col, .g-area > .td, .g-area > .race { margin: 0; }
/* leaderboard drawer */
.g-board { position: absolute; z-index: 12; top: 78px; right: 12px; bottom: 12px; width: 290px; display: flex; flex-direction: column; background: rgba(14,8,30,.78); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 12px; transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.3, 1.2, .5, 1); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.g-board.open { transform: none; }
@media (min-width: 1100px) { .gx:has(.g-board.open) .g-main { padding-right: 320px; } }
.board-title { display: flex; justify-content: space-between; align-items: center; font-family: 'Titan One'; font-size: 18px; margin-bottom: 8px; }
.board-x { border: none; background: rgba(255,255,255,.12); color: #fff; width: 28px; height: 28px; border-radius: 9px; cursor: pointer; }
.board-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.pl { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 14px; padding: 6px 8px; transition: background .3s; }
.pl.me { background: #fff; color: var(--text); box-shadow: 0 0 0 3px #ffd23f; }
.pl.done { opacity: .6; }
.pl-rank { font-family: 'Titan One'; width: 24px; text-align: center; } .pl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .pl-score { font-family: 'Titan One'; font-size: 14px; white-space: nowrap; }
.mv { font-style: normal; font-size: 10px; margin-left: 4px; } .mv.up { color: #4bff7a; } .mv.dn { color: #ff6b6b; } .pl.me .mv.up { color: #1f9a1f; }
/* event feed */
.g-feed { position: absolute; z-index: 15; top: 80px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(560px, 92vw); }
.feed-item { background: rgba(14,8,30,.85); backdrop-filter: blur(8px); padding: 9px 18px; border-radius: 16px; animation: feedin .35s cubic-bezier(.2, 1.5, .4, 1); transition: opacity .5s, transform .5s; box-shadow: 0 8px 20px rgba(0,0,0,.35); text-align: center; font-weight: 800; }
.feed-item.good { background: linear-gradient(90deg, #2a9a1a, #4bc22e); } .feed-item.bad { background: linear-gradient(90deg, #b0201f, #e8312f); }
.feed-item.out { opacity: 0; transform: translateY(-10px); }
@keyframes feedin { from { transform: translateY(-16px) scale(.9); opacity: 0; } }
/* full-screen correct/wrong flash */
.gx::after { content: ''; position: absolute; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.gx.flash-good::after { background: radial-gradient(circle, transparent 40%, rgba(75,194,46,.55)); animation: flash .6s ease-out; }
.gx.flash-bad::after { background: radial-gradient(circle, transparent 40%, rgba(232,49,47,.55)); animation: flash .6s ease-out; }
/* intro / How to Play / menus */
.gx-intro, .gx-overlay { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8,4,18,.6); backdrop-filter: blur(8px); animation: fade .25s; }
.gx-intro.out { animation: fadeout .35s forwards; }
.gx-intro-card, .gx-panel { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: #fff; color: var(--text); border-radius: 30px; padding: 28px clamp(18px, 4vw, 40px); text-align: center; box-shadow: inset 0 -8px rgba(0,0,0,.12), 0 30px 80px rgba(0,0,0,.5); animation: pop .45s cubic-bezier(.2, 1.5, .4, 1); }
.gx-intro-ico { width: 92px; height: 92px; margin: -6px auto 8px; border-radius: 28px; display: grid; place-items: center; font-size: 54px; background: linear-gradient(145deg, var(--m1), var(--m2)); box-shadow: inset 0 -6px rgba(0,0,0,.25), 0 12px 30px color-mix(in srgb, var(--m1) 50%, transparent); animation: float 3s ease-in-out infinite; }
.gx-intro-card h1, .gx-panel h2 { color: var(--purple); font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.gx-intro-desc, .gx-sub { color: var(--muted); margin: 0 0 14px; }
.gx-help { list-style: none; counter-reset: h; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gx-help li { counter-increment: h; display: flex; gap: 12px; align-items: center; background: #f6f1f9; border-radius: 14px; padding: 10px 14px; font-weight: 800; }
.gx-help li::before { content: counter(h); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: 'Titan One'; color: #fff; background: linear-gradient(145deg, var(--m1), var(--m2)); }
.gx-intro-foot { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 70px; }
.gx-count { font-family: 'Titan One'; font-size: 0; color: var(--purple); }
.gx-intro.counting #gx-ready { display: none; }
.gx-intro.counting .gx-count { font-size: 72px; }
.gx-count.pop { animation: cd .55s cubic-bezier(.2, 1.6, .4, 1); }
.gx-intro.go .gx-count { color: #2a9a1a; }
@keyframes cd { from { transform: scale(2.6); opacity: 0; } }
.gx-panel.menu { width: min(420px, 100%); display: flex; flex-direction: column; gap: 8px; }
.gx-mi { display: flex; align-items: center; gap: 12px; width: 100%; border: none; border-radius: 16px; padding: 14px 16px; background: #f6f1f9; color: var(--text); font: inherit; font-size: 18px; cursor: pointer; text-align: left; transition: transform .15s, background .2s; }
.gx-mi:hover { transform: translateX(4px); background: #efe2f7; } .gx-mi b { font-family: 'Titan One'; font-weight: 400; flex: 1; } .gx-mi small { color: var(--muted); font-size: 12px; }
.gx-mi.warn { background: #fff1dc; } .gx-mi.danger { background: #ffe3e3; }
/* questions */
.qwrap { width: min(1150px, 100%); display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); animation: pagein .3s; }
.q-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.q-meta span { background: rgba(255,255,255,.16); padding: 4px 14px; border-radius: 20px; font-weight: 900; font-size: 14px; }
.q-meta .q-streak { background: linear-gradient(90deg, #ff7b1c, #ff3d3d); } .q-meta .q-multi { background: #2f7bff; }
.q-title { font-family: 'Titan One'; font-size: clamp(18px, 2.4vw, 26px); text-align: center; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.q-box { background: #fff; color: var(--text); border-radius: 26px; padding: clamp(20px, 4vh, 44px) 28px; min-height: clamp(90px, 18vh, 180px); display: grid; place-items: center; text-align: center; font-family: 'Titan One'; font-size: clamp(22px, 3.2vw, 42px); line-height: 1.2; box-shadow: inset 0 -8px rgba(0,0,0,.1), 0 14px 40px rgba(0,0,0,.35); }
.q-timer { height: 12px; background: rgba(0,0,0,.3); border-radius: 8px; overflow: hidden; } .q-timer div { height: 100%; width: 100%; background: linear-gradient(90deg, #4bff7a, #ffd23f); } .q-timer div.low { background: #ff4b4b; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.6vh, 16px); }
.ans { display: flex; align-items: center; gap: 14px; text-align: left; font-family: 'Titan One'; font-size: clamp(17px, 2.1vw, 28px); color: #fff; border: none; border-radius: 22px; padding: 14px 18px; min-height: clamp(72px, 14vh, 140px); cursor: pointer; box-shadow: inset 0 -8px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.25); transition: transform .12s, filter .15s, opacity .3s; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.ans:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.08); } .ans:active { transform: scale(.97); }
.a0 { background: linear-gradient(160deg, #ffb340, #f58a00); } .a1 { background: linear-gradient(160deg, #2ec4ff, #0090d0); } .a2 { background: linear-gradient(160deg, #5ed63a, #36a31c); } .a3 { background: linear-gradient(160deg, #ff6a4d, #e02f1a); }
.ans-key { position: relative; flex-shrink: 0; width: clamp(38px, 5vh, 52px); height: clamp(38px, 5vh, 52px); border-radius: 14px; background: rgba(0,0,0,.18); display: grid; place-items: center; font-size: clamp(18px, 2.6vh, 26px); }
.ans-key em { position: absolute; bottom: -6px; right: -6px; font-style: normal; font-size: 11px; background: #fff; color: #333; border-radius: 6px; padding: 0 5px; text-shadow: none; }
.ans-txt { flex: 1; overflow-wrap: anywhere; }
.ans.dim { opacity: .3; transform: scale(.97); }
.feedback { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); padding: clamp(24px, 5vh, 48px) clamp(40px, 8vw, 100px); border-radius: 30px; text-align: center; }
.feedback.good { background: linear-gradient(160deg, #5ed63a, #2a9a1a); box-shadow: inset 0 -8px rgba(0,0,0,.2), 0 0 70px rgba(75,194,46,.7); }
.feedback.bad { background: linear-gradient(160deg, #ff6a4d, #c41f1f); box-shadow: inset 0 -8px rgba(0,0,0,.2), 0 0 70px rgba(232,49,47,.7); }
.fb-icon { width: clamp(70px, 12vh, 110px); height: clamp(70px, 12vh, 110px); border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: clamp(40px, 7vh, 64px); }
.fb-text { font-family: 'Titan One'; font-size: clamp(30px, 5vw, 52px); text-shadow: 0 3px 0 rgba(0,0,0,.2); } .fb-ans { font-size: clamp(15px, 2vw, 22px); }
/* compact question panels inside sims / side panels */
.qwrap.compact { gap: 8px; width: 100%; } .qwrap.compact .q-box { font-size: 17px; padding: 12px; min-height: 0; border-radius: 16px; }
.qwrap.compact .answers { gap: 8px; } .qwrap.compact .ans { font-size: 14px; padding: 8px 10px; min-height: 0; border-radius: 14px; gap: 8px; box-shadow: inset 0 -5px rgba(0,0,0,.22); }
.qwrap.compact .ans-key { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; } .qwrap.compact .ans-key em { display: none; }
.feedback.compact { padding: 14px 26px; border-radius: 20px; } .feedback.compact .fb-icon { width: 46px; height: 46px; font-size: 26px; } .feedback.compact .fb-text { font-size: 22px; } .feedback.compact .fb-ans { font-size: 14px; }
/* quiz pop-up over action games */
.quiz-ov { position: absolute; inset: 0; z-index: 30; background: rgba(8,4,18,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 80px 20px 20px; animation: fade .2s; }
.quiz-ov-in { width: min(1050px, 100%); display: flex; justify-content: center; }
/* choice cards */
.choose { text-align: center; width: min(1100px, 100%); animation: pagein .3s; }
.choose h2 { font-size: clamp(24px, 3.4vw, 40px); text-shadow: 0 3px 0 rgba(0,0,0,.25); margin-bottom: 4px; }
.opt-grid { display: flex; gap: clamp(10px, 1.6vw, 18px); justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.opt { position: relative; font: inherit; width: clamp(150px, 17vw, 220px); padding: 24px 14px 18px; border: none; border-radius: 24px; background: #fff; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: inset 0 -7px rgba(0,0,0,.12), 0 12px 28px rgba(0,0,0,.3); transition: transform .18s, box-shadow .18s; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.opt:nth-child(2) { animation-delay: .06s; } .opt:nth-child(3) { animation-delay: .12s; } .opt:nth-child(4) { animation-delay: .18s; }
.opt:hover:not(:disabled) { transform: translateY(-8px) scale(1.04); box-shadow: inset 0 -7px rgba(0,0,0,.12), 0 18px 36px rgba(0,0,0,.35), 0 0 0 4px #ffd23f; }
.opt:disabled { opacity: .45; cursor: not-allowed; }
.opt-ico { font-size: clamp(42px, 6vh, 60px); line-height: 1; } .opt b { font-family: 'Titan One'; font-size: 18px; } .opt small { color: var(--muted); font-size: 13px; }
.key { position: absolute; top: 10px; left: 10px; font-style: normal; font-family: 'Titan One'; font-size: 12px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #f2e4f7; color: var(--purple); }
.choose-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 16px; }
.choose-p { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--text); border: none; border-radius: 18px; padding: 12px 14px 12px 38px; cursor: pointer; font: inherit; box-shadow: inset 0 -5px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.25); transition: transform .15s; text-align: left; animation: pop .35s backwards; }
.choose-p:hover { transform: translateY(-4px) scale(1.02); } .choose-p b { flex: 1; } .choose-p span { font-family: 'Titan One'; font-size: 14px; }
.choose-p .key { top: 50%; transform: translateY(-50%); left: 10px; }
/* run over / results */
.run-over, .solo-res { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.run-over { background: rgba(14,8,30,.6); backdrop-filter: blur(10px); border-radius: 30px; padding: 40px 50px; }
.ro-ico { font-size: 80px; } .ro-score { font-family: 'Titan One'; font-size: 40px; background: #fff; color: var(--text); padding: 6px 26px; border-radius: 18px; box-shadow: inset 0 -5px rgba(0,0,0,.12); }
.wr-dots { display: flex; gap: 8px; } .wr-dots i { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: bob2 1.2s ease-in-out infinite; } .wr-dots i:nth-child(2) { animation-delay: .15s; } .wr-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bob2 { 50% { transform: translateY(-10px); opacity: .5; } }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 7px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin2 .8s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
/* lobby */
.gx-lobby { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; min-height: 0; grid-row: 1 / -1; }
.gx-lobby .gx-top { grid-template-columns: 1fr auto; }
.lb-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; padding: 18px clamp(14px, 3vw, 32px) 8px; }
.lb-join { background: #fff; color: var(--text); border-radius: 28px; padding: 22px 28px; text-align: center; box-shadow: inset 0 -8px rgba(0,0,0,.1), 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lb-join small { color: var(--muted); } .lb-join > b { font-size: 18px; }
.lb-id { display: flex; flex-direction: column; align-items: center; margin-top: 4px; } .lb-id span { font-family: 'Titan One'; color: var(--muted); letter-spacing: 3px; font-size: 13px; }
.lb-id strong { font-family: 'Titan One'; font-weight: 400; font-size: clamp(54px, 8vw, 96px); letter-spacing: 6px; line-height: 1; color: var(--purple); }
.lc-status { font-weight: 900; margin-top: 6px; } .lc-status.online { color: #2a9a1a; } .lc-status.error { color: #c22; }
.lb-modecard { background: rgba(14,8,30,.55); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); border-radius: 28px; padding: 18px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lb-mi { font-size: 50px; } .lb-modecard > b { font-family: 'Titan One'; font-size: 26px; } .lb-modecard > small { opacity: .75; margin-bottom: 10px; }
.lb-modecard .gx-help { margin: 0; width: 100%; } .lb-modecard .gx-help li { background: rgba(255,255,255,.1); color: #fff; font-size: 14px; padding: 8px 12px; }
.lobby-players { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: flex-start; padding: 12px clamp(14px, 3vw, 32px); }
.lp { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; padding: 12px 8px; border-radius: 20px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.lp.new { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); } .lp.me { background: rgba(255,210,63,.25); border-color: #ffd23f; }
.lp b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lp small { font-size: 11px; opacity: .8; }
.lobby-players.small .lp { width: 92px; padding: 8px; }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px clamp(14px, 3vw, 32px); background: rgba(10,5,25,.5); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.1); font-family: 'Titan One'; font-size: 20px; }
.wr-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px 16px 10px; } .wr-hero h1 { font-size: clamp(30px, 4vw, 44px); } .wr-hero p { opacity: .85; }
.wr-me { animation: float 3s ease-in-out infinite; }
.wr-game { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 10px 18px; font-size: 16px; }
.wr-game > span:first-child { font-size: 26px; } .wr-code b { font-family: 'Titan One'; font-size: 20px; letter-spacing: 1px; }
.wr-count { text-align: center; font-weight: 900; opacity: .8; margin-top: 6px; }
.lobby-players .lp.me { outline: 3px solid #ffd54a; }
/* end screen */
.gx-done { grid-template-rows: 1fr; }
.end { position: relative; z-index: 2; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: clamp(20px, 4vh, 44px) 16px; }
.end-hero { text-align: center; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); } .end-ico { font-size: 76px; animation: float 3s ease-in-out infinite; }
.end-hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 0; text-shadow: 0 5px 0 rgba(0,0,0,.3); } .end-hero p { opacity: .8; margin: 4px 0 0; }
.podium { display: flex; align-items: flex-end; gap: 14px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; width: clamp(110px, 14vw, 170px); animation: rise .6s var(--d) backwards; }
.pod-blook { animation: blookin 1s var(--d) backwards; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pod small { opacity: .85; }
.pod-step { width: 100%; font-size: 40px; display: grid; place-items: center; border-radius: 16px 16px 0 0; box-shadow: inset 0 -6px rgba(0,0,0,.2); }
.pod1 .pod-step { height: 150px; background: linear-gradient(#ffe15a, #e8a800); } .pod2 .pod-step { height: 110px; background: linear-gradient(#eef1f6, #9aa3b0); } .pod3 .pod-step { height: 80px; background: linear-gradient(#f0b07a, #a8642c); }
.pod.me b { background: #fff; color: var(--purple); padding: 0 8px; border-radius: 8px; }
.end-stats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; animation: rise .6s 1.1s backwards; }
.end-stat { width: 140px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.end-stat > span { font-size: 28px; } .end-stat b { font-family: 'Titan One'; font-weight: 400; font-size: 26px; } .end-stat b small { font-size: 15px; opacity: .7; } .end-stat > small { opacity: .75; font-size: 12px; }
.end-stat.tokens { background: linear-gradient(160deg, #ffe15a, #e8a800); color: #4a3000; border-color: transparent; box-shadow: 0 0 30px rgba(255,210,63,.5); }
.end-rest { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); animation: rise .6s 1.3s backwards; }
.er { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 12px; padding: 4px 10px; } .er.me { background: #fff; color: var(--text); }
.er > span { font-family: 'Titan One'; width: 22px; } .er b { flex: 1; font-size: 14px; } .er em { font-style: normal; font-family: 'Titan One'; font-size: 13px; }
.end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: rise .6s 1.4s backwards; }
.end .end-tk-note { color: rgba(255,255,255,.7); margin: 0; }
.end-fx { position: fixed; }
/* canvas games fill the stage */
.cv-col { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cv-wrap { position: relative; flex: 1; min-height: 0; width: 100%; }
.cv-wrap canvas { display: block; width: 100%; height: 100%; object-fit: contain; touch-action: none; filter: drop-shadow(0 16px 30px rgba(0,0,0,.45)); }
.cv-hud { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; background: rgba(10,5,25,.7); backdrop-filter: blur(6px); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 800; white-space: nowrap; pointer-events: none; z-index: 2; }
.hud-bar { display: inline-block; width: 90px; height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; } .hud-bar i { display: block; height: 100%; background: #b64cff; }
.warn { color: #ff6b6b; animation: pulse .6s infinite; }
.cv-btns { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.dpad { display: none; position: absolute; left: 14px; bottom: 14px; z-index: 3; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(2, 56px); gap: 6px; }
.dpad button { border: none; border-radius: 14px; background: rgba(255,255,255,.28); backdrop-filter: blur(4px); color: #fff; font-size: 24px; touch-action: none; }
.dpad [data-k=arrowup] { grid-column: 2; } .dpad [data-k=arrowleft] { grid-column: 1; grid-row: 2; } .dpad [data-k=arrowdown] { grid-column: 2; grid-row: 2; } .dpad [data-k=arrowright] { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) { .dpad { display: grid; } }
.cv-col.has-below .pool-q { flex-shrink: 0; width: min(1000px, 100%); margin: 0 auto; }
.td { display: flex; gap: 14px; width: 100%; height: 100%; min-height: 0; }
.gx:has(.td) .g-board { display: none; } .gx:has(.td) .g-main { padding-right: clamp(10px, 2vw, 28px) !important; }
.td-left { flex: 1; min-width: 0; min-height: 0; display: flex; }
.td-left .cv-wrap { height: 100%; }
.td-side { max-height: 100% !important; }
/* bigger mode stages */
.cafe, .factory, .bees, .plush, .santa, .imp, .snow { max-width: 1200px !important; }
.kingdom { max-width: 860px !important; } .tdoom, .dive { max-width: 1050px !important; } .memory { max-width: 1150px !important; }
.mm-card { height: clamp(110px, 17vh, 180px) !important; } .mm-front { font-size: clamp(13px, 1.5vw, 18px) !important; }
.pond { max-width: 1000px !important; height: min(62vh, 560px) !important; }
.claw-machine { max-width: 780px !important; }
.vg-board { width: min(76vh, 100%) !important; }
.chest { width: clamp(150px, 17vw, 230px) !important; height: clamp(170px, 26vh, 260px) !important; } .chest-lid { font-size: clamp(70px, 10vh, 120px) !important; }
.race { width: 100%; height: 100%; } .race-track { flex-shrink: 0; } .lane { height: clamp(36px, 5.5vh, 56px) !important; }
.duel-hud { max-width: 1100px !important; }
/* phones & small screens */
@media (max-width: 760px) {
  .gx-top { grid-template-columns: auto 1fr auto auto; gap: 6px; padding: 8px 10px; }
  .gx-lobby .gx-top { grid-template-columns: 1fr auto; }
  .gx-mode div { display: none; } .gx-me { padding: 3px 8px 3px 3px; gap: 5px; } .gx-me small, .gx-me > :first-child { display: none; } .gx-me b { font-size: 15px; }
  .gx-btns [data-a="help"], .gx-btns [data-a="fs"] { display: none; } .gx-clock-bar { width: 90px; } .gx-clock .g-timer { font-size: 20px; }
  .gx-b { width: 36px; height: 36px; font-size: 15px; }
  .g-board { top: auto; left: 8px; right: 8px; width: auto; height: 46vh; transform: translateY(calc(100% + 24px)); }
  .answers { grid-template-columns: 1fr; } .ans { min-height: 56px; }
  .lb-hero { grid-template-columns: 1fr; } .lb-modecard { display: none; }
  .end-stat { width: 44%; } .opt { width: 44%; }
}

/* ================= FRIEND CHAT & INVITES ================= */
#chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 350; width: 60px; height: 60px; border: none; border-radius: 50%; background: var(--purple); color: #fff; font-size: 28px; cursor: pointer; box-shadow: inset 0 -5px rgba(0,0,0,.22), 0 8px 22px rgba(0,0,0,.3); transition: transform .2s; }
#chat-fab:hover { transform: scale(1.08); } #chat-fab.hide { display: none; }
#chat-fab .badge, .fr-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 900 12px/22px Nunito, sans-serif; font-style: normal; text-align: center; display: none; }
#chat-fab .badge.on { display: block; } .fr-badge { position: static; display: inline-block; margin-left: 6px; }
body.has-fab #toasts { bottom: 92px; }
.toast.clickable { cursor: pointer; }
.gx-fr { position: relative; } .gx-fr .gx-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #2a1450; display: none; } .gx-fr.has .gx-dot { display: block; }

#chat-dock { position: fixed; right: 20px; bottom: 20px; z-index: 350; width: 370px; height: min(580px, calc(100vh - 40px)); background: #fff; color: #2a2a3a; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: none; flex-direction: column; overflow: hidden; animation: cdin .25s cubic-bezier(.2,1.3,.4,1); }
#chat-dock.open { display: flex; }
@keyframes cdin { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.cd-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; background: linear-gradient(135deg, var(--purple), var(--purple-d)); color: #fff; }
.cd-head > b { flex: 1; font-family: 'Titan One'; font-size: 18px; font-weight: 400; }
.cd-head .cd-n { flex: 1; min-width: 0; } .cd-head .cd-n small { color: rgba(255,255,255,.8); }
.cd-x, .cd-back { border: none; background: rgba(255,255,255,.18); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px; flex: none; }
.cd-x:hover, .cd-back:hover { background: rgba(255,255,255,.3); }
.cd-n b { display: flex; align-items: center; gap: 6px; font-size: 15px; } .cd-n small { display: block; font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-game { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; background: #fff6d6; border-bottom: 1px solid #f0e2a8; font-size: 13px; font-weight: 700; }
.cd-game .btn { margin-left: auto; }
.cd-list { flex: 1; overflow-y: auto; padding: 6px; }
.cd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.cd-row:hover { background: #f3eef7; } .cd-row:not(.on) { opacity: .7; }
.cd-row .cd-n { flex: 1; min-width: 0; } .cd-row .btn { padding: 6px 10px; }
.cd-empty { text-align: center; color: #888; padding: 40px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cd-safe { font-size: 11px; color: #888; text-align: center; padding: 8px; border-top: 1px solid #eee; }
.cd-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; background: #f6f3f9; }
.cm { max-width: 80%; align-self: flex-start; display: flex; flex-direction: column; }
.cm p { margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 700; font-size: 14px; word-break: break-word; }
.cm time { font-size: 10px; color: #aaa; margin: 2px 6px 0; }
.cm.me { align-self: flex-end; align-items: flex-end; } .cm.me p { background: var(--purple); color: #fff; border-radius: 16px 16px 4px 16px; }
.cm.inv { flex-direction: row; align-items: center; gap: 8px; background: #fff6d6; border: 1px solid #f0e2a8; border-radius: 14px; padding: 8px 10px; font-size: 13px; font-weight: 800; max-width: 92%; }
.cd-quick { display: flex; gap: 4px; padding: 6px 8px 0; overflow-x: auto; background: #fff; }
.cd-quick button { flex: none; border: 1px solid #e4dcea; background: #fff; border-radius: 12px; padding: 4px 9px; font-size: 14px; font-weight: 800; cursor: pointer; }
.cd-quick button:hover:not(:disabled) { background: #f3eef7; } .cd-quick button:disabled { opacity: .4; cursor: default; }
.cd-form { display: flex; gap: 8px; padding: 8px 10px 10px; background: #fff; }
.cd-form input { flex: 1; min-width: 0; border: 2px solid #e4dcea; border-radius: 14px; padding: 10px 12px; font: 700 14px Nunito, sans-serif; outline: none; }
.cd-form input:focus { border-color: var(--purple); }

.inv-pop { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 450; display: flex; align-items: center; gap: 12px; background: #fff; color: #2a2a3a; padding: 12px 14px; border-radius: 20px; box-shadow: 0 14px 40px rgba(0,0,0,.4); border: 3px solid var(--gold); animation: invin .4s cubic-bezier(.2,1.4,.4,1); transition: opacity .3s, transform .3s; max-width: calc(100vw - 24px); }
.inv-pop.out { opacity: 0; transform: translate(-50%, -20px); }
@keyframes invin { from { transform: translate(-50%, -40px); opacity: 0; } }
.inv-txt { display: flex; flex-direction: column; } .inv-txt small { font-size: 11px; font-weight: 900; text-transform: uppercase; color: #c48a00; } .inv-txt span { font-size: 13px; color: #666; font-weight: 700; }
.inv-btns { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  #chat-dock { right: 0; bottom: 0; width: 100%; height: 85vh; border-radius: 22px 22px 0 0; }
  .inv-pop { flex-wrap: wrap; } .inv-btns { flex-direction: row; }
}

/* ===== Admin bar floating over a game (opened from the in-game ☰ menu or 🛠️) ===== */
body:has(#game-root.gx:not(.hidden)) #app { z-index: auto; } /* let the floating bar rise above the game */
body:has(#game-root.gx:not(.hidden)) #admin-bar:not(.hidden) { position: fixed; top: 74px; right: 16px; z-index: 380; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 100px); border: 3px solid #ffd23f; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 12px 18px 16px; }
#admin-bar .gm-cur { margin-left: 4px; }
#admin-bar #gm-who { min-width: 200px; }
#admin-bar #gm-amt { max-width: 110px; }
#admin-bar .gm-wallets { line-height: 1.7; }
@media (max-width: 760px) { body:has(#game-root.gx:not(.hidden)) #admin-bar:not(.hidden) { top: 60px; right: 8px; width: calc(100vw - 16px); } }

/* ================= SAVE DATABASE ================= */
.db-status { display: inline-block; padding: 8px 14px; border-radius: 12px; font-weight: 900; background: #eef8ea; color: #2a7a1a; }
.db-status.busy { background: #fff6d6; color: #8a6a00; } .db-status.off { background: #ffe8e8; color: #b0201e; } .db-status.warn { background: #fff0d6; color: #a05a00; }
.db-accounts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.db-acc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #f6f2f9; border: 2px solid transparent; }
.db-acc.cur { border-color: var(--purple); background: #f3eaf8; }
.db-an { flex: 1; min-width: 0; } .db-an b { display: block; } .db-an em { font-style: normal; font-size: 11px; background: var(--purple); color: #fff; padding: 2px 8px; border-radius: 8px; margin-left: 6px; vertical-align: middle; }
.db-an small { color: #777; font-weight: 700; }
.db-card .row.wrap { flex-wrap: wrap; gap: 8px; }
.db-card code { background: #f0eaf5; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.db-backups { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; margin-top: 10px; }
.db-bk { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #f6f2f9; }
.db-bk span { flex: 1; } .db-bk b { display: block; } .db-bk small { color: #777; font-weight: 700; }
#db-conflict { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: calc(100vw - 24px);
  background: #fff4dc; color: #5a3a00; border: 3px solid #f5a700; border-radius: 16px; padding: 12px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
#db-conflict span { font-size: 13px; font-weight: 700; }

/* phones: the sidebar becomes a bottom bar — keep the chat button and toasts above it */
@media (max-width: 700px) {
  #chat-fab { bottom: 78px; right: 12px; width: 52px; height: 52px; font-size: 24px; }
  body.has-fab #toasts, #toasts { bottom: 140px; right: 12px; left: 12px; align-items: stretch; }
}

/* ================= DAILY SPIN WHEEL ================= */
.daily-wheel-mini { line-height: 0; filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); }
.daily.ready .daily-wheel-mini { cursor: pointer; animation: wheelidle 6s linear infinite; }
@keyframes wheelidle { to { transform: rotate(360deg); } }
.wheel-modal { max-width: 460px; text-align: center; }
.wheel-box h2 { font-size: 30px; margin: 0 0 4px; color: var(--purple); }
.wheel-wrap { position: relative; width: 320px; height: 320px; margin: 14px auto 6px; max-width: 80vw; max-height: 80vw; }
.wheel-wrap svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 18px rgba(40,10,60,.35)); }
.wheel-wrap .wb0 { fill: #fff6c0; animation: bulb 1s steps(2) infinite; } .wheel-wrap .wb1 { fill: #ffd23f; animation: bulb 1s steps(2) infinite .5s; }
@keyframes bulb { 50% { fill: #fff; } }
.wheel-pointer { position: absolute; top: -10px; left: 50%; z-index: 2; width: 34px; height: 44px; transform: translateX(-50%); transform-origin: 50% 15%;
  background: linear-gradient(#ff5a5a, #c41f1f); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.wheel-pointer.flap { animation: flap .14s ease-out; }
@keyframes flap { 40% { transform: translateX(-50%) rotate(-18deg); } }
.wheel-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 50%; border: 5px solid #ffd23f;
  background: radial-gradient(circle at 35% 30%, #c56be0, #6f2c80); color: #fff; font-family: 'Titan One'; font-size: 17px; cursor: pointer; box-shadow: 0 4px 0 #4a1a5a, 0 6px 14px rgba(0,0,0,.35); transition: transform .15s; }
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.06); } .wheel-hub:active { transform: translate(-50%, -50%) scale(.96); }
.wheel-msg { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 17px; margin: 6px 0 10px; }
.wheel-msg.win { animation: winpop .5s cubic-bezier(.2,1.6,.4,1); color: #3a1a4a; }
@keyframes winpop { from { transform: scale(.6); opacity: 0; } }
.wheel-pal { display: inline-flex; }
.wheel-odds { margin-top: 12px; font-size: 13px; color: #777; } .wheel-odds summary { cursor: pointer; font-weight: 800; }
.wheel-odds span { display: inline-block; margin: 4px 8px; }
.wheel-fx { position: fixed; inset: 0; z-index: 450; pointer-events: none; overflow: hidden; }

/* save code (Settings) */
.db-code { align-items: center; gap: 8px; }
.db-code code { font-size: 14px !important; padding: 8px 12px !important; letter-spacing: .5px; user-select: all; word-break: break-all; transition: filter .2s; }
.db-code code.hidden-code { filter: blur(6px); user-select: none; }
.db-use { gap: 8px; margin-top: 8px; } .db-use input { flex: 1; min-width: 220px; border: 2px solid #e4dcea; border-radius: 12px; padding: 9px 12px; font: 700 14px Nunito, sans-serif; }

/* ================= LOG IN / SIGN UP ================= */
#auth { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(circle at 30% 20%, #7a3a9a, transparent 60%), radial-gradient(circle at 80% 80%, #2b2f9a, transparent 55%), #2a1450; transition: opacity .35s; }
#auth.out { opacity: 0; pointer-events: none; }
.auth-card { width: min(400px, 100%); background: #fff; border-radius: 26px; padding: 26px 24px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 -6px rgba(0,0,0,.08); text-align: center; animation: authin .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes authin { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.auth-logo { font-family: 'Titan One', sans-serif; font-size: 46px; color: var(--purple, #9a49aa); text-shadow: 0 4px 0 rgba(0,0,0,.12); line-height: 1; }
.auth-emoji { font-size: 26px; letter-spacing: 6px; margin: 6px 0 14px; }
.auth-tabs { display: flex; background: #f1eaf6; border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: none; background: none; padding: 10px; border-radius: 11px; font: 900 15px Nunito, sans-serif; color: #7a6a88; cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--purple, #9a49aa); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
#auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
#auth-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 900; font-size: 13px; color: #5a4a68; }
#auth-form input[type=text], #auth-form input:not([type]), #auth-form input[type=password] { width: 100%; box-sizing: border-box; border: 2px solid #e4dcea; border-radius: 13px; padding: 11px 13px; font: 700 16px Nunito, sans-serif; outline: none; }
#auth-form input:focus { border-color: var(--purple, #9a49aa); }
.au-pw { position: relative; display: block; } .au-pw input { padding-right: 46px !important; }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; font-size: 18px; cursor: pointer; padding: 6px; }
.au-keep { flex-direction: row !important; align-items: center; gap: 8px !important; background: #f6f2f9; border-radius: 12px; padding: 10px 12px; font-size: 14px !important; color: #3a2a4a !important; cursor: pointer; }
.au-keep input { width: 18px; height: 18px; accent-color: var(--purple, #9a49aa); flex: none; } .au-keep small { color: #888; font-weight: 700; }
.au-note { margin: 0; font-size: 12px; color: #888; font-weight: 700; }
.au-err { min-height: 18px; color: #d0302e; font-weight: 900; font-size: 14px; text-align: center; }
.au-err.shake { animation: shake .4s; }
.au-go { width: 100%; margin-top: 2px; } .au-go:disabled { opacity: .6; }
.au-switch { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: #777; } .au-switch a { color: var(--purple, #9a49aa); font-weight: 900; }
.db-pw { margin: 4px 0 10px; } .db-pw summary { cursor: pointer; font-weight: 900; color: #5a4a68; padding: 6px 0; }
.db-pw-form { display: flex; flex-direction: column; gap: 8px; max-width: 340px; margin-top: 6px; }
.db-pw-form input { border: 2px solid #e4dcea; border-radius: 12px; padding: 9px 12px; font: 700 14px Nunito, sans-serif; }
