:root {
  --ct: #7fb6ff;
  --t: #ffc24a;
  --hud: rgba(12, 14, 17, 0.55);
  --hud2: rgba(12, 14, 17, 0.78);
  --line: rgba(255, 255, 255, 0.12);
  --txt: #f2efe8;
  --dim: #a9a49a;
  --acc: #ffb43a;
  --red: #ff4d4d;
  --font: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0c0e; color: var(--txt); font-family: var(--font); user-select: none; -webkit-user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.hidden { display: none !important; }
button { font-family: var(--font); }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#tags { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%,-50%) rotate(45deg); opacity: 0; }
#hitmarker::before, #hitmarker::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
#hitmarker::before { left: 12px; top: 0; width: 2px; height: 26px; clip-path: polygon(0 0,100% 0,100% 35%,0 35%,0 65%,100% 65%,100% 100%,0 100%); }
#hitmarker::after { top: 12px; left: 0; height: 2px; width: 26px; clip-path: polygon(0 0,35% 0,35% 100%,0 100%,0 0,65% 0,100% 0,100% 100%,65% 100%); }
#hitmarker.kill::before, #hitmarker.kill::after { background: #ff3b3b; }
#hitmarker.hs::before, #hitmarker.hs::after { background: #ffd34d; }
/* Weapon icons (inline SVG) */
.wi { width: 34px; height: 13px; fill: currentColor; vertical-align: middle; }
.wi.big { width: 64px; height: 24px; fill: #e8e2d4; opacity: .9; }
.wi.bi { width: 30px; height: 11px; grid-row: 1 / 3; align-self: center; opacity: .85; }
.wi.sb { width: 30px; height: 11px; margin-right: 6px; opacity: .7; }
.wi.card { width: 110px; height: 42px; fill: #ffd48a; }
.kfi { width: 36px; height: 14px; fill: #eee; }
/* Damage numbers */
#dmgnums { position: absolute; inset: 0; pointer-events: none; }
#dmgnums .dn { position: absolute; font-size: 15px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.6); animation: dnfloat .85s ease-out forwards; }
#dmgnums .dn.hs { color: #ffd34d; font-size: 17px; }
#dmgnums .dn.ar { color: #9fc8ff; }
@keyframes dnfloat { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1); } }
/* Kill banner */
#killbanner { position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); padding: 6px 16px; background: rgba(0,0,0,.55); border-radius: 4px; font-size: 15px; letter-spacing: .5px; white-space: nowrap; transition: opacity .4s; }
#killbanner.out { opacity: 0; }
#killbanner b { color: var(--acc); letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
#killbanner i { font-style: normal; color: #ff5a5a; font-weight: 700; font-size: 12px; letter-spacing: 2px; margin-left: 6px; }
/* Sun flare */
#flare { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
#flare i { position: absolute; left: 0; top: 0; display: block; border-radius: 50%; will-change: transform; }
#flareSun { width: 260px; height: 260px; margin: -130px 0 0 -130px; background: radial-gradient(circle, rgba(255,245,220,.9) 0%, rgba(255,220,160,.35) 18%, rgba(255,200,120,.12) 38%, rgba(255,180,90,0) 70%); }
#flareG1 { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: radial-gradient(circle, rgba(255,170,120,0) 55%, rgba(255,170,120,.28) 70%, rgba(255,170,120,0) 80%); }
#flareG2 { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: radial-gradient(circle, rgba(170,220,255,.3) 0%, rgba(170,220,255,0) 70%); }
#flareG3 { width: 120px; height: 120px; margin: -60px 0 0 -60px; background: radial-gradient(circle, rgba(255,200,120,0) 60%, rgba(255,200,120,.16) 72%, rgba(255,200,120,0) 82%); }
/* Round history */
#roundhist { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; }
#roundhist i, .sbhist i { display: block; width: 7px; height: 7px; border-radius: 2px; background: rgba(255,255,255,.15); }
#roundhist i.ct, .sbhist i.ct { background: var(--ct); }
#roundhist i.t, .sbhist i.t { background: var(--t); }
#roundhist i.half, .sbhist i.half { margin-right: 7px; }
.sbhist { display: flex; gap: 4px; justify-content: center; padding-top: 6px; }
.sbhist i { width: 12px; height: 12px; }
#scoreboard .sbtitle { text-align: center; color: var(--dim); font-size: 13px; letter-spacing: 2px; margin-bottom: 6px; }
#dmgdir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#dmgdir .arc { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; border-top: 6px solid rgba(255,40,30,.85); filter: blur(1px); transition: opacity .2s; }

#scope { position: absolute; inset: 0; }
#scope .ring { position: absolute; left: 50%; top: 50%; width: 92vh; height: 92vh; transform: translate(-50%,-50%); border-radius: 50%; box-shadow: 0 0 0 200vmax #000, inset 0 0 40px 18px rgba(0,0,0,.9); }
/* Rifle optics (AUG / SG 553): a light ring instead of the sniper's blackout */
#scope.light .ring { width: 60vh; height: 60vh; box-shadow: 0 0 0 3px rgba(0,0,0,.75), inset 0 0 30px 6px rgba(0,0,0,.35); }
#scope.light .lh, #scope.light .lv { display: none; }
#scope .lh { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
#scope .lv { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #000; }

#topleft { position: absolute; left: 16px; top: 14px; }
#radarWrap { position: relative; width: 200px; height: 200px; border-radius: 6px; overflow: hidden; background: rgba(10,12,14,.55); box-shadow: 0 0 0 1px var(--line), 0 4px 18px rgba(0,0,0,.35); }
#radar { width: 200px; height: 200px; display: block; }
#radarLabel { position: absolute; left: 8px; bottom: 5px; font-size: 12px; letter-spacing: 1px; color: #e6dcc8; opacity: .85; }
#money { margin-top: 8px; font-size: 22px; font-weight: 600; color: #a5ff9a; letter-spacing: .5px; }
#money.flash { animation: moneyflash .6s; }
@keyframes moneyflash { 0% { color: #fff; transform: scale(1.12); } 100% { color: #a5ff9a; transform: scale(1); } }
#buyhint { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 10px 4px 5px; font-size: 14px; background: rgba(255,180,58,.16); border: 1px solid rgba(255,180,58,.45); border-radius: 4px; font-variant-numeric: tabular-nums; }
#buyhint kbd { border-color: var(--acc); color: #ffd48a; }
#intro { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(720px, 92vw); padding: 14px 18px 12px; background: rgba(10,12,14,.78); border: 1px solid var(--line); border-radius: 6px; text-align: center; transition: opacity .5s; }
#intro.out { opacity: 0; }
#intro .side { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
#intro .obj { margin: 6px 0 10px; font-size: 16px; line-height: 1.45; }
#intro .keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; color: #d6d0c4; }
#intro .keys span { white-space: nowrap; }
#intro .hide { margin-top: 10px; font-size: 12px; color: var(--dim); }

#topbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; gap: 0; }
#topbar .side { display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--hud); }
#topbar .side.ct { border-radius: 6px 0 0 6px; }
#topbar .side.t { border-radius: 0 6px 6px 0; }
#topbar .score { font-size: 28px; font-weight: 700; min-width: 34px; text-align: center; }
#topbar .ct .score { color: var(--ct); }
#topbar .t .score { color: var(--t); }
#topbar .alive { display: flex; gap: 3px; }
#topbar .alive i { width: 9px; height: 16px; border-radius: 3px 3px 1px 1px; background: currentColor; opacity: .95; }
#topbar .alive i.dead { opacity: .18; }
#topbar .ct .alive { color: var(--ct); flex-direction: row-reverse; }
#topbar .t .alive { color: var(--t); }
#timerBox { min-width: 96px; padding: 4px 12px; text-align: center; background: var(--hud2); }
#timer { font-size: 26px; font-weight: 600; letter-spacing: 1px; }
#timer.low { color: var(--red); }
#bombIcon { position: relative; font-size: 12px; font-weight: 700; color: #fff; background: #c91f1f; border-radius: 3px; padding: 1px 6px; margin-top: 2px; animation: blink 1s infinite; overflow: hidden; }
#bombIcon i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--k, 1) * 100%); background: rgba(255,255,255,.28); }
#bombIcon span { position: relative; }
@keyframes blink { 50% { opacity: .35; } }

#killfeed { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#killfeed .kf { display: flex; align-items: center; gap: 8px; padding: 4px 10px; background: rgba(0,0,0,.55); border-radius: 3px; font-size: 15px; white-space: nowrap; transition: opacity .5s; }
#killfeed .kf.mine { box-shadow: inset 0 0 0 2px #d32f2f; background: rgba(40,0,0,.55); }
#killfeed .kf .w { color: #ddd; font-size: 13px; padding: 0 2px; }
#killfeed .kf .kfi { margin: 0 2px; }
#killfeed .kf .hs { color: #ff5a5a; font-weight: 700; font-size: 12px; border: 1px solid #ff5a5a; border-radius: 2px; padding: 0 3px; }
#killfeed .kf .wb { color: #ffd34d; font-size: 12px; }
.cCT { color: var(--ct); } .cT { color: var(--t); }

#center { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; font-size: 30px; font-weight: 700; letter-spacing: 2px; white-space: nowrap; transition: opacity .3s; }
#center.win-ct { color: var(--ct); } #center.win-t { color: var(--t); }
#subcenter { position: absolute; left: 50%; top: calc(24% + 44px); transform: translateX(-50%); font-size: 16px; color: #e8e2d4; white-space: nowrap; }

#hpbox { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 10px; }
#hpbox .stat { display: flex; align-items: center; gap: 8px; min-width: 150px; padding: 8px 14px 12px; background: linear-gradient(90deg, rgba(10,12,14,.72), rgba(10,12,14,.3)); border-radius: 4px; position: relative; }
#hpbox .ico { font-size: 20px; opacity: .85; }
#hpbox #hp, #hpbox #armor { font-size: 34px; font-weight: 700; min-width: 64px; }
#hpbox .bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; background: rgba(255,255,255,.15); }
#hpbox .bar i { display: block; height: 100%; width: 100%; background: #eaeaea; transition: width .2s; }
#hpbox.low #hp { color: var(--red); } #hpbox.low #hpbar { background: var(--red); }

#weaponbar { position: absolute; right: 16px; bottom: 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
#weaponbar .ws { display: flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255,255,255,.5); padding: 2px 8px; border-right: 3px solid transparent; }
#weaponbar .ws small { font-size: 11px; margin-left: -3px; }
#weaponbar .ws.on { color: #fff; border-right-color: var(--acc); background: linear-gradient(270deg, rgba(255,180,58,.18), transparent); }
#weaponbar .ws b { color: var(--dim); margin-right: 6px; font-weight: 400; }
#ammobox { position: absolute; right: 16px; bottom: 16px; padding: 8px 16px 10px; text-align: right; line-height: 1.1; background: linear-gradient(270deg, rgba(10,12,14,.72), rgba(10,12,14,.3)); border-radius: 4px; min-width: 190px; }
#wicon { height: 24px; margin-bottom: 2px; }
#wname { font-size: 14px; color: var(--dim); letter-spacing: 1px; }
#mag { font-size: 40px; font-weight: 700; }
#mag.low { color: var(--red); }
#reserve { font-size: 20px; color: var(--dim); margin-left: 6px; }

#progress { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); width: 320px; text-align: center; }
#progress .label { font-size: 15px; margin-bottom: 6px; }
#progress .bar { height: 8px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.3); }
#progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#ffb43a,#ffde8a); }
#netgraph { position: absolute; right: 16px; top: 42%; transform: translateY(-50%); font: 12px/1.45 Consolas, monospace; color: rgba(255,255,255,.75); text-align: right; white-space: pre; }
#deathinfo { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); padding: 12px 22px; background: rgba(0,0,0,.6); border-left: 3px solid var(--red); font-size: 18px; text-align: center; white-space: nowrap; }
#deathinfo small { display: block; color: var(--dim); font-size: 14px; margin-top: 6px; line-height: 1.5; }
#deathinfo .wi { width: 40px; height: 15px; }
#spectate { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); font-size: 16px; padding: 6px 16px; background: rgba(0,0,0,.5); border-radius: 3px; }

/* ---------------- Scoreboard ---------------- */
#scoreboard { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(860px, 94vw); background: rgba(12,14,17,.9); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; pointer-events: none; }
#scoreboard h3 { margin: 6px 0; font-size: 16px; letter-spacing: 2px; display: flex; justify-content: space-between; }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 10px; }
#scoreboard th { text-align: left; color: var(--dim); font-weight: 400; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
#scoreboard td { padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,.05); }
#scoreboard tr.me td { background: rgba(255,255,255,.07); }
#scoreboard tr.dead td { opacity: .45; }
#scoreboard td.n, #scoreboard th.n { text-align: right; width: 62px; }

/* ---------------- Buy menu ---------------- */
#buymenu { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: max(8vh, 70px); background: rgba(0,0,0,.4); z-index: 12; }
#buymenu .bm { width: min(1040px, 96vw); max-height: calc(100vh - max(8vh, 70px) - 12px); overflow-y: auto; background: rgba(14,16,19,.95); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
#buymenu .bmh { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
#buymenu .bmh .t { font-size: 22px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; }
#buymenu .bmh .bt { font-size: 14px; color: var(--dim); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
#buymenu .bmh .m { margin-left: auto; font-size: 26px; color: #a5ff9a; font-weight: 700; font-variant-numeric: tabular-nums; }
#buymenu .bmh .x { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 14px; font: 14px var(--font); letter-spacing: 1px; color: var(--txt); background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
#buymenu .bmh .x:hover { background: rgba(255,255,255,.15); }
#buymenu .cols { display: grid; grid-template-columns: repeat(4, 1fr) 1.3fr; gap: 10px; }
#buymenu .bmh .x.dim { opacity: .4; }
#buymenu .card { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 4px 18px; align-items: center; margin-top: 12px; padding: 12px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 6px; }
#buymenu .card .ch { grid-column: 1; grid-row: 1 / 3; display: flex; align-items: center; gap: 14px; }
#buymenu .card .cn { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
#buymenu .card .cs { font-size: 12px; color: var(--dim); margin-top: 3px; }
#buymenu .card .stat { display: grid; grid-template-columns: 76px 1fr 64px; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
#buymenu .card .stat .bar { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
#buymenu .card .stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb43a, #ffe0a0); }
#buymenu .card .stat b { font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums; text-align: right; }
#buymenu .col { padding: 6px; border-radius: 6px; border: 1px solid transparent; }
#buymenu .col.hot { border-color: rgba(255,180,58,.6); background: rgba(255,180,58,.06); }
#buymenu .col.dim { opacity: .45; }
#buymenu .col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; letter-spacing: 1px; color: var(--dim); font-weight: 400; text-transform: uppercase; }
#buymenu .it { position: relative; display: grid; grid-template-columns: auto auto 1fr auto; column-gap: 6px; align-items: baseline; width: 100%; margin-bottom: 6px; padding: 9px 10px; text-align: left; font-family: var(--font); color: var(--txt); background: rgba(255,255,255,.05); border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
#buymenu .it:hover { border-color: var(--acc); background: rgba(255,180,58,.14); }
#buymenu .it kbd { grid-row: 1 / 3; align-self: center; }
#buymenu .it .nm { font-size: 15px; font-weight: 600; }
#buymenu .it .pr { font-size: 14px; color: #a5ff9a; font-variant-numeric: tabular-nums; }
#buymenu .it .rl { grid-column: 3 / 5; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
#buymenu .it .st { grid-column: 3 / 5; font-size: 12px; }
#buymenu .it .st:empty { display: none; }
#buymenu .it[aria-disabled="true"] { cursor: default; }
#buymenu .it[aria-disabled="true"]:hover { border-color: transparent; background: rgba(255,255,255,.05); }
#buymenu .it.poor .nm, #buymenu .it.poor .rl, #buymenu .it.max .nm, #buymenu .it.max .rl { opacity: .5; }
#buymenu .it.poor .pr, #buymenu .it.poor .st { color: #ff7a6e; }
#buymenu .it.max .st { color: var(--dim); }
#buymenu .it.own { box-shadow: inset 3px 0 0 #6fd96f; }
#buymenu .it.own .st { color: #8fe08f; }
#buymenu .foot { margin-top: 8px; font-size: 13px; color: var(--dim); }
#buymenu .foot b { color: var(--txt); font-weight: 600; }

/* ---------------- Menu panels ---------------- */
#menu { position: fixed; inset: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(8,9,11,.92) 0%, rgba(8,9,11,.72) 38%, rgba(8,9,11,.05) 75%); }
.menu-inner { width: min(560px, 92vw); margin-left: max(6vw, 24px); }
.brand .logo { position: relative; display: inline-block; font-size: 64px; font-weight: 700; letter-spacing: 8px; background: linear-gradient(180deg, #fff6e2 0%, #ffd27a 45%, #e08a1f 72%, #8a4a0c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 12px rgba(255,150,40,.25)); }
.brand .logo::after { content: ""; position: absolute; left: 2px; right: 10px; top: 55%; height: 2px; background: linear-gradient(90deg, rgba(255,210,120,0), rgba(255,210,120,.9) 20%, rgba(255,210,120,.9) 80%, rgba(255,210,120,0)); opacity: .55; mix-blend-mode: screen; pointer-events: none; }
.brand .sub { margin-top: 4px; font-size: 15px; letter-spacing: 3px; color: var(--dim); }
.brand .edition { margin-top: 10px; font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--dim); opacity: .55; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0 18px; }
.card { padding: 14px 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); cursor: pointer; transition: .15s; }
.card:hover { background: rgba(255,255,255,.08); }
.card.active { border-color: var(--acc); background: linear-gradient(160deg, rgba(255,180,58,.22), rgba(255,180,58,.04)); }
.card .ct { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.card .cd { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.opts { display: grid; gap: 10px; margin-bottom: 22px; }
.opt { display: flex; align-items: center; gap: 14px; }
.opt label { width: 90px; font-size: 14px; color: var(--dim); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg b { font-weight: 400; font-size: 14px; padding: 6px 12px; border-radius: 4px; background: rgba(255,255,255,.06); cursor: pointer; transition: .12s; }
.seg b:hover { background: rgba(255,255,255,.12); }
.seg b.on { background: var(--acc); color: #1a1206; font-weight: 600; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions.secondary { margin-top: 10px; }
.actions.secondary button { padding: 9px 18px; font-size: 14px; }
.actions button.play { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 280px; padding: 13px 26px 12px; }
.actions button.play .pl { font-size: 22px; letter-spacing: 3px; text-transform: uppercase; }
.actions button.play .ps { font-size: 13px; font-weight: 600; letter-spacing: .5px; opacity: .75; }
.actions button, .panel button, .row-actions button { padding: 11px 22px; font-size: 15px; letter-spacing: 1px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.07); color: var(--txt); cursor: pointer; transition: .12s; }
.actions button:hover, .panel button:hover { background: rgba(255,255,255,.14); }
button.primary { background: linear-gradient(180deg, #ffc65c, #f29a18); color: #1b1205; border-color: transparent; font-weight: 700; }
button.primary:hover { background: linear-gradient(180deg, #ffd47e, #ffab2e) !important; }
.foot { margin-top: 26px; font-size: 12px; color: #6f6b64; letter-spacing: 1px; }

#pause, #settings, #help, #lobby { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,6,8,.62); backdrop-filter: blur(3px); z-index: 20; }
.panel { background: rgba(16,18,22,.96); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.panel.small { width: 320px; display: flex; flex-direction: column; gap: 8px; }
.panel.wide { width: min(760px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
.ptitle { font-size: 22px; font-weight: 700; letter-spacing: 4px; margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--dim); min-height: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs b { font-weight: 400; padding: 8px 14px; font-size: 14px; cursor: pointer; color: var(--dim); border-bottom: 2px solid transparent; }
.tabs b.on { color: #fff; border-bottom-color: var(--acc); }
.setbody { overflow-y: auto; padding-right: 6px; min-height: 300px; }
.srow { display: grid; grid-template-columns: 210px 1fr 70px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 14px; }
.srow .d { grid-column: 1 / -1; font-size: 12px; color: var(--dim); margin-top: -4px; }
.srow input[type=range] { width: 100%; accent-color: var(--acc); }
.srow input[type=number] { width: 70px; background: #0d0f12; color: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 4px; font-family: var(--font); }
.srow input[type=color] { width: 60px; height: 26px; border: none; background: none; }
.srow .val { text-align: right; color: var(--acc); font-variant-numeric: tabular-nums; }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.crossPreview { width: 140px; height: 90px; background: linear-gradient(135deg, #8d7a5a, #4b5a68); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.helpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 14px; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; font: 12px var(--font); text-align: center; border: 1px solid rgba(255,255,255,.3); border-bottom-width: 2px; border-radius: 3px; background: rgba(255,255,255,.07); }
.helptext { margin-top: 14px; font-size: 13.5px; line-height: 1.7; color: #d6d0c4; }
.helptext p { margin: 6px 0; }

/* ---------------- Multiplayer lobby ---------------- */
#lobby .ptitle small { font-size: 13px; font-weight: 400; letter-spacing: 2px; color: var(--dim); margin-left: 6px; }
.lbrow { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.lbrow label { width: 90px; font-size: 14px; color: var(--dim); }
.lbrow input { flex: 1; max-width: 320px; padding: 8px 10px; font: 15px var(--font); color: var(--txt); background: #0d0f12; border: 1px solid var(--line); border-radius: 4px; user-select: text; }
.lbrow input:focus { outline: none; border-color: var(--acc); }
.lbtip { margin: 6px 0 4px; font-size: 13px; line-height: 1.7; color: var(--dim); }
.lbtip b { color: var(--txt); }
.row-actions.left { justify-content: flex-start; flex-wrap: wrap; }
.lbrole { font-size: 13px; color: var(--dim); margin-bottom: 10px; user-select: text; }
.lbteams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.lt { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: rgba(255,255,255,.03); min-height: 90px; }
.lt h4 { margin: 0 0 8px; font-size: 14px; letter-spacing: 2px; }
.lt.ct h4 { color: var(--ct); } .lt.t h4 { color: var(--t); }
.lp { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.04); }
.lp.me { color: #fff; font-weight: 600; }
.lp.empty { color: #6f6b64; font-size: 13px; }
.lp i { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: var(--acc); color: #1a1206; }
.lp .sw { margin-left: auto; font-size: 12px; color: var(--dim); cursor: pointer; padding: 2px 6px; border-radius: 3px; }
.lp .sw:hover { color: #fff; background: rgba(255,255,255,.1); }
#lbOpts .opt label { width: 190px; }
.seg.ro b { cursor: default; opacity: .75; }
.seg.ro b:hover { background: rgba(255,255,255,.06); }
.seg.ro b.on:hover { background: var(--acc); }
#lbStatus { margin-top: 10px; font-size: 13px; }
#lbStatus.err { color: var(--red); }

#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at 50% 40%, #1d1913, #0a0a0b 70%); z-index: 40; }
#loading .logo { font-size: 54px; font-weight: 700; letter-spacing: 14px; color: #ffbe55; }
.lbar { width: 340px; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.lbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb43a, #ffe0a0); transition: width .2s; }
.ltext { font-size: 13px; color: var(--dim); letter-spacing: 1px; }
#clickToPlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); z-index: 15; cursor: pointer; }
#clickToPlay div { font-size: 22px; letter-spacing: 4px; padding: 14px 30px; background: rgba(0,0,0,.6); border: 1px solid var(--line); border-radius: 6px; }
#fatal { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 80vw; padding: 20px; background: #2a0d0d; border: 1px solid #ff5a5a; border-radius: 6px; font: 13px/1.5 Consolas, monospace; white-space: pre-wrap; z-index: 99; }

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .brand .logo { font-size: 44px; }
  #buymenu .cols { grid-template-columns: repeat(2, 1fr); }
}
