:root {
  --bg: #0d0f15; --bg2: #151823; --bg3: #1c2030; --line: #262b3a; --fg: #e6e8ee; --mut: #8b93a7;
  --acc: #7c5cf0; --acc2: #a78bfa; --t: #f5a524; --ct: #5aa9fa; --red: #ef4444; --ok: #22c55e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 500px at 15% -10%, rgba(124,92,240,.18), transparent 60%), radial-gradient(700px 400px at 100% 0%, rgba(34,211,230,.10), transparent 60%); }
a { color: var(--acc2); }
button { font: inherit; color: inherit; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(13,15,21,.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.brand-icon { display: none !important; }
@media (max-width: 420px) { .brand-full { display: none !important; } .brand-icon { display: block !important; } }
.langs { display: inline-flex; align-items: center; background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px; }
.langs button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 2px 6px; cursor: pointer; color: var(--mut); font-weight: 700; font-size: 11.5px; letter-spacing: .04em; opacity: .55; }
.langs button + button { border-left: 1px solid rgba(255,255,255,.12); }
.langs button:hover { opacity: .85; }
.langs button.on { opacity: 1; color: #f0d9ff; }
.langs .flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); flex: none; }
.langs button:not(.on) .flag { filter: grayscale(.6); }
.hint { background: rgba(124,92,240,.12); border: 1px solid rgba(124,92,240,.45); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: #ddd6fe; margin-bottom: 10px; }
.btn.lobby { text-decoration: none; color: #ffb366; border-color: rgba(255,85,0,.55); display: inline-flex; align-items: center; }
.btn.lobby:hover { border-color: #ff5500; }
main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px 16px; }
.hero { max-width: 720px; margin: 4vh auto 0; text-align: center; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 0 0 8px; letter-spacing: -.01em; }
.lead { color: var(--mut); font-size: 16px; margin: 0 0 22px; }
.drop { display: block; border: 2px dashed #3a3f55; border-radius: 16px; padding: 38px 16px; cursor: pointer; background: rgba(21,24,35,.7); transition: .15s; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--acc); background: rgba(124,92,240,.10); outline: none; }
.drop.busy { pointer-events: none; opacity: .5; }
.drop-ico { font-size: 30px; color: var(--acc2); }
.drop-main { font-size: 17px; font-weight: 600; margin-top: 4px; }
.drop-sub { color: var(--mut); font-size: 12.5px; margin-top: 4px; }
.privacy { display: flex; gap: 8px; justify-content: center; align-items: flex-start; margin: 14px auto 0; color: #b7f7c8; font-size: 13px; max-width: 560px; text-align: left; }
.prog { margin-top: 18px; text-align: left; }
.prog-l { display: flex; justify-content: space-between; color: var(--mut); font-size: 13px; margin-bottom: 5px; }
.bar { height: 8px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22d3e6, #8f6df2, #d63cf0); transition: width .2s; }
.err { margin-top: 16px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.5); color: #fecaca; border-radius: 10px; padding: 10px 12px; text-align: left; }
.howto { margin-top: 26px; text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto ul { margin: 8px 0 2px; padding-left: 20px; color: #c9cdd8; }
.howto li { margin: 4px 0; }

.mhead { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.mtitle { font-size: 20px; font-weight: 700; }
.mtitle .sa { color: var(--ct); } .mtitle .sb { color: var(--t); }
.msub { color: var(--mut); font-size: 13px; word-break: break-all; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.btn:hover { border-color: var(--acc); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: #8b6cf5; }
.btn.ghost { background: none; }
.btn:disabled { opacity: .5; cursor: default; }
.scope { color: var(--acc2); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.scope button { background: none; border: 0; color: var(--mut); cursor: pointer; text-decoration: underline; padding: 0 4px; }
.cols { display: grid; grid-template-columns: 260px 1fr 1.3fr; gap: 12px; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; max-height: calc(100vh - 210px); overflow-y: auto; }
.col h3 { margin: 2px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); position: sticky; top: -10px; background: var(--bg2); padding: 4px 0; z-index: 1; }
.team { font-size: 12px; font-weight: 700; margin: 10px 0 4px; }
.team.A { color: var(--ct); } .team.B { color: var(--t); } .team.X { color: var(--mut); }
.pl { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.pl:hover { background: var(--bg3); }
.pl.sel { border-color: var(--acc); background: rgba(124,92,240,.14); }
.pl .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pl .st { color: var(--mut); font-size: 11.5px; white-space: nowrap; }
.pl a { color: var(--mut); text-decoration: none; font-size: 12px; }
.rnd { font-size: 11.5px; color: var(--mut); margin: 10px 0 4px; font-weight: 700; }
.clip { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; }
.clip:hover { background: var(--bg3); }
.clip .pb { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; cursor: pointer; flex-shrink: 0; font-size: 12px; }
.clip.playing .pb { background: var(--ok); }
.clip .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip .who.A { color: var(--ct); } .clip .who.B { color: var(--t); }
.clip .meta { color: var(--mut); font-size: 12px; margin-left: auto; white-space: nowrap; }
.clip .dl { color: var(--mut); text-decoration: none; padding: 0 4px; }
.msg { padding: 4px 6px; border-radius: 6px; font-size: 13px; display: grid; grid-template-columns: 58px 1fr; gap: 6px; }
.msg:hover { background: var(--bg3); }
.msg .tm { color: var(--mut); font-size: 11.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.msg .nm { font-weight: 600; }
.msg .nm.A { color: var(--ct); } .msg .nm.B { color: var(--t); }
.msg .kd { font-size: 10.5px; border-radius: 4px; padding: 0 4px; margin-right: 4px; background: var(--bg3); color: var(--mut); }
.msg.server { color: var(--mut); font-style: italic; }
.chk { display: flex; gap: 6px; align-items: center; color: var(--mut); font-size: 12.5px; margin-bottom: 6px; }
.empty { color: var(--mut); font-size: 13px; padding: 8px 4px; }
footer { border-top: 1px solid var(--line); color: var(--mut); font-size: 12px; text-align: center; padding: 14px 16px; }
footer p { margin: 4px auto; max-width: 820px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--acc); border-radius: 10px; padding: 9px 14px; z-index: 20; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .col { max-height: none; }
}
[hidden] { display: none !important; }
