/* ---------------- lobby (Fortnite-style layout, pixel-splat look) ---------------- */
#lobby { position: fixed; inset: 0; z-index: 8; pointer-events: none; font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif; }
#lobby[hidden] { display: none; }
#lobby > * { pointer-events: auto; }
#lobby header { position: absolute; left: 0; right: 0; top: 0; height: 58px; display: flex; align-items: center; gap: 26px; padding: 0 22px; background: linear-gradient(#0b1a3acc, #0b1a3a00); }
#lobby .logo { font-size: 26px; font-style: italic; letter-spacing: 1px; color: #fff; text-shadow: 3px 3px 0 #1d3cff, 6px 6px 0 #000; }
#lobby .logo span { color: #ffe14a; margin-left: 6px; }
#lobby nav { display: flex; gap: 4px; }
#lobby nav button { background: none; border: 0; color: #c9d6ff; font: italic 17px "Arial Black", Impact, sans-serif; padding: 8px 14px; cursor: pointer; letter-spacing: 1px; border-bottom: 4px solid transparent; }
#lobby nav button.on, #lobby nav button:hover { color: #fff; border-bottom-color: #ffe14a; }
#lobby .me { margin-left: auto; display: flex; gap: 10px; align-items: center; font: 12px ui-monospace, Consolas, monospace; color: #c9d6ff; }
#lobby .me input { background: #0b1430; border: 2px solid #3a5bd8; color: #fff; font: bold 14px ui-monospace, Consolas, monospace; padding: 5px 8px; width: 160px; }
#lb-conn { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); background: #a0201a; color: #fff; padding: 6px 14px; font: bold 12px ui-monospace, monospace; }
#lb-conn[hidden] { display: none; }
#lobby .tab { position: absolute; inset: 58px 0 0 0; pointer-events: none; }
#lobby .tab > * { pointer-events: auto; }
#lobby .tab[hidden] { display: none; }
#lobby[data-tab=maps], #lobby[data-tab=locker], #lobby[data-tab=sounds] { background: radial-gradient(ellipse at 50% 30%, #1a3a9acc, #050a1ef2 70%); }
#lobby .left { position: absolute; left: 18px; top: 12px; bottom: 18px; width: 300px; display: flex; flex-direction: column; gap: 8px; }
#lobby h4 { margin: 8px 0 2px; font: italic 15px "Arial Black", Impact, sans-serif; color: #ffe14a; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; text-shadow: 2px 2px 0 #000; }
#lobby h4 code { font: bold 13px ui-monospace, monospace; color: #fff; background: #1d3cff; padding: 1px 6px; }
#lobby h4 button { margin-left: auto; font: bold 10px ui-monospace, monospace; background: #ffe14a; color: #000; border: 0; padding: 4px 7px; cursor: pointer; }
#lobby ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#lobby li { display: flex; align-items: center; gap: 8px; background: #0b1430d9; border-left: 4px solid #3a5bd8; padding: 7px 8px; font: bold 13px ui-monospace, Consolas, monospace; color: #fff; }
#lobby li.empty { font-weight: normal; color: #9fb0e8; border-left-color: #555; font-size: 11px; }
#lobby li .dot { width: 10px; height: 10px; flex: none; box-shadow: 0 0 0 2px #000; }
#lobby li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby li em { color: #9fb0e8; font-style: normal; font-weight: normal; }
#lobby li .st { font-size: 9px; color: #9fb0e8; letter-spacing: 1px; }
#lobby li .st.rdy { color: #8dff6a; }
#lobby li .crown { color: #ffe14a; font-style: normal; margin-right: 4px; }
#lobby li button { background: #1d3cff; color: #fff; border: 0; font: bold 10px ui-monospace, monospace; padding: 4px 6px; cursor: pointer; }
#lobby li button.inv { background: #ffe14a; color: #000; }
#lobby label.chk { font: 11px ui-monospace, monospace; color: #c9d6ff; display: flex; gap: 6px; align-items: center; }
#lb-leave { align-self: flex-start; background: #4a1414; color: #fff; border: 0; font: bold 11px ui-monospace, monospace; padding: 5px 9px; cursor: pointer; }
#lb-leave[hidden] { display: none; }
#lb-online-list { max-height: 34vh; overflow-y: auto; }
#lb-chat { margin-top: auto; background: #050a1ecc; border: 2px solid #1d2f6a; font: 12px ui-monospace, monospace; }
#lb-chatlog { height: 110px; overflow-y: auto; padding: 6px 8px; color: #dfe6ff; }
#lb-chatin { width: 100%; border: 0; border-top: 2px solid #1d2f6a; background: #0b1430; color: #fff; font: 12px ui-monospace, monospace; padding: 6px 8px; outline: none; }
#lobby .right { position: absolute; right: 22px; bottom: 22px; width: 330px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
#lb-mapcard { background: #0b1430e6; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
#lb-mapcard .img { height: 150px; background-size: cover; background-position: center; image-rendering: pixelated; }
#lb-mapcard .t { font: italic 20px "Arial Black", Impact, sans-serif; color: #fff; padding: 8px 10px 0; text-transform: uppercase; }
#lb-mapcard .s { font: 11px ui-monospace, monospace; color: #9fb0e8; padding: 0 10px 8px; }
#lb-change { margin: 0 10px 10px; width: calc(100% - 20px); background: #1d3cff; color: #fff; border: 0; font: italic 13px "Arial Black", Impact, sans-serif; padding: 7px; cursor: pointer; }
#lb-play { height: 74px; font: italic 38px "Arial Black", Impact, sans-serif; letter-spacing: 2px; color: #000; background: linear-gradient(#fff36a, #ffc21a); border: 3px solid #000; box-shadow: 5px 5px 0 #000; cursor: pointer; }
#lb-play:hover { filter: brightness(1.08); transform: translate(-1px, -1px); }
#lb-play.dim { filter: grayscale(.6) brightness(.7); }
#lb-play.rdy { background: linear-gradient(#a8ff7a, #4ed42a); }
#lb-status { text-align: center; font: bold 12px ui-monospace, monospace; color: #fff; text-shadow: 1px 1px 0 #000; }
#lb-back { background: #4ed42a; color: #000; border: 3px solid #000; font: italic 16px "Arial Black", Impact, sans-serif; padding: 8px; cursor: pointer; }
#lb-back[hidden] { display: none; }
#lb-invites { position: absolute; top: 70px; right: 22px; display: flex; flex-direction: column; gap: 8px; }
#lb-invites .invite { background: #ffe14a; color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: 10px 12px; font: bold 13px ui-monospace, monospace; display: flex; gap: 8px; align-items: center; animation: pop .25s; }
#lb-invites .invite button { border: 2px solid #000; background: #fff; font: bold 11px ui-monospace, monospace; padding: 5px 8px; cursor: pointer; }
#lb-invites .invite button.yes { background: #4ed42a; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
#lb-names { position: absolute; inset: 0; pointer-events: none !important; }
#lb-names .tag { position: absolute; transform: translate(-50%, -100%); text-align: center; font: italic 16px "Arial Black", Impact, sans-serif; color: #fff; text-shadow: 2px 2px 0 #000; white-space: nowrap; }
#lb-names .tag small { display: block; font: bold 10px ui-monospace, monospace; letter-spacing: 1px; font-style: normal; }
#lb-names .tag .crown { color: #ffe14a; }
#lb-toasts { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none !important; }
.toast { background: #0b1430f0; color: #fff; border: 2px solid #ffe14a; padding: 7px 14px; font: bold 13px ui-monospace, monospace; transition: opacity .5s; }
.toast.out { opacity: 0; }
.mapbar { display: flex; gap: 10px; align-items: center; padding: 12px 22px 4px; }
.mapbar input { background: #0b1430; border: 2px solid #3a5bd8; color: #fff; font: bold 14px ui-monospace, monospace; padding: 6px 9px; width: 260px; }
.mapbar button { background: #1d3cff; color: #fff; border: 0; font: bold 12px ui-monospace, monospace; padding: 8px 10px; cursor: pointer; }
#lb-crumbs { padding: 6px 22px; font: italic 18px "Arial Black", Impact, sans-serif; color: #fff; }
#lb-crumbs a { color: #ffe14a; }
#lobby .dim { color: #9fb0e8; font: 12px ui-monospace, monospace; font-style: normal; }
.grid { position: absolute; inset: 104px 0 0 0; overflow-y: auto; padding: 14px 22px 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; align-content: start; }
.card { position: relative; background: #0b1430; border: 3px solid #000; box-shadow: 4px 4px 0 #000; cursor: pointer; transition: transform .08s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; outline: 3px solid #ffe14a; }
.card.picked { outline: 3px solid #4ed42a; }
.card.busy { cursor: default; opacity: .7; }
.card .img { height: 132px; background-size: cover; background-position: center; image-rendering: pixelated; position: relative; }
.card.model .img { height: 170px; background-size: contain; background-repeat: no-repeat; background-color: #142050; }
.card .noimg { position: absolute; inset: 0; display: grid; place-items: center; font: bold 11px ui-monospace, monospace; color: #fff9; letter-spacing: 2px; }
.card .count { position: absolute; right: 6px; bottom: 6px; background: #ffe14a; color: #000; font: bold 11px ui-monospace, monospace; padding: 2px 6px; border: 2px solid #000; }
.card.pack { box-shadow: 4px 4px 0 #000, 9px 9px 0 #1d3cff, 12px 12px 0 #000; }
.card .meta { padding: 7px 9px 9px; }
.card .t { font: italic 15px "Arial Black", Impact, sans-serif; color: #fff; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .s { font: 10px ui-monospace, monospace; color: #9fb0e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .acts { position: absolute; left: 0; right: 0; top: 92px; display: none; gap: 6px; justify-content: center; }
.card:hover .acts { display: flex; }
.card .acts button { border: 2px solid #000; font: italic 13px "Arial Black", Impact, sans-serif; padding: 5px 12px; cursor: pointer; background: #fff; }
.card .acts button.play { background: #ffe14a; }
.thumbframe { position: fixed; left: -2000px; top: 0; width: 480px; height: 270px; border: 0; }
.pane { position: absolute; inset: 12px 22px 22px; overflow-y: auto; }
/* the RuneScape character editor: on the left, the stage (your character) stays visible */
#lobby .rsedit { position: absolute; left: 22px; top: 12px; bottom: 22px; width: 330px; overflow-y: auto; background: #050a1ee6; border: 3px solid #000; box-shadow: 5px 5px 0 #000; padding: 10px 14px; color: #fff; font: 12px ui-monospace, monospace; }
#lobby .rsedit h4 { margin: 0 0 8px; font: italic 17px "Arial Black", Impact, sans-serif; color: #ffe14a; }
#lb-rs .rsrow { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; gap: 8px; }
#lb-rs .rsrow b { color: #c9d6ff; min-width: 62px; }
#lb-rs .rsrow span { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#lb-rs button { background: #0b1430; color: #fff; border: 2px solid #1d2f6a; font: bold 12px ui-monospace, monospace; padding: 4px 9px; cursor: pointer; }
#lb-rs button:hover, #lb-rs button.on { border-color: #ffe14a; color: #ffe14a; }
#lb-rs em { font-style: normal; min-width: 52px; text-align: center; color: #ffe14a; }
#lb-rs .col i { width: 16px; height: 16px; border: 2px solid #000; cursor: pointer; display: inline-block; }
#lb-rs .col i.on { outline: 2px solid #ffe14a; outline-offset: 1px; }
#lb-rs .chk { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
#lb-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
#lb-sfx { width: 100%; border-collapse: collapse; font: 12px ui-monospace, monospace; color: #fff; }
#lb-sfx th { text-align: left; color: #ffe14a; padding: 6px; }
#lb-sfx td { padding: 4px 6px; border-top: 1px solid #1d2f6a; }
#lb-sfx td.b { white-space: nowrap; }
#lb-sfx input.pr { width: 100%; background: #0b1430; border: 1px solid #2a3f8a; color: #fff; font: 11px ui-monospace, monospace; padding: 4px; }
#lb-sfx button, #lb-sfx .up { background: #1d3cff; color: #fff; border: 0; font: bold 10px ui-monospace, monospace; padding: 4px 7px; cursor: pointer; margin-left: 3px; }
#lb-sfx button:disabled { opacity: .4; }
.badge { font: bold 9px ui-monospace, monospace; padding: 2px 5px; letter-spacing: 1px; }
.badge.h { background: #ff8a1a; color: #000; } .badge.c { background: #4ed42a; color: #000; } .badge.g { background: #b46aff; color: #000; } .badge.n { background: #555; color: #fff; }
#lb-sfx-key { color: #c9d6ff; font: 12px ui-monospace, monospace; margin-bottom: 10px; }
.addsfx { display: flex; gap: 6px; margin: 10px 0; }
.addsfx input { background: #0b1430; border: 1px solid #2a3f8a; color: #fff; font: 12px ui-monospace, monospace; padding: 6px; }
.addsfx button { background: #ffe14a; border: 0; font: bold 12px ui-monospace, monospace; padding: 6px 10px; cursor: pointer; }
/* spawn menu */
#spawnmenu { position: fixed; inset: 8% 12%; z-index: 7; background: #050a1ef2; border: 3px solid #000; box-shadow: 6px 6px 0 #000; display: flex; flex-direction: column; font: 12px ui-monospace, monospace; color: #fff; }
#spawnmenu[hidden] { display: none; }
#spawnmenu .bar { display: flex; gap: 10px; align-items: center; padding: 10px; background: #0b1a3a; }
#spawnmenu .bar b { font: italic 18px "Arial Black", Impact, sans-serif; color: #ffe14a; }
#spawnmenu .bar label { display: flex; gap: 4px; align-items: center; }
#spawnmenu input[type=text], #spawnmenu input:not([type]) { background: #0b1430; border: 2px solid #3a5bd8; color: #fff; font: bold 13px ui-monospace, monospace; padding: 5px 8px; }
#spawnmenu .list { flex: 1; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; align-content: start; }
#spawnmenu .list button { text-align: left; background: #0b1430; color: #fff; border: 2px solid #1d2f6a; font: 12px ui-monospace, monospace; padding: 6px; cursor: pointer; }
#spawnmenu .list button:hover { border-color: #ffe14a; }
#spawnmenu .list button.rd { border-left: 5px solid #ff5a8a; }
#spawnmenu .list button.bx { border-left: 5px solid #6ad0ff; }
#spawnmenu .list button.veh { border-left: 5px solid #ffe14a; background: #1a1a08; font-weight: bold; }
#vehud { position: absolute; right: 18px; bottom: 64px; text-align: right; font: bold 12px ui-monospace, monospace; color: #fff; text-shadow: 1px 1px 0 #000; }
#vehud[hidden] { display: none; }
#vehud .spd { font: italic 34px "Arial Black", Impact, sans-serif; color: #ffe14a; line-height: 1; }
#vehud .spd small { font: bold 12px ui-monospace, monospace; color: #fff; margin-left: 4px; }
#vehud .k { color: #9cd6ff; }
#grabhud { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); font: bold 11px ui-monospace, monospace; color: #ffe14a; text-shadow: 1px 1px 0 #000; letter-spacing: 1px; }
#killfeed { position: absolute; right: 14px; top: 44px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; font: bold 12px ui-monospace, monospace; }
#killfeed div { background: rgba(0,0,0,.55); padding: 2px 8px; color: #fff; }

#lobby.overgame { background: #050a1ec0; }
