/* Cosmic Baddies theme: neon arcade, "LET'S GO" energy. Change the variables to reskin everything. */
:root {
  --bg:#0a0516; --card:rgba(30,18,60,.82); --ink:#f7f3ff; --mute:#b4a8d6;
  --accent:#ff2e93; --accent2:#ff9f1c; --cyan:#00e5ff; --lime:#b6ff00; --violet:#7b2cff;
  --ok:#2ee6a6; --bad:#ff4d6d; --mark:#ff2e93;
  --font-display:'Arial Black','Helvetica Neue',Impact,system-ui,sans-serif;
}
body { background:radial-gradient(1200px 600px at 50% -10%, #3a1670 0%, transparent 60%), radial-gradient(800px 500px at 100% 100%, #0b3a63 0%, transparent 55%), var(--bg); background-attachment:fixed; min-height:100vh; }
.notice { background:linear-gradient(90deg,#2a1450,#14325a); color:#cdbfff; border-bottom:1px solid #3b2a73; }
.logo { text-align:center; padding:14px 8px 0; font-family:var(--font-display); font-style:italic; font-weight:900; font-size:34px; letter-spacing:1px; line-height:1;
  background:linear-gradient(90deg,var(--cyan),var(--accent),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 0 14px rgba(255,46,147,.55)); }
.logo small { display:block; font-size:12px; letter-spacing:6px; margin-top:4px; color:var(--lime); -webkit-text-fill-color:var(--lime); filter:none; }
h1,h2,h3 { font-family:var(--font-display); font-style:italic; text-transform:uppercase; letter-spacing:.5px; }
.card { background:var(--card); border:1px solid rgba(255,255,255,.1); box-shadow:0 0 0 1px rgba(123,44,255,.25), 0 8px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter:blur(6px); border-radius:18px; }
input, select, textarea { background:#120a28; border:1px solid #4b3a8a; color:var(--ink); }
input:focus, select:focus, textarea:focus { outline:2px solid var(--cyan); }
button { font-family:var(--font-display); text-transform:uppercase; letter-spacing:.5px; font-size:14px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; box-shadow:0 4px 0 #7a1049, 0 0 18px rgba(255,46,147,.45); transition:transform .08s, box-shadow .08s, filter .15s; }
button:hover:not(:disabled) { filter:brightness(1.12); }
button:active:not(:disabled) { transform:translateY(3px); box-shadow:0 1px 0 #7a1049, 0 0 10px rgba(255,46,147,.4); }
button.secondary { background:linear-gradient(135deg,#3b2a73,#2a1f55); box-shadow:0 4px 0 #181036; color:var(--ink); }
button.danger { background:linear-gradient(135deg,#ff4d6d,#c9184a); box-shadow:0 4px 0 #6a0f27; }
.tabs button { background:#2a1f55; box-shadow:none; color:var(--ink); } .tabs button.on { background:linear-gradient(135deg,var(--cyan),var(--violet)); color:#fff; box-shadow:0 0 16px rgba(0,229,255,.5); }
.balance { color:var(--lime); text-shadow:0 0 10px rgba(182,255,0,.6); font-family:var(--font-display); }
.who { display:flex; flex-direction:column; gap:4px; min-width:150px; }
.xp { height:8px; border-radius:6px; background:#1a1040; overflow:hidden; border:1px solid #3b2a73; } .xp .xpfill { height:100%; background:linear-gradient(90deg,var(--cyan),var(--lime)); box-shadow:0 0 10px var(--cyan); transition:width .5s; }
.lvl { font-size:12px; color:var(--mute); }
.tiles { gap:12px; }
.tile { border:1px solid rgba(255,255,255,.14); font-family:var(--font-display); text-transform:uppercase; font-size:14px; color:#fff; box-shadow:0 6px 0 rgba(0,0,0,.35), 0 0 22px var(--glow, rgba(255,46,147,.4)); transition:transform .15s; background:linear-gradient(160deg,var(--c1,#ff2e93),var(--c2,#7b2cff)); text-shadow:0 2px 0 rgba(0,0,0,.35); }
.tile:hover { transform:translateY(-4px) rotate(-1deg) scale(1.03); }
.tile:active { transform:translateY(2px); }
.tile .ti { font-size:44px; filter:drop-shadow(0 4px 6px rgba(0,0,0,.4)); } .tile .mute { color:rgba(255,255,255,.85); text-transform:none; font-family:system-ui; text-shadow:none; }
.tile:nth-child(1) { --c1:#7b2cff; --c2:#2d0a6b; --glow:rgba(123,44,255,.55); } .tile:nth-child(2) { --c1:#ff9f1c; --c2:#c4510a; --glow:rgba(255,159,28,.5); }
.tile:nth-child(3) { --c1:#00e5ff; --c2:#0066ff; --glow:rgba(0,229,255,.5); } .tile:nth-child(4) { --c1:#ff2e93; --c2:#a10a52; --glow:rgba(255,46,147,.55); }
.tile:nth-child(5) { --c1:#2ee6a6; --c2:#067a5a; --glow:rgba(46,230,166,.45); } .tile:nth-child(6) { --c1:#ff4d6d; --c2:#7a0f2a; --glow:rgba(255,77,109,.5); }
.tile:nth-child(7) { --c1:#b6ff00; --c2:#2c7a00; --glow:rgba(182,255,0,.45); color:#08210a; text-shadow:none; } .tile:nth-child(7) .mute { color:#12380f; }
.tile:nth-child(8) { --c1:#ffd23f; --c2:#ee6c4d; --glow:rgba(255,210,63,.5); color:#2a1000; text-shadow:none; } .tile:nth-child(8) .mute { color:#4a2000; }
.reel { box-shadow:inset 0 0 18px rgba(0,0,0,.35), 0 0 22px rgba(255,46,147,.6); border-color:var(--accent); background:linear-gradient(#fff,#e8e0ff); }
.big { font-family:var(--font-display); font-style:italic; text-shadow:0 0 16px rgba(0,229,255,.55); }
.bingo-card .c { background:#150b30; border:1px solid #3b2a73; } .bingo-card .c.m { background:linear-gradient(135deg,var(--accent),var(--accent2)); box-shadow:0 0 12px rgba(255,46,147,.7); } .bingo-card .h { text-shadow:0 0 8px var(--accent2); font-family:var(--font-display); }
.ball { background:radial-gradient(circle at 35% 30%, #fff, #cfc6f2); border:6px solid var(--accent2); box-shadow:0 0 22px rgba(255,159,28,.6); font-family:var(--font-display); }
.pointer { border-top-color:var(--lime); filter:drop-shadow(0 0 8px var(--lime)); }
.wheelbox canvas { border-radius:50%; box-shadow:0 0 0 8px #1a1040, 0 0 0 11px var(--accent), 0 0 40px rgba(255,46,147,.6); }
.die { box-shadow:0 6px 0 #b9b2d9, 0 0 20px rgba(0,229,255,.5); } .puck.on { background:var(--lime); color:#0a1a00; box-shadow:0 0 14px var(--lime); }
.hint { background:rgba(0,229,255,.1); border-left-color:var(--cyan); }
.sc { background:repeating-linear-gradient(45deg,#8e8aa8,#8e8aa8 8px,#a39fbd 8px,#a39fbd 16px); color:transparent; box-shadow:0 4px 0 #4a4663; } .sc.open { background:#fff; color:#111; box-shadow:none; } .sc.hit { outline-color:var(--lime); box-shadow:0 0 18px var(--lime); }
.opt { background:#2a1f55; box-shadow:0 4px 0 #181036; text-transform:none; font-family:system-ui; font-size:16px; } .opt.right { background:var(--ok); color:#04281b; } .opt.wrong { background:var(--bad); }
.xpgain { color:var(--cyan); }
.invite-link { word-break:break-all; background:#120a28; border:1px dashed var(--cyan); padding:8px; border-radius:10px; margin:8px 0; font-size:13px; }
.toast { background:linear-gradient(135deg,var(--cyan),var(--violet)); color:#fff; box-shadow:0 0 22px rgba(0,229,255,.6); }
.fx-overlay { position:fixed; inset:0; z-index:60; display:flex; flex-direction:column; align-items:center; justify-content:center; background:radial-gradient(circle,rgba(123,44,255,.55),rgba(10,5,22,.9)); animation:fx-in .25s ease-out; cursor:pointer; }
.fx-title { font-family:var(--font-display); font-style:italic; font-size:clamp(44px,14vw,92px); text-align:center; line-height:1; background:linear-gradient(90deg,var(--cyan),var(--lime),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 0 22px rgba(0,229,255,.7)); animation:fx-pop .5s cubic-bezier(.2,1.6,.4,1); }
.fx-sub { margin-top:14px; font-size:24px; font-weight:800; color:#fff; text-shadow:0 0 14px var(--accent); }
@keyframes fx-in { from { opacity:0 } to { opacity:1 } } @keyframes fx-pop { from { transform:scale(.4) rotate(-6deg); opacity:0 } to { transform:scale(1) rotate(0); opacity:1 } }
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }

.art { width:72px; height:72px; object-fit:contain; filter:drop-shadow(0 4px 6px rgba(0,0,0,.45)); } .mascot { height:84px; width:auto; }
.fx-mascot { max-height:32vh; max-width:70vw; object-fit:contain; margin-bottom:8px; filter:drop-shadow(0 0 18px rgba(0,229,255,.6)); animation:fx-pop .5s cubic-bezier(.2,1.6,.4,1); }

.tile:nth-child(9) { --c1:#ff6b6b; --c2:#5a189a; --glow:rgba(255,107,107,.5); }
.jackpot { text-align:center; margin:6px 0; } .jp { font-family:var(--font-display); font-size:64px; line-height:1; color:var(--lime); text-shadow:0 0 22px rgba(182,255,0,.7); }
.deckgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(54px,1fr)); gap:6px; margin:12px 0; }
.pc { font-family:system-ui; font-weight:900; border-radius:8px; }
.pc.back { height:76px; background-color:#4b1d9a; background-image:var(--img-card-back, repeating-linear-gradient(45deg,#4b1d9a,#4b1d9a 6px,#6a2fd1 6px,#6a2fd1 12px)); background-size:cover; background-position:center; color:#ffd23f; font-size:22px; box-shadow:0 3px 0 #1a0a3d; }
.pc.back:disabled { opacity:.55; } .pc.back:not(:disabled):hover { transform:translateY(-4px) rotate(-2deg); }
.pc.face { display:inline-block; background:#fff; color:#111; padding:2px 8px; } .pc.red { color:#d00000; }

.tile:nth-child(10) { --c1:#2ee6a6; --c2:#0b6e99; --glow:rgba(46,230,166,.5); }
.sqgrid { display:grid; grid-template-columns:repeat(10,1fr); gap:3px; margin:12px 0; max-width:420px; }
.sq { aspect-ratio:1; padding:0; font-size:12px; border-radius:6px; box-shadow:none; letter-spacing:0; background-size:cover; background-position:center; }
.sq.free { background-color:#1a1040; background-image:var(--img-square-open, linear-gradient(160deg,#2c1a6b,#14325a)); color:#cdbfff; border:1px solid #4b3a8a; }
.sq.free:hover:not(:disabled) { filter:brightness(1.5); transform:scale(1.08); }
.sq.taken { background:hsl(var(--h,260) 55% 38%); color:#fff; border:1px solid rgba(255,255,255,.2); font-size:15px; opacity:.9; }
.sq.mine { background-color:var(--lime); background-image:var(--img-square-mine, none); color:#0a1a00; font-size:15px; box-shadow:0 0 10px var(--lime); }
.sq.sel { outline:3px solid var(--cyan); background:var(--cyan); color:#00232b; box-shadow:0 0 12px var(--cyan); }
.sq.sweep { outline:3px solid #fff; background:#fff !important; color:#111 !important; transform:scale(1.15); z-index:2; position:relative; }
.sq.winner { background-color:#ffd23f !important; background-image:var(--img-square-winner, none) !important; color:#3a2500 !important; box-shadow:0 0 22px #ffd23f; animation:fx-pop .5s; }

.help-btn { background:linear-gradient(135deg,var(--cyan),var(--violet)); box-shadow:0 4px 0 #1b2a8a, 0 0 16px rgba(0,229,255,.45); }
.help-overlay { position:fixed; inset:0; z-index:70; background:rgba(10,5,22,.86); display:flex; align-items:flex-end; justify-content:center; }
.help-box { background:#1a1040; border:1px solid #4b3a8a; border-radius:20px 20px 0 0; padding:18px; width:100%; max-width:560px; max-height:88vh; overflow:auto; box-shadow:0 -10px 40px rgba(123,44,255,.4); }
.help-box h3 { margin:14px 0 4px; color:var(--cyan); font-size:14px; } .help-box li { margin:6px 0; line-height:1.4; }
.help-line { font-size:18px; font-weight:700; color:var(--lime); margin:4px 0 8px; }
@media (min-width:700px) { .help-overlay { align-items:center; } .help-box { border-radius:20px; } }

.nw-box { text-align:center; } .nw-box .wheelbox { width:300px; height:300px; margin:20px auto 12px; }
.nw-canvas { width:300px; height:300px; border-radius:50%; transition:transform 5s cubic-bezier(.12,.6,.1,1); box-shadow:0 0 0 8px #1a1040, 0 0 0 11px var(--accent), 0 0 40px rgba(255,46,147,.6); }
.nw-overlay { align-items:center; }

/* ---- Cosmic Baddies artwork ---- */
body { background-image:var(--img-bg-hero, none), radial-gradient(1200px 600px at 50% -10%, #3a1670 0%, transparent 60%), radial-gradient(800px 500px at 100% 100%, #0b3a63 0%, transparent 55%); background-size:cover, auto, auto; background-position:center bottom, 0 0, 0 0; background-repeat:no-repeat; background-attachment:fixed; }
.brandbar { max-width:760px; margin:0 auto; padding:6px 12px 0; }
.sig { display:block; height:56px; width:auto; opacity:.92; filter:drop-shadow(0 0 10px rgba(255,46,147,.45)); user-select:none; }
.row.nowrap { flex-wrap:nowrap; }
.avatar { width:44px; height:44px; object-fit:contain; flex:none; filter:drop-shadow(0 2px 4px rgba(0,0,0,.5)); } .avatar.sm { width:26px; height:26px; vertical-align:middle; }
.tile .art { width:96px; height:96px; } .tile .ti { display:flex; justify-content:center; min-height:96px; align-items:center; }
.mascot { height:96px; }
.sym { display:block; width:80%; height:80%; object-fit:contain; margin:auto; pointer-events:none; filter:drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.skin-sym-seven .reel { background:radial-gradient(circle at 50% 35%, #3a1670, #150a30); border-color:var(--accent2); }
.reel.stop { animation:fx-pop .3s; }
td .sym { display:inline-block; width:28px; height:28px; vertical-align:middle; }
.skin-scratch-clover .sc.open, .skin-scratch-apple .sc.open { background:radial-gradient(circle at 50% 35%, #3a1670, #150a30); box-shadow:none; }
.sc .sym { width:78%; height:78%; } .sc:not(.open) .sym { visibility:hidden; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chipbtn { position:relative; width:52px; height:52px; padding:0; border-radius:50%; background:none; box-shadow:none; border:2px solid transparent; }
.chipbtn:active:not(:disabled) { box-shadow:none; }
.chipbtn img { width:100%; height:100%; object-fit:contain; display:block; }
.chipbtn span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:900; color:#1a1200; text-shadow:0 0 3px #fff, 0 0 3px #fff; }
.chipbtn.on { border-color:var(--lime); box-shadow:0 0 14px var(--lime); transform:translateY(-3px); }
.jackpot { position:relative; } .coins { height:56px; width:auto; vertical-align:middle; margin:0 auto; display:block; filter:drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.skin-card-back .pc.back { color:transparent; background-color:transparent; box-shadow:none; background-size:contain; background-repeat:no-repeat; }
.sqframe { width:100%; max-width:440px; margin:12px auto; }
.skin-board-frame .sqframe { position:relative; aspect-ratio:1; background:var(--img-board-frame) center/100% 100% no-repeat; }
.skin-board-frame .sqframe .sqgrid { position:absolute; left:12.6%; top:13.4%; width:74.8%; height:73.4%; max-width:none; margin:0; grid-template-rows:repeat(10,1fr); gap:2px; }
.skin-board-frame .sq { aspect-ratio:auto; font-size:clamp(8px,2.2vw,11px); min-width:0; }
.sq { position:relative; } .sq.free, .sq.mine, .sq.winner { background-size:contain; background-repeat:no-repeat; }
.lstar { position:absolute; inset:-30%; width:160%; height:160%; object-fit:contain; pointer-events:none; z-index:3; }

/* Bingo balls (sprites + app-drawn text), porcelain card squares, Quila */
.bball { position:relative; display:inline-block; flex:none; }
.bball img { display:block; width:100%; height:100%; user-select:none; }
.bball .bt { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#1b1408; line-height:1; font-family:var(--font-display); }
.bball.lg { width:96px; height:96px; } .bball.lg b { font-size:30px; } .bball.lg i { font-size:13px; font-style:normal; margin-bottom:1px; opacity:.75; }
.bball.sm { width:36px; height:36px; } .bball.sm b { font-size:13px; }
.drawn { gap:3px; } .ball.sm { width:36px; height:36px; font-size:12px; border-width:3px; }
.bingo-card .hl-B { color:#5b92ff; } .bingo-card .hl-I { color:#ff5d5d; } .bingo-card .hl-N { color:#fff; } .bingo-card .hl-G { color:#3ddc84; } .bingo-card .hl-O { color:#ffd23f; }
.bingo-card .c { position:relative; }
.skin-porcelain-tile .bingo-card .c { background:var(--img-porcelain) center/100% 100% no-repeat; border:0; color:#2b2112; box-shadow:none; }
.skin-porcelain-tile .bingo-card .c.f { color:#0b5a40; font-size:12px; }
.skin-porcelain-tile .bingo-card .c.m { background:radial-gradient(circle at 35% 30%, #ff8cc4, var(--accent) 55%, #a10a52) center/80% 80% no-repeat, var(--img-porcelain) center/100% 100% no-repeat; color:#fff; box-shadow:none; text-shadow:0 1px 2px rgba(0,0,0,.6); }
.cards-wrap { display:flex; gap:10px; align-items:flex-start; }
.cards-col { flex:1; min-width:0; }
.quila { position:sticky; top:8px; flex:none; width:104px; text-align:center; }
.quila img { width:100%; height:auto; display:block; filter:drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.qsay { font-size:11px; color:var(--mute); margin-top:2px; line-height:1.2; }
.quila.win img { animation:hop .7s ease-in-out infinite; } .quila.win .qsay { color:var(--lime); font-weight:800; }
@keyframes hop { 0%,100% { transform:translateY(0) } 40% { transform:translateY(-14px) } }
@media (min-width:700px) { .quila { width:150px; } .sig { height:64px; } }
.avatar.lg { width:72px; height:72px; }
.badges { display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:10px; text-align:center; }
.badge img { width:72px; height:72px; object-fit:contain; filter:drop-shadow(0 4px 6px rgba(0,0,0,.45)); } .badge.locked img { filter:grayscale(1) brightness(.5); opacity:.55; } .badge.locked .small { color:var(--mute); }

/* Quila reacts in every game (small, top-right of the game card) */
.qreact { float:right; width:76px; margin:-2px 0 6px 10px; text-align:center; pointer-events:none; }
.qreact[hidden] { display:none; }
.qreact img { width:100%; height:auto; display:block; filter:drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.qreact .qsay { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); } /* read aloud by screen readers, not drawn */
.qreact.win img, .qreact.excited img { animation:hop .7s ease-in-out infinite; } .qreact.win .qsay { color:var(--lime); font-weight:800; }
.qreact.happy img { animation:wag 1.2s ease-in-out infinite; } @keyframes wag { 0%,100% { transform:rotate(-3deg) } 50% { transform:rotate(3deg) } }

.diff { font-weight:800; text-transform:uppercase; font-size:12px; padding:1px 8px; border-radius:10px; }
.diff.easy { background:rgba(46,230,166,.2); color:var(--ok); } .diff.medium { background:rgba(255,159,28,.2); color:var(--accent2); } .diff.hard { background:rgba(255,46,147,.25); color:#ff8cc4; }
