@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Rubik:wght@400;600;800&display=swap');

:root { --accent: #ffb020; --accent2: #ff5a36; --panel: rgba(18, 22, 32, 0.86); --text: #f2f4f8; --muted: #a8b0c0; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: 'Rubik', system-ui, sans-serif; user-select: none; }
#game, #game canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 2px 3px rgba(0,0,0,.6); }
#crosshair { position: absolute; left: 50%; top: 50%; --gap: 8px; }
#crosshair .ch { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.ch.t { width: 2px; height: 9px; left: -1px; top: calc(-1 * var(--gap) - 9px); }
.ch.b { width: 2px; height: 9px; left: -1px; top: var(--gap); }
.ch.l { width: 9px; height: 2px; top: -1px; left: calc(-1 * var(--gap) - 9px); }
.ch.r { width: 9px; height: 2px; top: -1px; left: var(--gap); }
#crosshair .dot { position: absolute; width: 2px; height: 2px; left: -1px; top: -1px; background: #fff; }

#hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitmarker i { position: absolute; width: 10px; height: 2px; background: #fff; box-shadow: 0 0 2px #000; }
#hitmarker i:nth-child(1) { left: -16px; top: -10px; transform: rotate(45deg); }
#hitmarker i:nth-child(2) { left: 6px; top: -10px; transform: rotate(-45deg); }
#hitmarker i:nth-child(3) { left: -16px; top: 8px; transform: rotate(-45deg); }
#hitmarker i:nth-child(4) { left: 6px; top: 8px; transform: rotate(45deg); }
#hitmarker.head i { background: #ff3b3b; }
#hitmarker.on { animation: hm .22s ease-out forwards; }
@keyframes hm { 0% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0; transform: scale(1); } }

#dmgnums { position: absolute; left: 50%; top: 50%; }
.dn { position: absolute; font: 800 18px 'Rubik', system-ui, sans-serif; color: #fff; animation: dn .7s ease-out forwards; white-space: nowrap; }
.dn.head { color: #ff4040; font-size: 22px; }
@keyframes dn { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }

#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0, transparent 37vh, #000 37.3vh); }
#scope::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.9); }
#scope::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(0,0,0,.9); }

#vignette { position: absolute; inset: 0; box-shadow: inset 0 0 160px 40px rgba(220, 0, 0, 0.9); opacity: 0; transition: opacity .1s; }
#dmgdir { position: absolute; left: 50%; top: 50%; }
.dd { position: absolute; left: 0; top: 0; width: 0; height: 0; animation: ddf 1.2s ease-out forwards; }
.dd i { position: absolute; left: -45px; top: -140px; width: 90px; height: 16px; border-radius: 50% 50% 0 0; border-top: 6px solid rgba(255, 40, 40, .9); }
@keyframes ddf { 0% { opacity: 1; } 100% { opacity: 0; } }

#timer { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font: 26px 'Russo One', 'Arial Black', Impact, sans-serif; background: rgba(0,0,0,.35); padding: 4px 18px; border-radius: 6px; }
#leader { position: absolute; top: 12px; right: 14px; min-width: 210px; font-size: 15px; }
#leader div { display: flex; justify-content: space-between; gap: 14px; padding: 2px 8px; background: rgba(0,0,0,.28); margin-bottom: 2px; border-radius: 3px; }
#leader div.me { background: rgba(255, 176, 32, .35); }
#killfeed { position: absolute; top: 12px; left: 14px; font-size: 15px; }
#killfeed div { background: rgba(0,0,0,.4); padding: 3px 10px; margin-bottom: 3px; border-radius: 3px; animation: kfin .2s ease-out; }
#killfeed .w { color: var(--muted); margin: 0 6px; font-size: 13px; }
#killfeed .hs { color: #ff5050; font-weight: 800; margin-right: 4px; }
@keyframes kfin { from { transform: translateX(-20px); opacity: 0; } }
#killbanner { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); text-align: center; font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; }
#killbanner .kb { animation: kb 1.8s ease-out forwards; }
#killbanner .kb b { color: var(--accent2); }
#killbanner .kb small { display: block; font: 600 14px 'Rubik', system-ui, sans-serif; color: var(--accent); }
@keyframes kb { 0% { opacity: 0; transform: scale(1.4); } 10% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

#bottomleft { position: absolute; left: 14px; bottom: 14px; width: 340px; }
#chatlog { font-size: 14px; margin-bottom: 8px; }
#chatlog div { background: rgba(0,0,0,.35); padding: 2px 8px; margin-top: 2px; border-radius: 3px; transition: opacity 1s; overflow-wrap: anywhere; }
#chatlog div.old { opacity: 0; }
#chatlog b { color: var(--accent); }
#chatinput { pointer-events: auto; width: 100%; margin-bottom: 8px; padding: 6px 8px; border: 0; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; font: 14px 'Rubik', system-ui, sans-serif; outline: 2px solid var(--accent); }
#hpwrap { position: relative; height: 30px; background: rgba(0,0,0,.45); border-radius: 4px; overflow: hidden; }
#hpbar { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(#5be36f, #2fae45); transition: width .12s; }
#hpbar.low { background: linear-gradient(#ff6a5a, #c9302c); }
#hptext { position: absolute; left: 10px; top: 2px; font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; }
#ammo { position: absolute; right: 18px; bottom: 14px; text-align: right; }
#wname { font: 600 15px 'Rubik', system-ui, sans-serif; color: var(--muted); }
#amag { font: 44px 'Russo One', 'Arial Black', Impact, sans-serif; }
#amax { font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--muted); }
#reloadbar { height: 5px; width: 160px; margin-left: auto; background: rgba(0,0,0,.4); border-radius: 3px; overflow: hidden; visibility: hidden; }
#reloadbar div { height: 100%; width: 0; background: var(--accent); }
#netinfo { position: absolute; right: 14px; bottom: 120px; font-size: 12px; color: var(--muted); }

#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); padding: 18px 24px; border-radius: 10px; min-width: 520px; }
#scoreboard h2 { margin: 0 0 10px; font: 24px 'Russo One', 'Arial Black', Impact, sans-serif; }
#scoreboard small { font: 14px 'Rubik', system-ui, sans-serif; color: var(--muted); margin-left: 8px; }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 15px; }
#scoreboard th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.15); }
#scoreboard td { padding: 4px 8px; }
#scoreboard tr.me td { background: rgba(255, 176, 32, .25); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

#death { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); text-align: center; background: rgba(0,0,0,.55); padding: 18px 32px; border-radius: 10px; }
.dtitle { font: 34px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--accent2); }
#deathby { font-size: 18px; margin: 6px 0; }
#respawnin { font: 20px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--accent); }
.dclass { margin-top: 10px; font-size: 14px; color: var(--muted); }
.dclass b { color: #fff; }
kbd { background: #333a48; border-radius: 3px; padding: 1px 6px; color: #fff; font-family: inherit; }

#matchend { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#matchend h1 { font: 52px 'Russo One', 'Arial Black', Impact, sans-serif; margin: 0; color: var(--accent); }
#matchend h3 { margin: 6px 0 16px; font-weight: 600; }
#matchend ol { font-size: 18px; min-width: 300px; }

/* ---------- Menus ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(0,0,0,.15), rgba(0,0,0,.6)); overflow-y: auto; padding: 16px; }
.panel { background: var(--panel); border-radius: 14px; padding: 26px 30px; width: min(620px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.08); }
.logo { font: 64px/1 'Russo One', 'Arial Black', Impact, sans-serif; margin: 0; letter-spacing: 2px; color: #fff; text-shadow: 0 4px 0 #b4501f, 0 8px 18px rgba(0,0,0,.5); }
.logo span { color: var(--accent); margin-left: 10px; }
.tag { margin: 6px 0 18px; color: var(--muted); }
.panel h2 { font: 32px 'Russo One', 'Arial Black', Impact, sans-serif; margin: 0 0 14px; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
#nameinput { width: 100%; padding: 10px 12px; font: 600 18px 'Rubik', system-ui, sans-serif; border-radius: 8px; border: 2px solid #39414f; background: #1b202b; color: #fff; outline: none; }
#nameinput:focus { border-color: var(--accent); }
.classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.cls { cursor: pointer; background: #1f2532; border: 2px solid #343c4b; border-radius: 10px; padding: 10px 8px; text-align: center; transition: transform .1s, border-color .1s; }
.cls:hover { transform: translateY(-2px); }
.cls.sel { border-color: var(--accent); background: #2b2a24; }
.cls .cn { font: 16px 'Russo One', 'Arial Black', Impact, sans-serif; }
.cls .cw { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cls .key { font-size: 11px; color: var(--muted); }
.bar { height: 4px; background: #343c4b; border-radius: 2px; margin: 3px 0; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.big { width: 100%; padding: 14px; font: 24px 'Russo One', 'Arial Black', Impact, sans-serif; letter-spacing: 2px; color: #241500; background: linear-gradient(#ffc847, #ff9f1a); border: 0; border-radius: 10px; cursor: pointer; box-shadow: 0 4px 0 #b86d00; }
.big:hover { filter: brightness(1.08); }
.big:active { transform: translateY(2px); box-shadow: 0 2px 0 #b86d00; }
.big:disabled { filter: grayscale(1); cursor: default; }
#srvstatus { margin: 10px 0; font-size: 13px; color: var(--muted); min-height: 18px; text-align: center; }
.settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.settings label { font-size: 13px; color: var(--muted); }
.settings span { color: #fff; float: right; }
.settings input { width: 100%; accent-color: var(--accent); }
.controls { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.controls b { color: #fff; }
.note { font-size: 13px; color: var(--muted); margin: -6px 0 6px; }

@media (max-width: 640px) {
  .classes { grid-template-columns: repeat(2, 1fr); }
  .settings { grid-template-columns: 1fr; }
  .logo { font-size: 44px; }
  #scoreboard { min-width: 0; width: 94vw; }
}
#killbanner .kb.mapb { font-size: 38px; letter-spacing: 2px; }

/* ---------- Accounts ---------- */
.acctbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #1b202b; border: 1px solid #343c4b; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.acctbar b { color: #fff; }
.acctbar .btns { display: flex; gap: 6px; }
.sbtn { white-space: nowrap; font: 600 14px 'Rubik', sans-serif; padding: 8px 14px; border-radius: 8px; border: 1px solid #4a5366; background: #283041; color: #fff; cursor: pointer; }
.sbtn:hover { background: #323b4f; }
.sbtn.primary { background: var(--accent); color: #241500; border-color: var(--accent); }
.sbtn.danger { border-color: #8a3a32; color: #ffb4aa; }
.sbtn:disabled { opacity: .55; cursor: default; }
.acctpanel { position: relative; width: min(440px, 100%); background: #151a24; }
#acct { background: rgba(5, 8, 14, .78); backdrop-filter: blur(4px); z-index: 20; }
#conn { z-index: 30; }
.acctpanel section { display: none; }
.acctpanel section.on { display: block; }
.acctpanel h2 { font-size: 26px; margin-bottom: 8px; padding-right: 30px; }
.acctpanel label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.acctpanel label small { color: #7d8698; }
.acctpanel input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: 16px 'Rubik', sans-serif; border-radius: 8px; border: 2px solid #39414f; background: #1b202b; color: #fff; outline: none; }
.acctpanel input:focus { border-color: var(--accent); }
.acctpanel .big { margin-top: 14px; font-size: 20px; padding: 12px; }
.xbtn { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.xbtn:hover { color: #fff; }
.amsg { color: #c9cfdb; font-size: 14px; line-height: 1.5; margin: 6px 0; }
.small { font-size: 12px; color: var(--muted); }
.aerr { color: #ff8a7a; font-size: 14px; min-height: 0; margin-top: 8px; }
.aerr:empty { display: none; }
.aok { color: #7ee08a; }
.errtxt { color: #ff8a7a; }
.alinks { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.alinks a, .acctbar a { color: var(--accent); text-decoration: none; }
.alinks a:hover { text-decoration: underline; }
.arow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: #1b202b; border-radius: 8px; padding: 8px; text-align: center; }
.stat b { display: block; font: 22px 'Russo One', sans-serif; color: #fff; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.twofa-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #1b202b; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
#qrbox { display: flex; justify-content: center; margin: 10px 0; }
#qrbox svg { width: 190px; height: 190px; background: #fff; border-radius: 8px; padding: 6px; }
#qrbox:empty { display: none; }
code { background: #1b202b; padding: 2px 6px; border-radius: 4px; color: #fff; word-break: break-all; }
#backupcodes { background: #1b202b; border-radius: 8px; padding: 12px; font-size: 16px; line-height: 1.7; columns: 2; text-align: center; color: #fff; user-select: text; }

/* ---------- Network / debug ---------- */
#netbanner { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(160, 40, 30, .9); padding: 8px 18px; border-radius: 8px; font-weight: 600; }
#debug { position: absolute; left: 14px; top: 180px; font: 12px/1.5 ui-monospace, Consolas, monospace; background: rgba(0,0,0,.6); padding: 8px 10px; border-radius: 6px; white-space: pre; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Lobby ---------- */
#menu { align-items: flex-start; padding: 18px 16px 40px; }
.lobby { width: min(1080px, 100%); margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: rgba(14, 18, 27, .9); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.logo.sm { font-size: 28px; text-shadow: 0 3px 0 #b4501f; letter-spacing: 1px; }
.logo.sm span { margin-left: 6px; }
.tabs { display: flex; gap: 4px; background: #10141d; padding: 4px; border-radius: 10px; }
.tabs button { font: 15px 'Russo One', 'Arial Black', Impact, sans-serif; letter-spacing: .5px; color: var(--muted); background: none; border: 0; padding: 8px 18px; border-radius: 8px; cursor: pointer; }
.tabs button:hover { color: #fff; }
.tabs button.on { background: var(--accent); color: #241500; }
.profile { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lvlbox { display: flex; align-items: center; gap: 8px; }
.lvbadge { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 10px; background: linear-gradient(#4a8cff, #2a5cd6); font: 18px 'Russo One', 'Arial Black', Impact, sans-serif; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.pname { font-weight: 700; font-size: 14px; }
.xpbar { width: 120px; height: 7px; background: #262d3b; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #4a8cff, #7cc4ff); }
.coins { display: flex; align-items: center; gap: 6px; font: 18px 'Russo One', 'Arial Black', Impact, sans-serif; background: #1b202b; border-radius: 10px; padding: 6px 12px; }
.coin-i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #ffc93c 45%, #c98a00); box-shadow: 0 0 0 1.5px #8a5d00 inset; vertical-align: -2px; margin-right: 2px; }
.iconbtn { position: relative; font-size: 20px; background: #1b202b; border: 1px solid #343c4b; border-radius: 10px; width: 42px; height: 38px; cursor: pointer; }
.iconbtn.ping::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 2px #0e121b; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.3); } }
.pane { display: none; }
.pane.on { display: block; animation: fadein .18s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
.card { background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.ch { font: 16px 'Russo One', 'Arial Black', Impact, sans-serif; margin: 4px 0 10px; letter-spacing: .5px; }
.ch small { font: 13px 'Rubik', system-ui, sans-serif; color: var(--muted); margin-left: 6px; }
.playgrid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.playgrid .col { display: grid; gap: 14px; }
.playgrid .classes { grid-template-columns: repeat(4, 1fr); margin: 0 0 14px; }
.playgrid .settings { grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.rooms { display: grid; gap: 8px; }
.room { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; background: #1b202b; border-radius: 10px; padding: 10px 12px; }
.room.full { opacity: .6; }
.rcount { font: 16px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--muted); }
.rcount span { color: #7ee08a; }
.note2 { text-align: center; padding: 4px; }
.sbtn.wide { width: 100%; margin-top: 8px; }

/* locker */
.lockergrid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.lfilters { display: grid; gap: 4px; align-content: start; }
.lf { display: flex; justify-content: space-between; align-items: center; text-align: left; font: 600 14px 'Rubik', system-ui, sans-serif; color: #c9cfdb; background: #1b202b; border: 1px solid transparent; border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.lf small { color: var(--muted); font-weight: 400; }
.lf.on { border-color: var(--accent); color: #fff; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.item { position: relative; background: linear-gradient(#1f2533, #171c27); border: 1px solid #2c3445; border-bottom: 3px solid var(--rc); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.item.eq { box-shadow: 0 0 0 2px var(--accent) inset; }
.iimg { height: 84px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%); border-radius: 8px; }
.iimg img { max-width: 100%; max-height: 84px; image-rendering: pixelated; }
.iname { font-weight: 700; font-size: 14px; }
.irar { font-size: 12px; font-weight: 600; }
.ieq { font-size: 12px; font-weight: 700; color: var(--accent); padding: 8px 0 2px; }
.item .sbtn { margin-top: 4px; padding: 6px; }
.emptybox { text-align: center; padding: 30px; }

/* crates */
.crategrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cratecard { display: flex; flex-direction: column; gap: 8px; }
.cratecard h3 { margin: 4px 0 0; font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; }
.crateart { position: relative; height: 130px; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--cc) 40%, transparent), transparent 70%); border-radius: 10px; }
.crateart .box { width: 120px; height: 78px; margin-top: 22px; background: var(--cc); border-radius: 6px; box-shadow: inset 0 -10px 0 rgba(0,0,0,.25), inset 0 0 0 4px rgba(0,0,0,.25), 0 10px 20px rgba(0,0,0,.4); }
.crateart .lid { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 130px; height: 26px; background: var(--cc); filter: brightness(1.15); border-radius: 6px; box-shadow: inset 0 0 0 4px rgba(0,0,0,.2); z-index: 1; }
.crateart .band { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); width: 22px; height: 26px; background: #ffd65c; border-radius: 3px; box-shadow: 0 0 12px rgba(255, 214, 92, .6); z-index: 2; }
.cratecard:hover .crateart .lid { animation: wiggle .5s ease-in-out infinite; }
@keyframes wiggle { 25% { transform: translateX(-50%) rotate(-3deg); } 75% { transform: translateX(-50%) rotate(3deg); } }
.odds { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.cprice { font: 20px 'Russo One', 'Arial Black', Impact, sans-serif; display: flex; align-items: center; gap: 6px; }
.cratecard .big { font-size: 18px; padding: 12px; }

/* opening reel */
#reel { background: rgba(5, 8, 14, .85); backdrop-filter: blur(6px); z-index: 25; align-items: center; }
.reelbox { width: min(900px, 100%); text-align: center; }
.reelbox h2 { font: 32px 'Russo One', 'Arial Black', Impact, sans-serif; margin: 0 0 16px; }
.reelwin { position: relative; overflow: hidden; height: 168px; background: #0f131c; border: 1px solid #2c3445; border-radius: 12px; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reelmark { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--accent); box-shadow: 0 0 14px var(--accent); z-index: 2; }
.reelstrip { display: flex; gap: 8px; padding: 14px 4px; will-change: transform; }
.rcard { flex: 0 0 120px; height: 138px; background: linear-gradient(#1f2533, #161a24); border-bottom: 4px solid var(--rc); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; box-shadow: inset 0 -30px 40px -30px var(--rc); }
.rcard img { max-width: 108px; max-height: 80px; }
.rcard span { font-size: 11px; color: #c9cfdb; line-height: 1.2; }
.reelresult { margin: 18px auto 0; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; text-align: left; background: var(--panel); border: 2px solid var(--rc); border-radius: 14px; padding: 16px; max-width: 560px; box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 40%, transparent); animation: pop .35s ease-out; }
.reelresult img { width: 150px; }
.reelresult .arow { grid-column: 1 / -1; justify-content: center; }
.big-name { font: 24px 'Russo One', 'Arial Black', Impact, sans-serif; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* daily */
#daily { z-index: 24; align-items: center; }
.dailypanel { position: relative; width: min(640px, 100%); }
.dailydays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 14px 0; }
.dday { position: relative; background: #1b202b; border: 2px solid #2c3445; border-radius: 10px; padding: 10px 4px; text-align: center; }
.dday .dn { font-size: 12px; color: var(--muted); }
.dday .dc { font: 16px 'Russo One', 'Arial Black', Impact, sans-serif; margin-top: 6px; white-space: nowrap; }
.dday .dcrate { font-size: 11px; color: var(--accent); margin-top: 2px; }
.dday.today { border-color: var(--accent); box-shadow: 0 0 18px rgba(255, 176, 32, .35); }
.dday.done { opacity: .55; }
.dchk { position: absolute; top: 4px; right: 6px; color: #7ee08a; font-weight: 800; }

/* in-game */
#announce { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); min-width: 340px; max-width: 80vw; text-align: center; background: linear-gradient(rgba(40, 24, 4, .94), rgba(28, 18, 6, .94)); border: 2px solid var(--accent); border-radius: 12px; padding: 12px 22px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
#announce.show { animation: pop .35s ease-out; }
.an-h { font: 14px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--accent); letter-spacing: 1px; }
.an-m { font-size: 20px; font-weight: 700; margin: 4px 0; overflow-wrap: anywhere; }
.an-b { font-size: 12px; color: var(--muted); }
#rewardfeed { position: absolute; right: 18px; bottom: 140px; text-align: right; }
.rw { background: rgba(0,0,0,.45); border-radius: 6px; padding: 4px 10px; margin-top: 4px; font-size: 14px; animation: kfin .2s ease-out, fadeaway 3s forwards; }
.rw .xp { color: #7cc4ff; margin-left: 6px; }
@keyframes fadeaway { 80% { opacity: 1; } 100% { opacity: 0; } }
#killbanner .kb.lvlup { color: #7cc4ff; font-size: 30px; }
.lvb { display: inline-block; min-width: 22px; padding: 0 4px; margin-right: 6px; border-radius: 5px; background: #2a5cd6; font-size: 12px; font-weight: 700; text-align: center; }

@media (max-width: 860px) {
  .playgrid, .lockergrid { grid-template-columns: 1fr; }
  .lfilters { grid-template-columns: repeat(3, 1fr); }
  .dailydays { grid-template-columns: repeat(4, 1fr); }
  .playgrid .classes { grid-template-columns: repeat(2, 1fr); }
}
.small a, .card a:not(.sbtn) { color: var(--accent); }
a.sbtn { text-decoration: none; display: inline-flex; align-items: center; }
#daily { background: rgba(5, 8, 14, .78); backdrop-filter: blur(4px); }
.dailypanel { background: #151a24; }

/* ---------- Footer / copyright ---------- */
.foot { text-align: center; color: #8a93a6; font-size: 12px; margin: 18px 0 4px; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
#copyright { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 11px; color: rgba(255,255,255,.45); letter-spacing: .3px; }

/* ---------- Toast / callouts ---------- */
#toast { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--accent); text-shadow: 0 2px 6px rgba(0,0,0,.8); }
#toast.show { animation: pop .25s ease-out; }
#killbanner .kb.callout { font-size: 34px; color: #ff6a3d; letter-spacing: 1px; text-shadow: 0 0 18px rgba(255, 106, 61, .55), 0 3px 0 rgba(0,0,0,.5); }
#killfeed .fb { color: #ff4d4d; font-weight: 800; font-size: 12px; margin-left: 6px; }
.rw.gift { background: rgba(120, 80, 0, .7); }

/* ---------- Match end ---------- */
#matchend { background: rgba(6, 9, 15, .82); backdrop-filter: blur(3px); overflow-y: auto; padding: 20px 16px; justify-content: flex-start; }
.mewrap { width: min(980px, 100%); margin: auto; display: grid; gap: 14px; }
#matchend .mewrap > h1 { text-align: center; font: 52px 'Russo One', 'Arial Black', Impact, sans-serif; color: var(--accent); margin: 0; text-shadow: 0 4px 0 #8a4a00, 0 10px 30px rgba(255, 176, 32, .35); animation: pop .4s ease-out; }
#matchend .mewrap > h3 { text-align: center; }
.megrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mecard { background: rgba(18, 22, 32, .92); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px 16px; }
#matchend .mecard h3 { font: 16px 'Russo One', 'Arial Black', Impact, sans-serif; margin: 0 0 10px; }
#matchend .mecard h3 small { font: 12px 'Rubik', system-ui, sans-serif; color: var(--muted); margin-left: 6px; }
.podium { display: grid; gap: 6px; }
.prow { display: flex; align-items: center; gap: 6px; background: #1b202b; border-radius: 8px; padding: 7px 10px; font-size: 15px; }
.prow.me { box-shadow: 0 0 0 2px var(--accent) inset; }
.prow .pm { width: 28px; font-size: 18px; text-align: center; }
.prow .pk { margin-left: auto; color: var(--muted); font-weight: 600; }
.mehead { font-size: 15px; margin-bottom: 8px; }
.metable { width: 100%; border-collapse: collapse; font-size: 14px; }
.metable td { padding: 4px 4px; border-bottom: 1px solid #232a38; }
.metable td:nth-child(2), .metable td:nth-child(3) { text-align: right; white-space: nowrap; }
.metable .xp { color: #7cc4ff; }
.metable tr.tot td { font-weight: 800; border-bottom: 0; padding-top: 8px; }
.melv { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.xpbar.xl { flex: 1; height: 10px; }
.xpbar.xl i { transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.guestnote { margin-top: 10px; }
.mevote { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mvote { pointer-events: auto; cursor: pointer; text-align: left; color: #fff; font: 600 14px 'Rubik', system-ui, sans-serif; background: #1b202b; border: 2px solid #2c3445; border-radius: 12px; padding: 8px; display: grid; gap: 6px; transition: transform .1s, border-color .1s; }
.mvote:hover { transform: translateY(-2px); }
.mvote.on { border-color: var(--accent); box-shadow: 0 0 20px rgba(255, 176, 32, .3); }
.mvote img { width: 100%; aspect-ratio: 1.6; object-fit: cover; border-radius: 8px; image-rendering: pixelated; }
.mvname kbd { margin-right: 4px; }
.mvbar { height: 6px; background: #262d3b; border-radius: 3px; overflow: hidden; }
.mvbar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.mvc { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- Armory ---------- */
.armhead { margin-bottom: 14px; }
.armgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.armcard { display: grid; gap: 8px; padding: 14px; }
.armtop { display: flex; gap: 12px; align-items: center; }
.armtop img { width: 110px; height: 55px; object-fit: contain; background: #1b202b; border-radius: 8px; }
.uprow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: #1b202b; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.upname { font-weight: 600; }
.pips { display: flex; gap: 3px; }
.pips i { width: 12px; height: 8px; border-radius: 2px; background: #343c4b; }
.pips i.on { background: linear-gradient(#ffd25c, #ff9f1a); }
.uprow .sbtn { padding: 5px 10px; font-size: 13px; min-width: 76px; justify-content: center; }
.maxed { font: 13px 'Russo One', 'Arial Black', Impact, sans-serif; color: #7ee08a; min-width: 76px; text-align: center; }

/* ---------- Locker avatar ---------- */
.avatar { text-align: center; margin-bottom: 10px; background: radial-gradient(circle at 50% 40%, #2a3550, #161b26 75%); border-radius: 12px; padding: 10px; }
.avatar img { width: 132px; image-rendering: pixelated; }

@media (max-width: 860px) {
  .megrid { grid-template-columns: 1fr; }
  .mevote { grid-template-columns: 1fr 1fr 1fr; }
  .mewrap > h1 { font-size: 36px; }
}

/* ---- Google / Discord sign-in ---- */
.oauthrow { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ordiv { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.ordiv::before, .ordiv::after { content: ''; flex: 1; height: 1px; background: #3a4252; }
.obtn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font: 600 14px 'Rubik', sans-serif; text-decoration: none; cursor: pointer; transition: filter .15s; }
.obtn:hover { filter: brightness(1.08); }
.obtn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.obtn.discord { background: #5865f2; color: #fff; border: 1px solid #5865f2; }
#linkedbox { margin-top: 8px; }
#linkedbox .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
a.sbtn { text-decoration: none; display: inline-block; }

#matchend { pointer-events: auto; }
#matchend .mvote { cursor: pointer; }

/* ---- health kits ---- */
.dn.heal { color: #5dff8a; font-size: 20px; animation-duration: .9s; }
#healflash { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px 30px rgba(60, 230, 120, .75); opacity: 0; }
#healflash.on { animation: healfl .7s ease-out; }
@keyframes healfl { 0% { opacity: .9; } 100% { opacity: 0; } }

/* platform icons (computer / phone / bot) on the scoreboard */
svg.plat { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; color: #9aa6bb; flex: none; }
#scoreboard tr.me svg.plat, #leader .me svg.plat { color: #ffd27a; }

/* =====================================================================
   One-line top bar: compact coins, icon buttons for admin and account
   ===================================================================== */
.topbar { flex-wrap: nowrap; }
.profile { flex-wrap: nowrap; min-width: 0; gap: 8px; }
.tabs { flex: none; }
button.lvlbox { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; min-width: 0; }
button.lvlbox:hover .pname { color: var(--accent); }
.lvltxt { display: flex; flex-direction: column; min-width: 0; }
.pname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.xpbar { display: block; width: 96px; }
.coins { white-space: nowrap; }
.iconbtn { display: inline-grid; place-items: center; color: #dfe5f0; text-decoration: none; flex: none; }
.iconbtn:hover { background: #262d3b; }
.iconbtn.admin { color: #ffd27a; border-color: #6b5520; }
.guestlbl { white-space: nowrap; }
@media (max-width: 1100px) {
  .topbar { gap: 10px; }
  .tabs button { padding: 8px 12px; font-size: 14px; }
  .logo.sm { font-size: 24px; }
}
@media (max-width: 900px) {
  .logo.sm span { display: none; }   /* "CRATE" only */
  .lvltxt { display: none; }          /* level badge only */
}
@media (max-width: 700px) {           /* very narrow desktop window: tabs get their own row */
  .topbar { flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; justify-content: space-between; }
  .tabs button { flex: 1; padding: 8px 4px; }
}
.foot a { color: var(--muted); }
.legal a, .wel-legal a { color: var(--accent); }
.phonecta { justify-content: center; margin-top: 10px; padding: 12px; }
html.app .webonly, html:not(.app) .apponly { display: none !important; }

/* =====================================================================
   /app: phone & tablet version
   ===================================================================== */
html.app, html.app body { position: fixed; inset: 0; overscroll-behavior: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; background: #0d1017; }
html.app input { -webkit-user-select: text; user-select: text; font-size: 16px; }   /* 16px stops iOS zooming into inputs */

/* ---- opening animation ---- */
#splash { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 45%, #1d2433, #07090d 70%); display: grid; place-items: center; transition: opacity .55s ease, visibility .55s; }
#splash.out { opacity: 0; visibility: hidden; }
#splash .spl { display: flex; flex-direction: column; align-items: center; }
.spl-logo { width: 120px; height: 120px; filter: drop-shadow(0 12px 30px rgba(255, 160, 40, .35)); animation: splLogo 1.25s cubic-bezier(.2, 1.4, .4, 1) both; }
.spl-word { display: flex; gap: 14px; margin-top: 18px; font: 54px/1 'Russo One', 'Arial Black', Impact, sans-serif; color: #fff; text-shadow: 0 4px 0 #b4501f, 0 10px 24px rgba(0,0,0,.6); }
.spl-word .b { color: var(--accent); }
.spl-word span { display: inline-block; animation: splWord .7s cubic-bezier(.2, 1.2, .4, 1) both; }
.spl-word .a { animation-delay: .75s; }
.spl-word .b { animation-delay: .9s; }
.spl-copy { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); font-size: 11px; color: rgba(255,255,255,.4); animation: fadein 1s .9s both; }
@keyframes splLogo {
  0% { transform: scale(.15) rotate(-25deg); opacity: 0; }
  45% { transform: scale(1.25) rotate(6deg); opacity: 1; }
  70% { transform: scale(.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes splWord {
  0% { opacity: 0; letter-spacing: -.6em; transform: scaleX(.3); filter: blur(6px); }
  100% { opacity: 1; letter-spacing: 2px; transform: none; filter: none; }
}
@media (max-height: 460px) {   /* phone in landscape: logo beside the word */
  #splash .spl { flex-direction: row; gap: 18px; }
  .spl-logo { width: 96px; height: 96px; }
  .spl-word { margin-top: 0; font-size: 46px; }
}
@media (max-width: 420px) { .spl-word { font-size: 40px; gap: 10px; } }

/* ---- welcome: log in or continue as guest ---- */
#welcome { z-index: 40; background: radial-gradient(circle at 50% 30%, #1b2231, #07090d 75%); padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); animation: fadein .45s ease-out; }
.wel { width: min(380px, 100%); margin: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.wel-logo { width: 84px; height: 84px; margin: 0 auto 4px; filter: drop-shadow(0 10px 24px rgba(255,160,40,.3)); }
.wel .logo { font-size: 40px; }
.wel-tag { color: var(--muted); margin: 2px 0 10px; font-size: 14px; }
.wel .oauthrow { margin-top: 0; }
.sbtn.wide { width: 100%; padding: 12px 14px; font-size: 15px; justify-content: center; }
.sbtn.ghost { background: transparent; border-color: #4a5366; }
.wel-legal { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (max-height: 520px) and (orientation: landscape) {
  .wel { width: min(640px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; align-items: center; text-align: left; }
  .wel-logo, .wel .logo, .wel-tag { grid-column: 1; }
  .wel-logo { grid-row: 1; margin: 0; width: 64px; height: 64px; }
  .wel .logo { grid-row: 2; font-size: 34px; }
  .wel-tag { grid-row: 3; margin: 0; }
  .wel > button, .wel .oauthrow, .wel-legal { grid-column: 2; }
  .wel > .big { grid-row: 1; padding: 10px; font-size: 20px; }
  .wel-legal { grid-column: 1 / 3; text-align: center; }
}

/* ---- menu with a bottom tab bar ---- */
html.app #menu { padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(84px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
html.app .topbar { padding: 8px 10px; margin-bottom: 10px; position: sticky; top: 0; z-index: 3; }
html.app .topbar .tabs { display: none; }
html.app .controls { display: none; }
html.app .foot { padding-bottom: 6px; }
#apptabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-around; background: rgba(10, 13, 20, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.08); padding: 6px calc(8px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left)); }
#apptabs button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #7d879a; font: 600 11px 'Rubik', sans-serif; padding: 6px 0 4px; border-radius: 10px; }
#apptabs svg { width: 24px; height: 24px; fill: currentColor; }
#apptabs button.on { color: var(--accent); }
#apptabs button.on svg { filter: drop-shadow(0 0 8px rgba(255,176,32,.45)); }
#apptabs button:active { background: rgba(255,255,255,.06); }
html.app #playbtn { font-size: 22px; padding: 16px; }
html.app .acctpanel, html.app #pause .panel { max-height: calc(100% - 20px); overflow-y: auto; }
html.app .overlay { padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
html.app #acct, html.app #daily, html.app #reel { z-index: 50; }
html.app #pause { touch-action: pan-y; }

/* ---- in-game HUD on a phone ---- */
html.app #hud { font-size: 13px; }
html.app #timer { top: calc(6px + env(safe-area-inset-top)); font-size: 18px; padding: 2px 12px; }
html.app #leader { top: calc(6px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); min-width: 150px; font-size: 12px; }
html.app #leader div:nth-child(n+4):not(.me) { display: none; }
html.app #killfeed { top: calc(50px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); font-size: 12px; max-width: 42vw; }
html.app #killfeed div:nth-child(n+4) { display: none; }
html.app #bottomleft { left: 50%; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom)); width: min(230px, 36vw); }
html.app #chatlog { position: fixed; left: calc(10px + env(safe-area-inset-left)); top: calc(140px + env(safe-area-inset-top)); width: 38vw; font-size: 12px; pointer-events: none; }
html.app #chatinput { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); width: min(420px, 80vw); pointer-events: auto; z-index: 30; }
html.app #ammo { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(40px + env(safe-area-inset-bottom)); text-align: center; display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
html.app #ammo > div:nth-child(2) { font-size: 22px; }
html.app #amag { font-size: 22px; }
html.app #amax { font-size: 14px; }
html.app #netinfo, html.app #copyright { display: none; }
html.app #death { top: 18%; padding: 12px 22px; pointer-events: auto; }
html.app .dbtns { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
html.app .dbtns .big { padding: 10px 18px; font-size: 18px; }
html.app #scoreboard { max-height: 80vh; overflow-y: auto; pointer-events: auto; }
html.app #announce { top: 22%; }

/* ---- touch controls ---- */
#touch { position: fixed; inset: 0; display: none; touch-action: none; pointer-events: auto; z-index: 2; }
body.tc #touch { display: block; }
body.tc #matchend:not(.hidden) ~ #touch { display: none; }
.tb { position: absolute; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(12, 16, 24, .38); color: rgba(255,255,255,.92); padding: 0; touch-action: none; -webkit-user-select: none; user-select: none; }
.tb svg { width: 52%; height: 52%; fill: currentColor; pointer-events: none; }
.tb.on { background: rgba(255, 176, 32, .55); border-color: var(--accent); transform: scale(.94); }
.tb.active { border-color: var(--accent); color: var(--accent); background: rgba(255,176,32,.18); }
#tfire { width: 84px; height: 84px; right: calc(28px + env(safe-area-inset-right)); bottom: calc(64px + env(safe-area-inset-bottom)); border-color: rgba(255, 90, 54, .8); background: rgba(255, 90, 54, .25); }
#tfire.on { background: rgba(255, 90, 54, .6); }
#tfirel { width: 58px; height: 58px; left: calc(22px + env(safe-area-inset-left)); top: 40%; border-color: rgba(255, 90, 54, .6); background: rgba(255, 90, 54, .18); }
#tads { right: calc(124px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); }
#tjump { right: calc(36px + env(safe-area-inset-right)); bottom: calc(160px + env(safe-area-inset-bottom)); width: 62px; height: 62px; }
#tcrouch { right: calc(122px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
#treload { right: calc(112px + env(safe-area-inset-right)); bottom: calc(166px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
#tmelee { right: calc(184px + env(safe-area-inset-right)); bottom: calc(58px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
#tswap { right: calc(176px + env(safe-area-inset-right)); bottom: calc(132px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
.tbar { position: absolute; left: calc(10px + env(safe-area-inset-left)); top: calc(8px + env(safe-area-inset-top)); display: flex; gap: 8px; }
.tb.sm { position: static; width: 38px; height: 38px; border-radius: 10px; border-width: 1.5px; }
#tstick { position: absolute; left: calc(110px + env(safe-area-inset-left)); top: calc(100% - 110px - env(safe-area-inset-bottom)); width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); background: rgba(12,16,24,.22); pointer-events: none; opacity: .55; transition: opacity .15s; }
#tstick.live { opacity: 1; transition: none; }
#tknob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 2px 10px rgba(0,0,0,.4); transform: translate(-50%,-50%); }
#tstick:not(.live) #tknob { transition: transform .12s; }

/* ---- "turn your phone sideways" ---- */
#rotate { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(7, 9, 13, .94); text-align: center; pointer-events: auto; }
#rotate > div { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; color: var(--muted); }
#rotate svg { color: var(--accent); animation: tilt 1.6s ease-in-out infinite; }
#rotate b { color: #fff; font: 22px 'Russo One', 'Arial Black', Impact, sans-serif; }
@keyframes tilt { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) { body.tc:not(.rotok) #rotate { display: grid; } }
/* portrait players who chose to stay portrait: a tighter control layout */
@media (orientation: portrait) {
  #tfire { width: 74px; height: 74px; right: 18px; bottom: calc(110px + env(safe-area-inset-bottom)); }
  #tjump { right: 20px; bottom: calc(196px + env(safe-area-inset-bottom)); }
  #tads { right: 104px; bottom: calc(130px + env(safe-area-inset-bottom)); }
  #tcrouch { right: 104px; bottom: calc(60px + env(safe-area-inset-bottom)); }
  #treload { right: 96px; bottom: calc(202px + env(safe-area-inset-bottom)); }
  #tmelee { right: 160px; bottom: calc(90px + env(safe-area-inset-bottom)); }
  #tswap { right: 164px; bottom: calc(160px + env(safe-area-inset-bottom)); }
  #tstick { left: 90px; top: calc(100% - 150px - env(safe-area-inset-bottom)); }
  html.app #bottomleft { bottom: calc(20px + env(safe-area-inset-bottom)); }
  html.app #ammo { bottom: calc(52px + env(safe-area-inset-bottom)); }
}
html.app #death, html.app #scoreboard { z-index: 3; }
html.app .logo.sm span { display: inline; }
html.app .lvltxt { display: flex; }
@media (max-width: 560px) { html.app .lvltxt { display: none; } html.app .logo.sm { font-size: 20px; } }
html.app .cls .key { display: none; }
html.app #ammo { white-space: nowrap; }
html.app #matchend { z-index: 4; }

/* =====================================================================
   Halloween theme (server sets data-season="halloween"; SEASON in config.json)
   ===================================================================== */
html[data-season="halloween"] { --accent: #ff8a1f; --accent2: #b46bff; }
html[data-season="halloween"] .logo::before, html[data-season="halloween"] .logo::after,
html[data-season="halloween"] .spl-word::before, html[data-season="halloween"] .spl-word::after {
  content: ''; display: inline-block; width: .9em; height: .9em; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Cpath%20d%3D%22M31%2014c0-5%203-9%208-10l1%203c-4%201-6%204-6%207z%22%20fill%3D%22%234e7a2a%22/%3E%3Cellipse%20cx%3D%2220%22%20cy%3D%2238%22%20rx%3D%2214%22%20ry%3D%2220%22%20fill%3D%22%23e8701a%22/%3E%3Cellipse%20cx%3D%2244%22%20cy%3D%2238%22%20rx%3D%2214%22%20ry%3D%2220%22%20fill%3D%22%23e8701a%22/%3E%3Cellipse%20cx%3D%2232%22%20cy%3D%2238%22%20rx%3D%2213%22%20ry%3D%2222%22%20fill%3D%22%23ff8a2a%22/%3E%3Cpath%20d%3D%22M14%2034l7-7%207%207zM36%2034l7-7%207%207zM15%2044c5%206%2029%206%2034%200l-4%202-3-3-4%204-4-4-4%204-4-4-3%203z%22%20fill%3D%22%23ffd25a%22/%3E%3C/svg%3E") center / contain no-repeat;
  vertical-align: -.08em; filter: drop-shadow(0 0 10px rgba(255, 140, 40, .55)); animation: pumpkinBob 2.6s ease-in-out infinite;
}
html[data-season="halloween"] .logo::before, html[data-season="halloween"] .spl-word::before { margin-right: .25em; }
html[data-season="halloween"] .logo::after, html[data-season="halloween"] .spl-word::after { margin-left: .25em; animation-delay: -1.3s; }
html[data-season="halloween"] .spl-word::before, html[data-season="halloween"] .spl-word::after { opacity: 0; animation: pumpkinIn .6s 1.15s ease-out forwards, pumpkinBob 2.6s 1.8s ease-in-out infinite; }
@keyframes pumpkinBob { 50% { transform: translateY(-3px) rotate(-6deg); } }
@keyframes pumpkinIn { from { opacity: 0; transform: scale(0) rotate(-90deg); } to { opacity: 1; transform: none; } }
html[data-season="halloween"] .topbar { border-color: rgba(255, 138, 31, .28); box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 24px rgba(180, 107, 255, .14); }
html[data-season="halloween"] .tabs button.on, html[data-season="halloween"] .big { background: linear-gradient(#ffa040, #ff6a10); }
html[data-season="halloween"] .tabs button.on { color: #2a1200; }
html[data-season="halloween"] #splash { background: radial-gradient(circle at 50% 45%, #2a1840, #07040c 70%); }
html[data-season="halloween"] #welcome { background: radial-gradient(circle at 50% 25%, #2a1a40, #07040c 75%); }
/* bats */
.bats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: none; }
html[data-season="halloween"] .bats { display: block; }
.bats i { position: absolute; left: 50%; top: 50%; width: 46px; height: 23px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2032%22%3E%3Cpath%20d%3D%22M32%2010c-2-4-4-5-4-5l1%205c-6-5-16-6-26%202%206%200%2010%203%2011%207%203-3%207-3%209%200%202-2%205-2%207%202%202-4%205-4%207-2%202-3%206-3%209%200%201-4%205-7%2011-7-10-8-20-7-26-2l1-5s-2%201-4%205z%22%20fill%3D%22%23140b1c%22/%3E%3C/svg%3E") center / contain no-repeat; opacity: 0; }
.bats i::after { content: ''; }
#splash .bats i { animation: batOut 1.9s cubic-bezier(.3, .2, .4, 1) forwards, batFlap .16s ease-in-out infinite alternate; animation-delay: var(--d), 0s; }
@keyframes batOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--s)); }
}
@keyframes batFlap { to { height: 12px; margin-top: 5px; } }
#menu .bats { position: fixed; z-index: 0; }
#menu .bats i { top: var(--t); left: -60px; opacity: .55; animation: batAcross var(--dur) linear infinite, batFlap .18s ease-in-out infinite alternate; animation-delay: var(--d), 0s; }
@keyframes batAcross { 0% { transform: translate(0, 0); } 25% { transform: translate(30vw, -30px); } 50% { transform: translate(60vw, 20px); } 75% { transform: translate(90vw, -20px); } 100% { transform: translate(120vw, 0); } }
#menu .lobby { position: relative; z-index: 1; }

.cratecard.event { position: relative; border-color: rgba(255, 122, 26, .55); box-shadow: 0 10px 30px rgba(0,0,0,.3), 0 0 26px rgba(255, 122, 26, .22); background: linear-gradient(160deg, rgba(60, 25, 70, .9), var(--panel) 60%); }
.eventtag { position: absolute; top: 10px; right: 10px; font: 11px 'Russo One', 'Arial Black', sans-serif; letter-spacing: 1px; color: #ffb36b; background: rgba(255, 122, 26, .16); border: 1px solid rgba(255, 122, 26, .5); border-radius: 6px; padding: 3px 7px; }

/* report a player (pause menu) */
.reportbox { margin-top: 10px; background: #1b202b; border-radius: 10px; padding: 8px 12px; }
.reportbox summary { cursor: pointer; font-weight: 600; color: #ffb4aa; list-style: none; }
.reportbox summary::-webkit-details-marker { display: none; }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.rgrid input { grid-column: 1 / 3; }
.rgrid select, .rgrid input { width: 100%; padding: 9px 10px; font: 14px 'Rubik', sans-serif; border-radius: 8px; border: 2px solid #39414f; background: #11151d; color: #fff; }
.rgrid button { grid-column: 1 / 3; }

/* ---- console (Shift+C) ---- */
#console { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); width: min(820px, calc(100% - 24px)); z-index: 70; background: rgba(8, 10, 16, .94); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); backdrop-filter: blur(6px); font: 13px/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace; user-select: text; }
.conhead { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08); font-family: 'Rubik', sans-serif; }
.conhead .small { color: var(--muted); flex: 1; }
.conhead .xbtn { position: static; }
#conout { max-height: 38vh; min-height: 120px; overflow-y: auto; padding: 8px 12px; white-space: pre-wrap; word-break: break-word; }
.cl { color: #c9cfdb; } .cl.cmd { color: #8fb8ff; } .cl.ok { color: #7ee08a; } .cl.err { color: #ff8a7a; } .cl.adm { color: #ffd27a; }
.conrow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.conprompt { color: var(--accent); font-weight: 700; }
#conin { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font: inherit; font-size: 15px; }
#conhint { padding: 0 12px 4px 30px; color: var(--muted); font-size: 12px; }
#conhint:empty { display: none; }
#consug { padding: 0 8px 8px; display: grid; gap: 2px; max-height: 30vh; overflow-y: auto; }
#consug:empty { display: none; }
.cs { display: flex; gap: 10px; align-items: baseline; padding: 5px 10px; border-radius: 6px; cursor: pointer; color: #dfe5f0; }
.cs span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs.on, .cs:hover { background: #222a3a; }
.cs .cadm { color: #ffd27a; font-size: 10px; border: 1px solid #6b5520; border-radius: 4px; padding: 0 4px; flex: none; }
html.app #console { top: calc(8px + env(safe-area-inset-top)); }
html.app #conin { font-size: 16px; }
#splash .bats i { width: 64px; height: 32px; filter: drop-shadow(0 0 2px rgba(255, 170, 90, .9)) drop-shadow(0 0 10px rgba(255, 120, 40, .55)); }
#menu .bats i { filter: drop-shadow(0 0 6px rgba(255, 140, 60, .35)); }

/* ---- graphics settings ---- */
.gfxrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 14px; flex-wrap: wrap; }
.gfxseg { display: flex; background: #10141d; border-radius: 9px; padding: 3px; gap: 2px; }
.gfxseg button { background: none; border: 0; color: var(--muted); font: 600 13px 'Rubik', sans-serif; padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.gfxseg button.on { background: var(--accent); color: #241500; }
.gfxmore { margin-top: 8px; font-size: 14px; }
.gfxmore summary { cursor: pointer; color: var(--muted); }
.gfxgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 8px; }
.gfxgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.gfxgrid select { padding: 7px 8px; border-radius: 8px; border: 2px solid #39414f; background: #1b202b; color: #fff; font: 14px 'Rubik', sans-serif; }
.gfxgrid label.chk { flex-direction: row; align-items: center; grid-column: 1 / 3; color: #dfe5f0; }
@media (max-width: 560px) { .gfxgrid { grid-template-columns: 1fr; } .gfxgrid label.chk { grid-column: 1; } }
.settings .gfxrow, .settings .gfxmore { grid-column: 1 / -1; }
.settings .gfxrow > span, .settings .gfxgrid label span, .settings .gfxmore summary span { float: none; }
.settings .gfxgrid input[type=checkbox] { width: auto; }
.settings .gfxgrid label.chk { color: #dfe5f0; }
