:root {
  --bg: #12101a; --card: #1d1a28; --line: #2e2a3d; --text: #ece9f5; --muted: #9b95b0;
  --accent: #1ed760; --accent2: #b28dff; --bad: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 22px; }
h2 { margin: 0 0 12px; font-size: 18px; }
h3 { margin: 22px 0 8px; font-size: 15px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
main { max-width: 980px; margin: 0 auto; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
label { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
label input { display: block; width: 100%; margin-top: 4px; }
label.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
label.check input { width: auto; margin: 0; }
input { background: #0f0d16; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; }
input.code { width: 90px; text-transform: uppercase; text-align: center; letter-spacing: .2em; }
button { background: var(--accent); color: #062b14; border: 0; border-radius: 999px; padding: 12px 24px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
button.secondary { background: var(--accent2); color: #1a0c33; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.space { justify-content: space-between; }
.row.center { justify-content: center; }
.or { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
code { background: #0f0d16; padding: 2px 6px; border-radius: 5px; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--accent); border-color: var(--accent); }
.code-big { font-family: ui-monospace, monospace; letter-spacing: .15em; color: var(--accent2); }
.status { font-size: 17px; }
.error { background: #3a1820; color: #ffc9c9; border: 1px solid #6b2a35; border-radius: 10px; padding: 10px 14px; }

.mystery { text-align: center; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; margin: 12px 0; }
.mystery #mysteryText { font-size: 22px; font-weight: 700; margin: 10px 0 14px; }
.vinyl { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, var(--accent2) 0 12%, #111 13% 40%, #222 41% 43%, #111 44% 70%, #222 71% 73%, #111 74%); }
.playing .vinyl { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.timeline { display: flex; gap: 6px; align-items: stretch; overflow-x: auto; padding: 6px 2px 10px; }
.song { min-width: 112px; max-width: 140px; background: #0f0d16; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 12px; }
.song .year { font-size: 22px; font-weight: 800; color: var(--accent); }
.song .t { font-weight: 600; }
.song .a { color: var(--muted); }
.song.new { border-color: var(--accent); }
.song.wrong { border-color: var(--bad); }
.song.wrong .year { color: var(--bad); }
.slot { min-width: 38px; border: 2px dashed var(--accent2); color: var(--accent2); background: transparent; border-radius: 10px; padding: 0 6px; font-size: 12px; }
.slot:hover { background: rgba(178,141,255,.15); }

.player { padding: 8px 0; border-top: 1px solid var(--line); }
.player .name { font-weight: 600; }
.player .name .off { color: var(--muted); font-weight: 400; font-size: 12px; }
.player.turn .name::before { content: "▶ "; color: var(--accent); }
#log { color: var(--muted); font-size: 14px; padding-left: 18px; margin: 0; }
label.inline { display: flex; gap: 8px; align-items: center; margin: 0; }
label.inline input { width: 140px; margin: 0; padding: 0; }
.progress { height: 6px; background: #0f0d16; border-radius: 99px; overflow: hidden; width: 220px; margin: 10px auto 0; }
.progress > div { height: 100%; background: var(--accent2); width: 0; transition: width .25s linear; }

/* --- wersja z odpowiedziami --- */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }
.card.main, .card.side { margin: 0; }
.side h3 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.timer { font-size: 34px; font-weight: 800; margin-top: 8px; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.bonus { background: #0f0d16; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; }
.bonus-label { font-weight: 600; margin-bottom: 10px; }
.opt { background: transparent; color: var(--text); border: 1px solid var(--line); }
.opt.sel { background: var(--accent2); color: #1a0c33; border-color: var(--accent2); }
.bonus input { width: 120px; }
form input:disabled, form button:disabled { opacity: .55; }
.reveal { display: flex; gap: 16px; align-items: center; background: #0f0d16; border: 1px solid var(--accent); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
.reveal-year { font-size: 34px; font-weight: 800; color: var(--accent); }
.reveal-title { font-size: 20px; font-weight: 700; }
.reveal-artist { color: var(--muted); }
table.results { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 14px; }
table.results th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.results td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.ok { color: var(--accent); } td.no { color: var(--bad); } td.none { color: var(--muted); }
td.pts { font-weight: 800; }
.scoreboard { margin: 0; padding-left: 22px; }
.scoreboard li { padding: 5px 0; display: flex; justify-content: space-between; gap: 8px; }
.scoreboard li .s { font-weight: 800; color: var(--accent); }
.scoreboard li.me { background: rgba(178,141,255,.10); box-shadow: inset 3px 0 0 var(--accent2); }
.scoreboard li.me .n { font-weight: 700; }
.scoreboard li .sent { color: var(--accent); font-size: 12px; }
.podium { text-align: center; padding: 20px 0; }
.podium .crown { font-size: 54px; }
.podium .winner { font-size: 26px; font-weight: 800; }



.category { background: #0f0d16; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 4px 0 14px; }
.category-label { font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.category input[type=number] { width: 140px; font-size: 20px; }
.opt { font-size: 17px; font-weight: 700; padding: 13px 24px; border-radius: 14px; flex: 1 1 200px; min-height: 52px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1.5px solid rgba(190,160,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.25); }
.opt:not(.sel):hover { border-color: rgba(190,160,255,.75); background: rgba(190,160,255,.12); box-shadow: 0 0 0 3px rgba(190,160,255,.12), 0 4px 14px rgba(0,0,0,.3); }
.opt.sel { box-shadow: 0 0 0 3px rgba(190,160,255,.25), 0 4px 16px rgba(160,120,255,.35); }
.row:has(> .opt) { gap: 10px; }
#readyBtn.on { background: var(--accent2); color: #1a0c33; }
td .part { display: block; }

.part.ok { color: var(--accent); } .part.no { color: var(--bad); } .part.none { color: var(--muted); }

/* --- losowanie kategorii: kula dyskotekowa --- */
.draw-stage { text-align: center; padding: 6px 0 10px; }
.draw-title { font-size: 20px; font-weight: 800; letter-spacing: .02em; margin-bottom: 6px; }
.disco-wrap { position: relative; width: 440px; max-width: 100%; height: 400px; margin: 0 auto; overflow: hidden; border-radius: 18px;
  background: radial-gradient(ellipse at 50% 45%, #2a2142 0%, #17131f 55%, #0d0b12 100%); box-shadow: inset 0 0 60px rgba(0,0,0,.6); }
.disco-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.disco-string { position: absolute; left: 50%; top: 0; width: 3px; height: calc(50% - 70px); transform: translateX(-50%); z-index: 2;
  background: repeating-linear-gradient(#9a9aac 0 4px, #55556a 4px 6px); border-radius: 2px; }
.disco-ball { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%); z-index: 3; }
.beam { position: absolute; left: 50%; top: 50%; width: 110px; height: 190px; transform-origin: 50% 0; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.55), rgba(205,170,255,.22) 65%, rgba(178,141,255,0));
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(2px);
  transform: translateX(-50%) rotate(180deg); }
.tile { position: absolute; left: 50%; top: 50%; width: 112px; padding: 9px 8px; border-radius: 12px; z-index: 4;
  background: rgba(15,13,22,.92); border: 2px solid var(--line); font-weight: 700; font-size: 14px; line-height: 1.2;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(-150px) rotate(calc(-1 * var(--a)));
  transition: border-color .12s, box-shadow .12s, background .12s, opacity .3s; }
.tile span { display: block; font-size: 20px; margin-bottom: 2px; }
.tile.hl { border-color: #fff; background: rgba(70,58,105,.95); box-shadow: 0 0 22px rgba(255,255,255,.4); }
.tile.win { border-color: var(--accent); background: rgba(20,70,40,.95); box-shadow: 0 0 30px rgba(30,215,96,.75); animation: winPulse .6s ease-in-out 3; }
.tile.dim { opacity: .3; }
@keyframes winPulse { 50% { transform: translate(-50%, -50%) rotate(var(--a)) translateY(-150px) rotate(calc(-1 * var(--a))) scale(1.12); } }
.cat-chip { display: inline-block; background: rgba(30,215,96,.15); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px; font-weight: 700; margin-bottom: 8px; }
@media (max-width: 480px) { .disco-wrap { height: 340px; } .disco-ball { width: 120px; height: 120px; } .tile { width: 104px; font-size: 12px; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-128px) rotate(calc(-1 * var(--a))); } }


/* --- czat --- */
.side-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
.chat-card { display: flex; flex-direction: column; height: 460px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; font-size: 14px; }
.msg { padding: 6px 9px; border-radius: 10px; background: #0f0d16; border: 1px solid var(--line); word-wrap: break-word; }
.msg b { color: var(--accent2); }
.msg.me b { color: #fff; }
.msg.good { background: rgba(30,215,96,.14); border-color: rgba(30,215,96,.55); color: #c9ffd9; font-weight: 600; animation: pop .35s ease-out; }
.msg.round { background: transparent; border: 0; color: var(--muted); font-size: 12px; text-align: center; padding: 4px 0; }
.msg.info { background: transparent; border: 0; color: var(--muted); font-size: 13px; padding: 2px 4px; }
.msg.warn { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.5); color: #ffc9c9; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; min-width: 0; }
.chat-form button { padding: 11px 16px; }
input.solved { border-color: var(--accent); color: var(--accent); background: rgba(30,215,96,.08); }
label .solved-tag { color: var(--accent); font-weight: 700; margin-left: 6px; }
@media (max-width: 760px) { .side-col { position: static; } .chat-card { height: 340px; } }


a.pill { text-decoration: none; color: var(--text); }
a.pill:hover { border-color: var(--accent2); }


/* --- awatary --- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; object-fit: cover; vertical-align: middle; line-height: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.me-row { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.me-row .grow { flex: 1; margin: 0; }
.avatar-btn { padding: 0; background: transparent; border-radius: 50%; position: relative; }
.avatar-btn::after { content: '✏️'; position: absolute; right: -4px; bottom: -4px; font-size: 13px; background: var(--card); border-radius: 50%; padding: 2px; }
.modal { position: fixed; inset: 0; background: rgba(5,4,10,.7); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { width: 460px; max-width: 100%; max-height: 92vh; overflow-y: auto; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { background: #0f0d16; border: 1px solid var(--line); border-radius: 10px; font-size: 22px; padding: 6px 0; }
.emoji-grid button.sel, .color-grid button.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.color-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.color-grid button { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 0; }
label.upload { display: inline-flex; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; color: var(--text); font-weight: 600; margin: 0; }
.scoreboard li .n { display: inline-flex; align-items: center; gap: 8px; }
.msg .av { margin-right: 6px; }
.msg.user { display: flex; align-items: flex-start; gap: 0; }
.podium .av { margin: 6px; }
td .who { display: inline-flex; align-items: center; gap: 8px; }


button.discord { background: #5865f2; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
button.discord:hover { background: #4752c4; }
.discord-row { margin-bottom: 12px; }


/* --- ekran końcowy: podium --- */
.final { text-align: center; padding: 4px 0 8px; }
.final-title { font-size: 30px; font-weight: 900; letter-spacing: .02em;
  background: linear-gradient(90deg, #ffd54a, #ff9f43, #ffd54a); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 3s linear infinite; background-size: 200% 100%; }
@keyframes shine { to { background-position: 200% 0; } }
.final-sub { color: var(--muted); margin: 2px 0 18px; }
.podium3 { display: flex; justify-content: center; align-items: flex-end; gap: 14px; min-height: 330px; margin-bottom: 18px; }
.pod { width: 150px; display: flex; flex-direction: column; align-items: center; }
.pod .who { opacity: 0; transform: translateY(-30px) scale(.6); animation: dropIn .6s cubic-bezier(.2,1.4,.4,1) forwards; animation-delay: calc(var(--d) + .55s); display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; }
.pod .who .nm { font-weight: 800; font-size: 16px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .who .pts { font-weight: 800; color: var(--accent); font-size: 15px; }
.pod .crown { font-size: 34px; margin-bottom: -14px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-6deg); } }
.pod .bar { width: 100%; border-radius: 12px 12px 4px 4px; height: 0; animation: grow .7s cubic-bezier(.2,.9,.3,1) forwards; animation-delay: var(--d);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 10px; font-size: 40px; font-weight: 900; color: rgba(0,0,0,.45);
  box-shadow: inset 0 -8px 18px rgba(0,0,0,.25), 0 8px 28px rgba(0,0,0,.35); overflow: hidden; }
@keyframes grow { to { height: var(--h); } }
@keyframes dropIn { to { opacity: 1; transform: none; } }
.pod.p1 .bar { background: linear-gradient(180deg, #ffe27a, #e7a92a); --h: 170px; }
.pod.p2 .bar { background: linear-gradient(180deg, #eef1f6, #a9b0bd); --h: 120px; }
.pod.p3 .bar { background: linear-gradient(180deg, #f2b98a, #b86f3c); --h: 85px; }
.pod.p1 .av { box-shadow: 0 0 0 3px #ffd54a, 0 0 28px rgba(255,213,74,.7); }
.pod.p2 .av { box-shadow: 0 0 0 3px #cfd5df; }
.pod.p3 .av { box-shadow: 0 0 0 3px #d89058; }
.pod.empty .bar { opacity: .25; }
.awards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 16px; }
.award { background: #0f0d16; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-width: 150px; opacity: 0; animation: dropIn .5s ease-out forwards; }
.award .ic { font-size: 26px; }
.award .t { font-weight: 800; font-size: 14px; }
.award .w { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 6px 0 2px; font-weight: 600; font-size: 13px; }
.award .d { color: var(--muted); font-size: 12px; }
.rest { list-style: none; padding: 0; margin: 0 auto; max-width: 380px; text-align: left; }
.rest li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.rest li .pl { width: 28px; color: var(--muted); font-weight: 800; }
.rest li .nm { flex: 1; }
.rest li .s { font-weight: 800; color: var(--accent); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
@media (max-width: 560px) { .pod { width: 104px; } .podium3 { gap: 8px; } .pod .who .nm { font-size: 13px; } }


/* --- podpowiedzi --- */
.hint-line { display: block; margin-top: 6px; min-height: 20px; font-size: 13px; color: #ffd54a; }
.hint-line .mask { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .18em; font-size: 16px; font-weight: 700; color: #ffe9a3; }
.near-tag { display: inline-block; margin-left: 6px; color: #ff9f43; font-weight: 800; }
.near-tag.pulse { animation: nearPulse .6s ease-out; }
@keyframes nearPulse { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }


/* --- poczekalnia: gotowość --- */
.lobby-box { margin: 6px 0 16px; }
.center-text { text-align: center; }
.lobby-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-bottom: 18px; }
.lp { position: relative; background: #0f0d16; border: 2px solid var(--line); border-radius: 16px; padding: 14px 8px 10px; text-align: center; transition: border-color .3s, box-shadow .3s, transform .3s; }
.lp .ring { position: relative; width: 74px; height: 74px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.lp .ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 4px; background: conic-gradient(var(--line) 0 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.lp .nm { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp .st { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lp .badge { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #062b14; font-weight: 900;
  display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform .35s cubic-bezier(.2,1.6,.4,1); }
.lp.offline { opacity: .45; }
.lp.ready { border-color: rgba(30,215,96,.7); box-shadow: 0 0 22px rgba(30,215,96,.25); }
.lp.ready .st { color: var(--accent); font-weight: 700; }
.lp.ready .badge { transform: scale(1); }
.lp.ready .ring::before { background: conic-gradient(#1ed760, #b28dff, #4dc3ff, #1ed760); animation: ringSpin 2.2s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.lp.just { animation: readyJump .6s cubic-bezier(.2,1.5,.4,1); }
@keyframes readyJump { 30% { transform: translateY(-12px) scale(1.06); } 60% { transform: translateY(2px) scale(.98); } }
.lp .spark { position: absolute; left: 50%; top: 44px; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; animation: spark .8s ease-out forwards; }
@keyframes spark { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }
.lp.me { outline: 2px dashed rgba(178,141,255,.5); outline-offset: 3px; }
.ready-big { font-size: 18px; padding: 14px 34px; background: var(--accent2); color: #1a0c33; box-shadow: 0 6px 24px rgba(178,141,255,.35); transition: transform .15s, background .25s; }
.ready-big:hover { transform: translateY(-2px); }
.ready-big.on { background: var(--accent); color: #062b14; box-shadow: 0 6px 24px rgba(30,215,96,.4); }
.all-ready { text-align: center; font-size: 22px; font-weight: 900; margin-bottom: 14px; padding: 10px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(30,215,96,.15), rgba(178,141,255,.25), rgba(30,215,96,.15)); background-size: 200% 100%;
  animation: shine 2s linear infinite, popIn .5s cubic-bezier(.2,1.5,.4,1); color: #d8ffe6; }
@keyframes popIn { from { transform: scale(.7); opacity: 0; } }
#startBtn.go { animation: goPulse 1.1s ease-in-out infinite; }
@keyframes goPulse { 50% { box-shadow: 0 0 0 10px rgba(30,215,96,.18), 0 0 30px rgba(30,215,96,.6); transform: scale(1.05); } }
#startBtn:disabled { opacity: .45; }


/* --- logo --- */
.logo { font-size: 24px; font-weight: 900; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.logo-text b { background: linear-gradient(90deg, #b28dff, #ff6b9d, #ffd54a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-ball { position: relative; display: inline-block; width: 46px; height: 46px; flex: none; margin: -6px 0; }
.logo-ball canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
/* pulsująca poświata za kulą */
.logo-ball::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(178,141,255,.55) 0%, rgba(255,107,157,.25) 40%, transparent 70%);
  animation: logoGlow 2.4s ease-in-out infinite; }
@keyframes logoGlow { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.12); } }
/* drobne migające iskierki wokół */
.logo-ball i { position: absolute; z-index: 2; width: 6px; height: 6px; pointer-events: none;
  background: radial-gradient(circle, #fff 0 20%, transparent 60%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0; animation: twinkle 2.6s ease-in-out infinite; }
.logo-ball i:nth-of-type(1) { top: 2px; right: -2px; animation-delay: .2s; }
.logo-ball i:nth-of-type(2) { bottom: 4px; left: -3px; width: 5px; height: 5px; animation-delay: 1.1s; }
.logo-ball i:nth-of-type(3) { top: 16px; right: -6px; width: 4px; height: 4px; animation-delay: 1.9s; }
@keyframes twinkle { 0%, 70%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 80% { opacity: 1; transform: scale(1.3) rotate(45deg); } 90% { opacity: .6; transform: scale(.8) rotate(90deg); } }

.victory-row { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 14px; }
.victory-now { font-size: 13px; color: var(--muted); }
.victory-now b { color: #ffd54a; }
.victory-btn { font-size: 13px; padding: 6px 14px; }



/* --- pula utworów --- */
.pool-box { background: #0f0d16; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.pool-head { font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.pool-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.pool-row .lbl { width: 74px; color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; font-size: 14.5px; font-weight: 600; }
.chip.on { background: var(--accent2); border-color: var(--accent2); color: #1a0c33; }
.chip:disabled { opacity: 1; cursor: default; }
.chip:disabled:not(.on) { opacity: .45; }
.chip .n { opacity: .6; font-weight: 500; margin-left: 4px; }


/* --- reakcje emotkami --- */
.chat-card { position: relative; }
.emoji-btn { padding: 6px 10px; font-size: 18px; line-height: 1; }
.emoji-pop { position: absolute; left: 14px; right: 14px; bottom: 64px; z-index: 20; background: #1b1826; border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: popIn .18s ease-out; }
.emoji-pop button { background: transparent; border: 0; font-size: 22px; padding: 4px 0; border-radius: 8px; }
.emoji-pop button:hover { background: rgba(178,141,255,.18); transform: scale(1.15); }
.react-host { position: relative; display: inline-flex; }
.react-bubble { position: absolute; left: 50%; bottom: 70%; z-index: 30; pointer-events: none; font-size: 22px; line-height: 1;
  background: #fff; border-radius: 14px; padding: 4px 6px; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  animation: reactIn 3.2s cubic-bezier(.2,1.4,.4,1) forwards; }
.react-bubble::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.react-bubble.big { font-size: 34px; padding: 6px 9px; }
@keyframes reactIn {
  0% { transform: translate(-50%, 10px) scale(.2); opacity: 0; }
  12% { transform: translate(-50%, -6px) scale(1.15); opacity: 1; }
  20% { transform: translate(-50%, -2px) scale(1); }
  80% { transform: translate(-50%, -10px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -26px) scale(.8); opacity: 0; } }

/* w rankingu dymek pojawia się po lewej stronie awatara, żeby nie zasłaniać nicku */
.scoreboard .react-bubble { left: auto; right: calc(100% + 8px); bottom: auto; top: 50%; font-size: 18px; padding: 3px 5px; animation-name: reactSide; }
.scoreboard .react-bubble::after { left: auto; right: -4px; bottom: auto; top: 50%; transform: translateY(-50%) rotate(45deg); }
@keyframes reactSide {
  0% { transform: translate(6px, -50%) scale(.2); opacity: 0; }
  12% { transform: translate(-2px, -50%) scale(1.15); opacity: 1; }
  20% { transform: translate(0, -50%) scale(1); }
  80% { transform: translate(0, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-10px, -50%) scale(.8); opacity: 0; } }


/* --- ranking: animacje zmian --- */
.scoreboard li { position: relative; border-radius: 10px; transition: background .4s; }
.scoreboard li .nm-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.scoreboard .move { font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 999px; animation: popIn .4s cubic-bezier(.2,1.6,.4,1); }
.scoreboard .move.up { background: rgba(30,215,96,.18); color: var(--accent); }
.scoreboard .move.down { background: rgba(255,107,107,.15); color: var(--bad); }
.scoreboard li.rise { animation: riseGlow 1.6s ease-out; }
.scoreboard li.fall { animation: fallGlow 1.6s ease-out; }
@keyframes riseGlow { 0%, 40% { background: rgba(30,215,96,.18); box-shadow: 0 0 18px rgba(30,215,96,.35); } 100% { background: transparent; box-shadow: none; } }
@keyframes fallGlow { 0%, 40% { background: rgba(255,107,107,.12); } 100% { background: transparent; } }
.scoreboard li.new-leader .av { animation: leaderJump .8s cubic-bezier(.2,1.6,.4,1) 2; box-shadow: 0 0 0 2px #ffd54a, 0 0 16px rgba(255,213,74,.7); }
@keyframes leaderJump { 40% { transform: translateY(-8px) scale(1.15) rotate(-8deg); } }
.scoreboard .s { transition: transform .2s; display: inline-block; }
.scoreboard .s.bump { transform: scale(1.35); color: #ffd54a; }
.scoreboard .plus { position: absolute; right: 6px; top: -4px; font-size: 12px; font-weight: 900; color: #ffd54a; pointer-events: none; animation: plusUp 1.5s ease-out forwards; }
@keyframes plusUp { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 20% { opacity: 1; transform: translateY(-4px) scale(1.1); } 100% { opacity: 0; transform: translateY(-22px) scale(1); } }

.leave-btn { color: #ffb3b3; border-color: rgba(255,107,107,.4); }
.leave-btn:hover { background: rgba(255,107,107,.12); }


/* --- tryb gry / tryb Swobodny --- */
.mode-box { background: #0f0d16; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.mode-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-chip { text-align: left; background: transparent; color: var(--text); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 600; }
.mode-chip .mode-txt b { display: block; font-size: 17px; margin-bottom: 2px; }
.mode-chip .mode-txt > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.mode-chip.on { border-color: var(--accent2); background: rgba(178,141,255,.12); box-shadow: 0 0 16px rgba(178,141,255,.25); }
.mode-chip:disabled { cursor: default; }
.mode-chip:disabled:not(.on) { opacity: .45; }
.pool-row .lbl { width: auto; min-width: 70px; }
.picking { margin: 6px 0 12px; }
.pick-head { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.grow-input { flex: 1; min-width: 200px; }
.pick-results { margin: 8px 0; max-height: 360px; overflow-y: auto; }
.pick-res { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.pick-res .info { flex: 1; min-width: 0; }
.pick-res .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-res .sm, .pick-mine .sm { padding: 5px 10px; font-size: 12px; }
.pick-mine { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--accent2); border-radius: 12px; }
.pick-mine .chosen { display: inline-flex; gap: 6px; align-items: center; background: rgba(178,141,255,.15); border-radius: 999px; padding: 3px 4px 3px 12px; margin: 3px 4px 3px 0; }
.pick-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pick-status .ps { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.pick-status .ps.done { border-color: var(--accent); color: var(--accent); }
.free-intro { text-align: center; padding: 30px 10px; animation: popIn .5s cubic-bezier(.2,1.5,.4,1); }
.free-intro .gift { font-size: 46px; animation: bob 1.2s ease-in-out infinite; }
.free-intro .who { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; margin-top: 8px; }
.picker-note { background: rgba(178,141,255,.12); border: 1px solid var(--accent2); border-radius: 14px; padding: 14px; text-align: center; font-weight: 700; margin: 4px 0 14px; }

#beginRoundsBtn.go { animation: goPulse 1.1s ease-in-out infinite; }

/* --- wizualizer muzyki --- */
.viz { display: block; width: 260px; height: 260px; margin: -10px auto -18px; }
@media (max-width: 480px) { .viz { width: 210px; height: 210px; } }


/* ================= DOPRACOWANY INTERFEJS ================= */
body { background: #0c0a12; min-height: 100vh; }
main { position: relative; z-index: 1; }
/* kolorowe światła disco w tle */
.bg-lights { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-lights i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 26s ease-in-out infinite alternate; }
.bg-lights i:nth-child(1) { background: #7b4bff; left: -12vmax; top: -14vmax; }
.bg-lights i:nth-child(2) { background: #ff4f9a; right: -14vmax; top: 10vh; animation-duration: 32s; animation-delay: -8s; }
.bg-lights i:nth-child(3) { background: #1ed7a0; left: 20vw; bottom: -22vmax; opacity: .14; animation-duration: 38s; animation-delay: -15s; }
.bg-lights i:nth-child(4) { background: #ffb547; right: 15vw; bottom: -18vmax; opacity: .12; animation-duration: 30s; animation-delay: -4s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.12); } 100% { transform: translate(-4vw, -3vh) scale(.95); } }

/* nagłówek: przyklejony, półprzezroczysty */
header { position: sticky; top: 0; z-index: 20; background: rgba(12,10,18,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sound-bar { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.icon-btn { background: transparent; border: 0; padding: 4px 6px; font-size: 16px; border-radius: 50%; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.sound-bar input[type=range] { width: 90px; accent-color: var(--accent2); }
.mute-toggle { display: flex; align-items: center; gap: 4px; margin: 0; cursor: pointer; font-size: 12px; color: var(--muted); }
.mute-toggle input { display: none; }
.mute-toggle span { padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; }
.mute-toggle input:checked + span { color: #ffb3b3; border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.1); }

/* karty: szkło z delikatną ramką */
.card { background: rgba(29,26,40,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 10px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04); }

/* przyciski: reakcja na najechanie i kliknięcie */
button { transition: transform .12s ease, filter .15s ease, background .2s, box-shadow .2s; }
button:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
button:not(:disabled):active { transform: translateY(1px) scale(.98); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
input, select { transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(178,141,255,.18); outline: none; }

/* paski przewijania */
* { scrollbar-width: thin; scrollbar-color: #3a3450 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3450; border-radius: 8px; }

/* ekran startowy */
.hero { max-width: 520px; margin: 34px auto; text-align: center; padding: 26px 28px 30px; }
.hero-ball { width: 120px; height: 120px; margin: -4px auto 4px; position: relative; }
.hero-ball::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, rgba(178,141,255,.45), rgba(255,107,157,.15) 45%, transparent 70%); animation: logoGlow 2.6s ease-in-out infinite; }
.hero-ball canvas { position: relative; width: 100%; height: 100%; }
.hero-title { font-size: 42px; font-weight: 900; margin: 0; letter-spacing: .01em; }
.hero-title b { background: linear-gradient(90deg, #b28dff, #ff6b9d, #ffd54a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); margin: 6px 0 22px; }
.hero .me-row { text-align: left; }
.hero .discord-row { justify-content: center; flex-direction: column; gap: 4px; }
.big-cta { width: 100%; font-size: 18px; padding: 14px; margin-top: 6px; background: linear-gradient(90deg, #1ed760, #2ee6a0); box-shadow: 0 8px 26px rgba(30,215,96,.3); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.join-row { display: flex; gap: 8px; justify-content: center; }
.join-row .code { width: 140px; font-size: 18px; font-weight: 800; }

/* pokój: kod jako "plakietka" */
.code-big { background: rgba(178,141,255,.12); border: 1px solid rgba(178,141,255,.35); padding: 2px 10px; border-radius: 10px; }
.status { color: #d9d4ea; }
.msg { background: rgba(15,13,22,.75); }
@media (max-width: 760px) {
  header { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .sound-bar input[type=range] { width: 70px; }
  .hero { margin: 16px auto; padding: 20px 16px; }
  .hero-title { font-size: 34px; }
}


/* okładka albumu po rundzie */
.reveal .cover { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; flex: none; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0; transform: rotate(-8deg) scale(.7); transition: opacity .4s, transform .5s cubic-bezier(.2,1.5,.4,1); }
.reveal .cover.show { opacity: 1; transform: none; }
@media (max-width: 560px) { .reveal .cover { width: 70px; height: 70px; } }


/* suwak głośności: bez dziedziczonego paddingu/ramki pól tekstowych, żeby dało się dojść do 0% i 100% */
input[type=range] { padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; height: 20px; cursor: pointer; }
input[type=range]:focus { box-shadow: none; }
.sound-bar input[type=range] { width: 100px; }


/* --- własne ikony --- */
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }
.mode-chip { display: flex; align-items: center; gap: 12px; }
.mode-txt { display: flex; flex-direction: column; }
.mode-chip .mode-ic { width: 58px; height: 58px; border-radius: 16px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.mode-ic.ball { background: linear-gradient(135deg, #8a5cff, #ff5fa2); }
.mode-ic.free { background: linear-gradient(135deg, #1ed7a0, #2f8fff); }
.mode-chip.on .mode-ic { transform: rotate(-6deg) scale(1.05); transition: transform .3s cubic-bezier(.2,1.6,.4,1); }
.tile .tile-ic { display: block; font-size: 24px; margin: 0 auto 3px; color: #cdb8ff; line-height: 1; }
.tile.hl .tile-ic { color: #fff; }
.tile.win .tile-ic { color: var(--accent); }
.cat-head { display: flex; align-items: center; gap: 12px; }
.cat-ic { width: 44px; height: 44px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, #8a5cff, #ff5fa2); box-shadow: 0 6px 16px rgba(138,92,255,.35); }
.cat-head .cat-chip { margin-bottom: 4px; }

.mode-chip .mode-ic .ico { stroke-width: 2.1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.mode-chip { padding: 12px 14px; }


/* ikony w przyciskach i tekstach */
.ico.in { width: 1.1em; height: 1.1em; margin-right: .42em; vertical-align: -.2em; flex: none; }
.icon-btn .ico.in, #emojiBtn .ico.in, #chatForm button[type=submit] .ico.in { margin-right: 0; }
#emojiBtn { font-size: 18px; color: #ffd54a; }
.pool-head .ico.in { color: var(--accent2); }
.mute-toggle span { display: inline-flex; align-items: center; }
.free-intro .gift { font-size: 54px; color: #ffd54a; }
.picker-note .ico.in { color: #ffd54a; }
.near-tag { display: inline-flex; align-items: center; }
.near-tag .ico.in { margin-right: .2em; }
.hint-line .ico.in { color: #ffd54a; }
.all-ready .ico.in { color: #ffd54a; }
[hidden] { display: none !important; }

/* ranking – własna numeracja, wewnętrzne marginesy (awatar nie jest ucinany) */
.scoreboard { list-style: none; padding: 0; counter-reset: rk; display: flex; flex-direction: column; gap: 4px; }
.scoreboard li { counter-increment: rk; align-items: center; padding: 6px 10px 6px 8px; }
.scoreboard li::before { content: counter(rk); flex: 0 0 18px; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.scoreboard li:nth-child(1)::before { color: #ffd54a; }
.scoreboard li:nth-child(2)::before { color: #cfd8e3; }
.scoreboard li:nth-child(3)::before { color: #e0a46a; }
.scoreboard li .nm-wrap { flex: 1; }
.scoreboard li .s { min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 999px; background: rgba(30,215,96,.12); font-size: 14px; }
.scoreboard li.me { background: rgba(178,141,255,.12); box-shadow: inset 0 0 0 1px rgba(178,141,255,.28); }
[hidden]{display:none!important}

.ico.in.after { margin: 0 0 0 .42em; }
.ico.in.solo { margin: 0; }
.part.picker { color: var(--muted); }
[hidden]{display:none!important}

#backLobbyBtn { width: auto; padding: 16px 38px; }
[hidden]{display:none!important}

.beam { display: none; } /* snop rysowany teraz na canvasie */
[hidden]{display:none!important}

/* ---------- przejścia między ekranami ---------- */
.anim-rise { animation: scrRise .6s cubic-bezier(.2,.9,.3,1.08) both; }
.anim-pop  { animation: scrPop .55s cubic-bezier(.2,1.4,.4,1) both; }
.anim-zoom { animation: scrZoom .7s cubic-bezier(.2,.9,.3,1) both; }
@keyframes scrRise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes scrPop  { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes scrZoom { from { opacity: 0; transform: scale(1.06); filter: blur(10px) brightness(1.6); } to { opacity: 1; transform: none; filter: none; } }

.wipe { position: fixed; inset: 0; z-index: 900; pointer-events: none; overflow: hidden; display: none; }
.wipe.go { display: block; }
.wipe i { position: absolute; top: -20%; bottom: -20%; left: -10%; width: 130%; transform: translateX(-130%) skewX(-18deg); }
.wipe .s1 { background: linear-gradient(90deg, #7b4dff, #b28dff); }
.wipe .s2 { background: linear-gradient(90deg, #ff6b9d, #ff9a6b); }
.wipe .s3 { background: radial-gradient(ellipse at 50% 50%, #241a3d, #0d0b12 75%); }
.wipe.go .s1 { animation: wipeBar 1.35s cubic-bezier(.7,0,.3,1) both; }
.wipe.go .s2 { animation: wipeBar 1.35s cubic-bezier(.7,0,.3,1) .06s both; }
.wipe.go .s3 { animation: wipeBar 1.35s cubic-bezier(.7,0,.3,1) .12s both; }
@keyframes wipeBar { 0% { transform: translateX(-130%) skewX(-18deg); } 38%, 58% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(130%) skewX(-18deg); } }
.wipe-txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: clamp(34px, 7vw, 72px); font-weight: 900; letter-spacing: .02em;
  color: #fff; opacity: 0; }
.wipe.go .wipe-txt { animation: wipeTxt 1.35s ease both; }
.wipe-txt span { background: linear-gradient(90deg, #fff, #ffd54a, #ff9ad0); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(178,141,255,.7)); }
.wipe-ic { width: 1em; height: 1em; color: #ffd54a; filter: drop-shadow(0 0 14px rgba(255,213,74,.7)); }
@keyframes wipeTxt { 0%, 26% { opacity: 0; transform: scale(.6) rotate(-4deg); filter: blur(0); } 38% { opacity: 1; transform: scale(1.08) rotate(0); filter: blur(0); } 46%, 56% { opacity: 1; transform: scale(1); filter: blur(0); } 68%, 100% { opacity: 0; transform: scale(1.3); filter: blur(8px); } }
@media (prefers-reduced-motion: reduce) { .anim-rise, .anim-pop, .anim-zoom { animation: none !important; } }
[hidden]{display:none!important}

.msg.admin { background: rgba(255,213,74,.10); border: 1px solid rgba(255,213,74,.45); color: #ffe9a8; font-weight: 600; }
[hidden]{display:none!important}

/* ---------- panel startu: liczba piosenek ---------- */
.start-box { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 6px; }
.rounds-box { background: #0f0d16; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.rounds-box .pool-head .ico.in { color: var(--accent2); }
.rounds-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rounds-ctl .step { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 22px; font-weight: 800; line-height: 1;
  background: rgba(178,141,255,.12); color: var(--text); border: 1px solid rgba(178,141,255,.35); }
.rounds-ctl .step:hover:not(:disabled) { background: rgba(178,141,255,.28); }
.rounds-ctl .step:disabled { opacity: .35; }
.rounds-val { min-width: 92px; text-align: center; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.rounds-val span { display: inline-block; font-size: 40px; font-weight: 900; background: linear-gradient(180deg, #fff, #cdb8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rounds-val small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.presets { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.presets button { min-width: 48px; padding: 9px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: transparent; color: var(--text); border: 1px solid var(--line); }
.presets button:hover:not(:disabled) { border-color: var(--accent2); }
.presets button.on { background: var(--accent2); color: #1a0c33; border-color: var(--accent2); }
.presets button:disabled { opacity: .3; }
.rounds-box .hint { margin: 8px 0 0; }
.start-big { align-self: center; min-width: 260px; font-size: 19px; padding: 15px 34px; border-radius: 999px;
  background: linear-gradient(90deg, #1ed760, #2ee6a0); color: #06210f; box-shadow: 0 8px 26px rgba(30,215,96,.3); }
.start-big:disabled { background: #2a2733; color: var(--muted); box-shadow: none; opacity: 1 !important; }
/* pula: etykieta obok, chipy zawijają się w swojej kolumnie */
.pool-row { display: grid; grid-template-columns: 70px 1fr; align-items: start; gap: 10px; }
.pool-row .lbl { padding-top: 7px; min-width: 0; }
@media (max-width: 520px) { .presets { margin-left: 0; width: 100%; } .start-big { min-width: 0; width: 100%; } }
[hidden]{display:none!important}

/* ---------- Postaw mi kawę ---------- */
.coffee-btn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; margin: 18px auto 0; padding: 9px 18px; border-radius: 999px;
  color: #ffdd7a; background: rgba(255,213,74,.08); border: 1px solid rgba(255,213,74,.35); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, transform .2s; }
.coffee-btn:hover { background: rgba(255,213,74,.18); transform: translateY(-1px); }
#lobby .coffee-btn { display: flex; width: fit-content; }
.coffee-pill { color: #ffdd7a !important; border-color: rgba(255,213,74,.35) !important; }
[hidden]{display:none!important}

/* ---------- tryb Swobodny: wybieranie piosenek ---------- */
.pick-hero { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(30,215,160,.12), rgba(47,143,255,.10)); border: 1px solid rgba(47,180,255,.28); }
.pick-hero .mode-ic { width: 58px; height: 58px; border-radius: 16px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff; transform: rotate(-6deg); box-shadow: 0 8px 22px rgba(47,143,255,.3); }
.pick-hero .mode-ic .ico.in { margin: 0; width: 1em; height: 1em; }
.pick-title { font-size: 20px; font-weight: 800; }
.pick-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.pick-tip { display: flex; align-items: center; gap: 2px; margin: 8px 2px 0; }
.pick-mine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; padding: 12px 14px; border: 1px dashed rgba(178,141,255,.55); border-radius: 14px; background: rgba(178,141,255,.05); }
.pick-mine .lbl { font-weight: 800; display: inline-flex; align-items: center; }
.pick-mine .lbl .ico.in { color: var(--accent2); }
.pick-mine #myPicks { margin: 0; }
.pick-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 14px 2px 6px; }
.pick-status { margin: 0 0 14px; }
.pick-host { gap: 10px; margin-top: 6px; }
.pick-host #beginRoundsBtn { padding: 16px 36px; font-size: 17px; border-radius: 999px; background: linear-gradient(90deg, #1ed760, #2ee6a0); color: #06210f; box-shadow: 0 8px 22px rgba(30,215,96,.25); }
.pick-host #beginRoundsBtn:disabled { background: #2a2733; color: var(--muted); box-shadow: none; opacity: 1; }
[hidden]{display:none!important}

/* ---------- bonus za szybkość ---------- */
.speed-tag { display: inline-block; margin: 8px auto 0; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #ffe08a; background: rgba(255,213,74,.10); border: 1px solid rgba(255,213,74,.35); }
.speed-tag.fast { color: #1a1200; background: linear-gradient(90deg, #ffd54a, #ffb13b); border-color: transparent; box-shadow: 0 0 18px rgba(255,200,60,.45); animation: speedPulse 1s ease-in-out infinite; }
@keyframes speedPulse { 50% { transform: scale(1.05); } }
.part.speed { color: #ffd54a !important; }
[hidden]{display:none!important}

/* ---------- drużyny ---------- */
.teams-box { background: #0f0d16; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.teams-box .pool-head .ico.in { color: var(--accent2); }
.teams-box .chip.shuffle { border-style: dashed; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.team-col { border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); background: color-mix(in srgb, var(--tc) 8%, transparent); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.team-col.mine { box-shadow: 0 0 0 2px var(--tc), 0 0 22px color-mix(in srgb, var(--tc) 35%, transparent); }
.team-name { font-weight: 800; color: var(--tc); }
.team-members { display: flex; flex-direction: column; gap: 5px; min-height: 30px; }
.team-members .tm { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.team-col .sm { align-self: flex-start; padding: 5px 12px; font-size: 12px; }
.team-you { font-size: 12px; font-weight: 700; color: var(--tc); }
.teams-box .hint { margin: 10px 0 0; }
.lp.has-team .ring { box-shadow: 0 0 0 3px var(--tc); border-radius: 50%; }
.team-dot { display: inline-flex; color: var(--tc); margin-right: 4px; flex: none; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--tc) 60%, transparent)); }
.team-dot .team-ic { width: 15px; height: 15px; margin: 0; }
.team-board { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tb-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.tb-n { color: var(--tc); font-weight: 800; }
.tb-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.tb-bar i { display: block; height: 100%; background: var(--tc); transition: width .6s cubic-bezier(.2,.9,.3,1); }
.team-final { max-width: 560px; margin: 4px auto 18px; display: flex; flex-direction: column; gap: 8px; }
.tf-title { text-align: center; font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.tf-row { display: grid; grid-template-columns: 100px auto 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); background: color-mix(in srgb, var(--tc) 7%, transparent); opacity: 0; animation: tfIn .5s cubic-bezier(.2,1.4,.4,1) var(--d) forwards; }
@keyframes tfIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.tf-row.win { box-shadow: 0 0 0 2px var(--tc), 0 0 26px color-mix(in srgb, var(--tc) 40%, transparent); }
.tf-name { color: var(--tc); font-weight: 800; }
.tf-av { display: flex; }
.tf-av > * { margin-right: -6px; }
.tf-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.tf-bar i { display: block; height: 100%; width: 0; background: var(--tc); animation: tfGrow 1s cubic-bezier(.2,.9,.3,1) calc(var(--d) + .3s) forwards; }
@keyframes tfGrow { to { width: var(--w); } }
.tf-sub { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: 10px; }
[hidden]{display:none!important}

/* ikonki drużyn */
.team-ic { color: var(--tc); }
.team-name { display: flex; align-items: center; gap: 6px; }
.team-badge { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: color-mix(in srgb, var(--tc) 20%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent); }
.team-badge .team-ic { width: 19px; height: 19px; margin: 0; }
.tb-n { display: inline-flex; align-items: center; }
.tb-n .team-ic { width: 14px; height: 14px; margin-right: 5px; }
.tf-name { display: inline-flex; align-items: center; }
.tf-name .team-ic { width: 18px; height: 18px; margin-right: 6px; }
.tf-title .team-ic.big { width: 24px; height: 24px; margin: 0 6px 0 2px; vertical-align: -.25em; color: inherit; }
.tc-icons { display: inline-flex; gap: 1px; margin-right: 6px; opacity: .85; }
.tc-icons .ico { width: 13px; height: 13px; }
[hidden]{display:none!important}

/* awatar z Discorda w oknie wyboru */
.dc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-pick { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(88,101,242,.12); border: 2px solid rgba(88,101,242,.4); color: var(--text); font-weight: 600; }
.dc-pick.sel { border-color: #5865f2; box-shadow: 0 0 0 3px rgba(88,101,242,.3); }
.dc-row .discord.sm { padding: 8px 14px; font-size: 13px; }
[hidden]{display:none!important}

/* drużyny: układ zależny od liczby drużyn */
.teams-grid[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.teams-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
.teams-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
.team-name { min-width: 0; }
.team-name .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, transparent); }
.team-members .hint { margin: 0; }
@media (max-width: 560px) { .teams-grid[data-n="3"], .teams-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .teams-grid[data-n] { grid-template-columns: 1fr; } }
[hidden]{display:none!important}

/* ---------- dużo graczy (do 20) ---------- */
.lobby-players.compact { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.lobby-players.compact .lp { padding: 10px 6px 8px; border-radius: 13px; }
.lobby-players.compact .lp .ring { width: 52px; height: 52px; margin-bottom: 6px; }
.lobby-players.compact .lp .nm { font-size: 12.5px; }
.lobby-players.compact .lp .st { font-size: 11px; }
.lobby-players.compact .lp .badge { width: 20px; height: 20px; top: 5px; right: 6px; }
.lobby-players.compact .lp .badge .ico { width: 12px; height: 12px; }
.scoreboard li.off { opacity: .5; }
.scoreboard .off-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; font-weight: 500; }
.scoreboard.compact { gap: 2px; }
.scoreboard.compact li { padding: 3px 8px 3px 6px; font-size: 13.5px; }
.scoreboard.compact li .av { width: 22px !important; height: 22px !important; font-size: 13px !important; }
.scoreboard.compact li .s { padding: 1px 7px; font-size: 13px; }
.scoreboard.compact li::before { font-size: 11px; flex-basis: 16px; }
[hidden]{display:none!important}

/* dużo graczy: wyniki rundy, ekran końcowy, składy drużyn */
table.results.compact td { padding: 4px 8px; vertical-align: middle; }
table.results.compact td .part { display: inline; margin-right: 10px; }
table.results.compact .av { width: 22px !important; height: 22px !important; font-size: 13px !important; }
.rest.cols { max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.rest.cols li { padding: 5px 8px; }
@media (max-width: 560px) { .rest.cols { grid-template-columns: 1fr; } }
.tf-row { grid-template-columns: minmax(110px, auto) auto 1fr auto; }
.tf-name { white-space: nowrap; }
.tf-more { font-size: 11px; font-weight: 800; color: var(--tc); margin-left: 10px; align-self: center; }
.team-members.many { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.team-members.many .tm { font-size: 12px; padding: 2px 8px 2px 2px; border-radius: 999px; background: rgba(255,255,255,.05); gap: 4px; }
.team-members.many .tm .av { width: 18px !important; height: 18px !important; font-size: 11px !important; }
[hidden]{display:none!important}

.hint-next { margin-left: 10px; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
[hidden]{display:none!important}

/* komunikaty: sukces (zielony) i informacja (fioletowy) zamiast czerwonego błędu */
.error.toast-ok { background: #123222; color: #c9ffd9; border-color: #1f7a45; }
.error.toast-info { background: #241c3a; color: #e2d6ff; border-color: #5b46a0; }
[hidden]{display:none!important}

/* ocena piosenki */
.rate-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.rate-q { color: var(--muted); font-size: 13px; margin-right: 4px; }
.rate-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 15px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text); transition: transform .15s, background .2s; }
.rate-btn b { font-size: 13px; }
.rate-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.09); }
.rate-btn.on[data-rate="1"] { background: rgba(30,215,96,.18); border-color: rgba(30,215,96,.6); }
.rate-btn.on[data-rate="-1"] { background: rgba(255,107,107,.16); border-color: rgba(255,107,107,.55); }
/* kto pisze… */
.typing { display: inline-flex; gap: 3px; align-items: center; padding: 3px 6px; border-radius: 999px; background: rgba(178,141,255,.16); vertical-align: middle; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: #cdb8ff; animation: typingDot 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
[hidden]{display:none!important}

/* ---------- mini-gra: rozkręć kulę ---------- */
.spin-box { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; background: #0f0d16; box-shadow: 0 0 calc(var(--sg, 0) * 40px) hsla(var(--sh, 270), 90%, 60%, calc(var(--sg, 0) * .55)), inset 0 0 calc(var(--sg, 0) * 30px) hsla(var(--sh, 270), 90%, 60%, calc(var(--sg, 0) * .25)); transition: box-shadow .15s; border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px 22px 26px; margin-bottom: 16px; }
.spin-stage { position: relative; width: 130px; height: 130px; flex: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.spin-stage:active .lobby-ball { transform: scale(.96); }
.lobby-ball { width: 150px; height: 150px; margin: -10px; display: block; transition: transform .08s, filter .6s; }
.lobby-ball.gold { filter: sepia(1) saturate(3.5) hue-rotate(-12deg) brightness(1.15) drop-shadow(0 0 18px rgba(255,213,74,.8)); }
.spin-stage .spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; animation: spark .8s ease-out forwards; }
.spin-pop { position: absolute; transform: translate(-50%, -50%); pointer-events: none; animation: spinPop .9s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes spinPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 25% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -140%) scale(.9); } }
.spin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.spin-title { font-weight: 800; }
.spin-title .hint { font-weight: 500; margin-left: 6px; }
.spin-count { font-size: 14px; }
.spin-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.spin-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b28dff, #ff6bcd, #ffd54a); transition: width .4s; }
.spin-dj { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 480px) { .spin-stage { width: 100px; height: 100px; } .lobby-ball { width: 120px; height: 120px; } .spin-title .hint { display: block; margin: 2px 0 0; } }
[hidden]{display:none!important}

/* efekty klikania kuli */
.spin-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.spin-box > .spin-stage, .spin-box > .spin-info { position: relative; z-index: 1; }
.spin-plus { position: absolute; transform: translate(-50%, -50%); pointer-events: none; font-weight: 900; font-size: 15px; color: #ffd54a; text-shadow: 0 0 8px rgba(255,213,74,.8); animation: plusFly .8s ease-out forwards; }
@keyframes plusFly { from { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } to { opacity: 0; transform: translate(-50%, -170%) scale(.9); } }
.spin-combo { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; pointer-events: none; z-index: 2;
  font-weight: 900; font-size: 13px; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; color: #fff;
  background: hsl(var(--ch, 280), 85%, 55%); box-shadow: 0 0 14px hsla(var(--ch, 280), 90%, 60%, .8); }
[hidden]{display:none!important}

/* deszcz reakcji */
#game .card.main { position: relative; }
.reaction-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; border-radius: inherit; }
#mysteryBox { position: relative; }
.reaction-rain span { position: absolute; bottom: -40px; opacity: 0; animation: rainUp linear forwards; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
@keyframes rainUp {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.6); }
  10% { opacity: 1; transform: translate(calc(var(--sw) * .2), calc(var(--rise) * -.12)) rotate(calc(var(--rt) * .3)) scale(1); }
  50% { transform: translate(var(--sw), calc(var(--rise) * -.5)) rotate(var(--rt)) scale(1.05); }
  100% { opacity: 0; transform: translate(calc(var(--sw) * -.4), calc(var(--rise) * -1)) rotate(calc(var(--rt) * -1)) scale(.9); }
}
[hidden]{display:none!important}

/* tańczące awatary w rankingu */
.scoreboard li .react-host { position: relative; display: inline-flex; }
.scoreboard li.dancing .react-host .av { transform: translateY(var(--dy, 0)) scale(var(--ds, 1)) rotate(var(--dr, 0)); transition: transform .06s linear;
  box-shadow: 0 0 0 2px rgba(178,141,255, calc(var(--dg, 0) * .9)), 0 0 calc(var(--dg, 0) * 14px) rgba(255,107,205, calc(var(--dg, 0) * .8)); }
.scoreboard li.dancing.groove .react-host .av { box-shadow: 0 0 0 2px rgba(255,213,74, calc(.4 + var(--dg, 0) * .6)), 0 0 calc(var(--dg, 0) * 18px) rgba(255,213,74, calc(var(--dg, 0) * .9)); }
.dance-spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; animation: danceSpark .7s ease-out forwards; }
@keyframes danceSpark { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy2))) scale(.2); opacity: 0; } }
[hidden]{display:none!important}

/* czapki */
.react-host, .lp .ring { position: relative; }
.hat { position: absolute; pointer-events: none; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.hat-crown { left: 50%; top: -11px; transform: translateX(-50%) rotate(-12deg); font-size: 15px; }
.hat-shades { left: 50%; top: 22%; transform: translateX(-50%); font-size: 15px; }
.hat-clown { right: -6px; bottom: -5px; font-size: 13px; }
.lp .ring .hat-crown { font-size: 26px; top: -18px; }
.lp .ring .hat-shades { font-size: 26px; }
.lp .ring .hat-clown { font-size: 22px; right: -4px; bottom: -2px; }
/* rzucanie */
.react-host.throwable { cursor: pointer; }
.throw-pop { position: fixed; z-index: 950; transform: translateY(-50%); background: #17131f; border: 1px solid #3a3150; border-radius: 14px; padding: 8px; display: flex; gap: 4px; flex-wrap: wrap; width: 182px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.throw-pop .tp-h { width: 100%; font-size: 12px; color: var(--muted); padding: 0 4px 4px; }
.throw-pop button { font-size: 24px; width: 40px; height: 40px; padding: 0; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: transform .12s; }
.throw-pop button:hover { transform: scale(1.15) rotate(-6deg); background: rgba(255,255,255,.1); }
.throw-fly { position: fixed; z-index: 960; font-size: 28px; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.throw-bit { position: fixed; z-index: 960; pointer-events: none; font-size: 14px; font-weight: 900; transform: translate(-50%,-50%); animation: bitFly .7s ease-out forwards; }
@keyframes bitFly { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; } }
.hit-deco { position: absolute; left: 50%; top: 50%; pointer-events: none; animation: hitDeco 3.5s ease-out forwards; }
.hit-tomato { font-size: 22px; filter: drop-shadow(0 0 4px rgba(255,59,48,.7)); }
.hit-pie { font-size: 22px; }
.hit-flowers, .hit-heart { font-size: 16px; animation-name: hitFloat; }
@keyframes hitDeco { 0% { transform: translate(-50%,-50%) scale(1.5); opacity: 1; } 10% { transform: translate(-50%,-50%) scale(1) rotate(-8deg); } 80% { opacity: .95; transform: translate(-50%,-30%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%,20%) scale(.9); } }
@keyframes hitFloat { 0% { transform: translate(-50%,-50%) scale(1.4); opacity: 1; } 100% { transform: translate(-50%,-180%) scale(.8); opacity: 0; } }
/* świerszcze */
#results { position: relative; }
#results.crickets > :not(.tumbleweed):not(.cricket-txt) { filter: brightness(.6) saturate(.6); transition: filter .4s; }
.tumbleweed { position: absolute; bottom: 8px; left: -70px; width: 56px; height: 56px; pointer-events: none; animation: tumble 3.4s linear forwards; z-index: 5; }
.tumbleweed svg { width: 100%; height: 100%; animation: tumbleSpin .7s linear infinite; }
@keyframes tumble { 0% { left: -70px; transform: translateY(0); } 25% { transform: translateY(-18px); } 35% { transform: translateY(0); } 60% { transform: translateY(-10px); } 70% { transform: translateY(0); } 100% { left: calc(100% + 20px); transform: translateY(0); } }
@keyframes tumbleSpin { to { transform: rotate(360deg); } }
.cricket-txt { background: rgba(20,16,28,.85); padding: 4px 14px; border-radius: 99px; border: 1px solid #3a3150; position: absolute; left: 50%; top: 52%; transform: translateX(-50%); font-size: 20px; color: #d9cfb0; pointer-events: none; z-index: 5; animation: crickTxt 3.4s ease forwards; white-space: nowrap; }
@keyframes crickTxt { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* szerokie monitory: rozciągnięte i powiększone panele */
@media (min-width: 1400px) {
  main { max-width: 1280px; padding: 26px 28px; }
  .layout { grid-template-columns: 1fr 360px; gap: 22px; }
  .chat-card { height: 540px; }
  .viz { width: 320px; height: 320px; }
  .disco-wrap { width: 520px; height: 450px; }
  .hero { max-width: 580px; }
  .lobby-players { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
@media (min-width: 1800px) {
  main { max-width: 1480px; zoom: 1.12; }
  header { zoom: 1.12; }
  .layout { grid-template-columns: 1fr 380px; }
  .chat-card { height: 580px; }
}
@media (min-width: 2400px) {
  main { max-width: 1600px; zoom: 1.3; }
  header { zoom: 1.3; }
}

/* stała wysokość panelu z utworem — nic nie skacze, gdy pojawia się zegar / bonus / odliczanie */
#mysteryBox .timer { height: 50px; line-height: 50px; }
#mysteryBox #countdown { min-height: 19px; }
#mysteryBox #speedTag { min-height: 26px; box-sizing: border-box; }

/* mniejszy panel z wizualizerem — więcej miejsca na odpowiedzi i większy tekst */
#mysteryBox { padding: 8px 14px 10px; margin: 10px 0; }
#mysteryBox .viz { width: 200px; height: 200px; margin: -8px auto -12px; }
#mysteryBox .timer { height: 42px; line-height: 42px; font-size: 30px; margin-top: 4px; }
@media (min-width: 1400px) { #mysteryBox .viz { width: 220px; height: 220px; } }

/* przejście ekranu wyników rundy */
#results .reveal { position: relative; overflow: hidden; }
#results.rv-anim .reveal { animation: rvCard .6s cubic-bezier(.2,.9,.3,1.15) both; }
#results.rv-anim .reveal::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%); transform: translateX(-120%); animation: rvShine .9s .45s ease-out both; }
#results.rv-anim .reveal .cover { animation: rvCover .6s .15s cubic-bezier(.2,.9,.3,1.2) both; }
#results.rv-anim .reveal-year { animation: rvPop .5s .2s cubic-bezier(.2,.9,.3,1.4) both; }
#results.rv-anim .reveal-title { animation: rvUp .45s .3s ease-out both; }
#results.rv-anim .reveal-artist { animation: rvUp .45s .4s ease-out both; }
#results.rv-anim > .hint { animation: rvUp .4s .5s ease-out both; }
#results.rv-anim .rate-box { animation: rvUp .4s .6s ease-out both; }
#results.rv-anim thead { animation: rvFade .3s .65s both; }
#results.rv-anim tbody tr { animation: rvRow .45s calc(.7s + var(--i, 0) * 90ms) cubic-bezier(.2,.9,.3,1.1) both; }
#results.rv-anim tbody td.pts { animation: rvPop .45s calc(.9s + var(--i, 0) * 90ms) cubic-bezier(.2,.9,.3,1.6) both; }
#results.rv-anim #nextBtn { animation: rvUp .4s calc(.9s + var(--rows, 3) * 90ms) ease-out both; }
@keyframes rvCard { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rvShine { to { transform: translateX(120%); } }
@keyframes rvCover { from { opacity: 0; transform: perspective(500px) rotateY(90deg) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes rvPop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.15); } 100% { transform: none; } }
@keyframes rvUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rvRow { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #results.rv-anim *, #results.rv-anim .reveal, #results.rv-anim .reveal::after { animation: none !important; } }

/* przejście przy zmianie trybu gry */
.mode-chip.mode-pick { animation: modePick .45s cubic-bezier(.2,.9,.3,1.3); position: relative; overflow: hidden; }
.mode-chip.mode-pick .mode-ic { animation: modeIc .55s cubic-bezier(.2,.9,.3,1.5); }
.mode-chip.mode-pick::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(200,170,255,.28) 50%, transparent 70%); animation: rvShine .7s .05s ease-out both; transform: translateX(-120%); }
@keyframes modePick { 0% { transform: scale(.97); box-shadow: 0 0 0 rgba(178,141,255,0); } 60% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes modeIc { 0% { transform: scale(.6) rotate(-20deg); } 70% { transform: scale(1.12) rotate(6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mode-chip.mode-pick, .mode-chip.mode-pick .mode-ic, .mode-chip.mode-pick::after { animation: none; } }

/* „kula wariuje” — ukryta kategoria Tryb swobodny */
.tile.tile-surprise { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.2); width: 190px; padding: 14px 12px; z-index: 8; opacity: 0; pointer-events: none;
  font-size: 17px; font-weight: 800; border: 2px solid #4dc3ff; background: linear-gradient(135deg, rgba(47,143,255,.95), rgba(178,141,255,.95)); color: #fff;
  box-shadow: 0 0 40px rgba(77,195,255,.8), 0 0 90px rgba(178,141,255,.5); transition: none; }
.tile.tile-surprise .tile-ic { font-size: 40px; color: #fff; }
.tile.tile-surprise small { display: block; font-size: 12px; font-weight: 600; opacity: .9; margin-top: 3px; }
.tile.tile-surprise.show { animation: surpriseIn .7s cubic-bezier(.2,.9,.3,1.5) forwards, surpriseGlow 1.2s .7s ease-in-out infinite; }
@keyframes surpriseIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-20deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } }
@keyframes surpriseGlow { 0%, 100% { box-shadow: 0 0 40px rgba(77,195,255,.8), 0 0 90px rgba(178,141,255,.5); } 50% { box-shadow: 0 0 60px rgba(77,195,255,1), 0 0 130px rgba(178,141,255,.8); } }
.disco-wrap.crazy { animation: crazyShake .12s linear infinite, crazyHue .6s linear infinite; }
@keyframes crazyShake { 0% { transform: translate(0,0); } 25% { transform: translate(-3px,2px) rotate(-.5deg); } 50% { transform: translate(3px,-2px); } 75% { transform: translate(-2px,-3px) rotate(.5deg); } 100% { transform: translate(0,0); } }
@keyframes crazyHue { to { filter: hue-rotate(360deg) saturate(1.6); } }
.disco-wrap.blackout > :not(.tile-surprise):not(.draw-title) { filter: brightness(.4); transition: filter .25s; }
.tile.off { opacity: .08 !important; filter: grayscale(1); transition: opacity .35s, filter .35s; }
.pick-timer { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 14px; background: rgba(77,195,255,.15); border: 1px solid rgba(77,195,255,.5); color: #9fe0ff; vertical-align: middle; font-variant-numeric: tabular-nums; }
.pick-timer.low { background: rgba(255,80,80,.15); border-color: rgba(255,80,80,.6); color: #ff9a9a; animation: speedPulse 1s ease-in-out infinite; }

/* seria trafień */
.part.streak { color: #ff9f43 !important; }
.streak-badge { display: inline-block; padding: 0 7px; margin-left: 2px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #1a0d00;
  background: linear-gradient(90deg, #ffb13b, #ff6a3d); box-shadow: 0 0 12px rgba(255,120,50,.55); animation: streakPulse 1.2s ease-in-out infinite; vertical-align: 1px; }
@keyframes streakPulse { 50% { transform: scale(1.1); box-shadow: 0 0 18px rgba(255,120,50,.85); } }
.react-host.on-fire::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg, #ff3d00, #ffb13b, #ffe066, #ff6a3d, #ff3d00); filter: blur(2px); animation: fireSpin 1.4s linear infinite; }
.react-host.on-fire > .av { position: relative; z-index: 1; }
.react-host .hat, .react-host .hit-deco { z-index: 2; }
@keyframes fireSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .streak-badge, .react-host.on-fire::before { animation: none; } }

/* powtórka najlepszych momentów */
.moments { max-width: 640px; margin: 4px auto 18px; opacity: 0; animation: dropIn .5s ease-out forwards; }
.moments-h { font-weight: 800; font-size: 15px; letter-spacing: .02em; margin-bottom: 10px; color: #d9ccff; }
.moments-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
@media (max-width: 620px) { .moments-list { grid-template-columns: 1fr; } }
.moment { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #0f0d16; border: 1px solid var(--line); opacity: 0; animation: dropIn .5s ease-out forwards; }
.m-cover { width: 54px; height: 54px; border-radius: 10px; flex: none; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.m-cover.none { display: flex; align-items: center; justify-content: center; font-size: 26px; background: linear-gradient(135deg, #2a2140, #17131f); }
.m-body { flex: 1; min-width: 0; }
.m-t { font-weight: 800; font-size: 14px; }
.m-who { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; margin-top: 3px; }
.m-song { font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.m-play { flex: none; width: 38px; height: 38px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(178,141,255,.15); color: #d9ccff; border: 1px solid rgba(178,141,255,.45); }
.m-play .ico { margin: 0; }
.m-play.on { background: var(--accent2); color: #1a0c33; box-shadow: 0 0 14px rgba(178,141,255,.6); animation: speedPulse 1s ease-in-out infinite; }

/* runda „Plagiat” */
.tile.tile-plag { border-color: #ff6bd6; background: linear-gradient(135deg, rgba(255,90,150,.95), rgba(150,80,255,.95)); box-shadow: 0 0 40px rgba(255,107,214,.8), 0 0 90px rgba(150,80,255,.5); }
.tile.tile-plag.show { animation: surpriseIn .7s cubic-bezier(.2,.9,.3,1.5) forwards, plagGlow 1.2s .7s ease-in-out infinite; }
@keyframes plagGlow { 0%, 100% { box-shadow: 0 0 40px rgba(255,107,214,.8), 0 0 90px rgba(150,80,255,.5); } 50% { box-shadow: 0 0 60px rgba(255,107,214,1), 0 0 130px rgba(150,80,255,.8); } }
.clip-tag { display: inline-flex; align-items: center; gap: 8px; margin: 6px auto 0; padding: 5px 14px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: rgba(255,107,214,.12); border: 1px solid rgba(255,107,214,.5); color: #ffd0f1; max-width: 100%; }
.clip-tag b { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #ff6bd6; color: #2a0820; font-size: 15px; }
.opt.now-playing:not(.sel) { border-color: #ff6bd6; box-shadow: 0 0 0 3px rgba(255,107,214,.2), 0 0 16px rgba(255,107,214,.35); }
.opt.now-playing::after { content: ' 🔊'; }

/* „Plagiat”: odpowiedzi zablokowane do końca słuchania */
#answerForm.locked .opt { opacity: .55; cursor: not-allowed; filter: saturate(.6); }
#answerForm.locked .opt.now-playing { opacity: 1; filter: none; }
#answerForm.decide-now .opt { animation: decidePop .6s cubic-bezier(.2,.9,.3,1.4); }
@keyframes decidePop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(255,107,214,.3); } 100% { transform: none; } }
[hidden]{display:none!important}
