:root { --g: #1aff1a; --gd: #0a6a12; --bg: rgba(4, 22, 10, 0.78); --warn: #ffb347; --bad: #ff5a4a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { margin: 0; height: 100%; background: #070f0b; overflow: hidden; touch-action: none; overscroll-behavior: none;
  font-family: 'Courier New', ui-monospace, monospace; color: var(--g); }
#stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: #b0c4d4; }
#view { position: absolute; left: 0; top: 0; display: block; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui > .overlay { pointer-events: none; }
.overlay { position: absolute; inset: 0; }
svg { width: 100%; height: 100%; display: block; }

/* loading */
#loading { position: absolute; inset: 0; background: #07120c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; z-index: 50; }
#loading .logo { font-size: 84px; letter-spacing: 10px; font-weight: bold; }
#loading .bar { width: 520px; height: 18px; border: 3px solid var(--g); } #loading .bar i { display: block; height: 100%; width: 0; background: var(--g); }

/* bars */
.bars { width: 460px; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: stretch; height: 64px; border: 4px solid var(--g); border-radius: 14px; background: var(--bg); overflow: hidden; }
.bar-ico { width: 64px; padding: 11px; border-right: 4px solid var(--g); }
.bar-track { position: relative; flex: 1; margin: 8px; border: 2px solid var(--gd); background: #021008; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--g); transition: width 0.15s; }
.bar-fill.food { background: #f5c542; } .bar-fill.water { background: #4fc3f7; } .bar-fill.low { animation: blink 0.6s infinite; }
.bar-rad { position: absolute; right: 0; top: 0; bottom: 0; background: #e02424; }
.bar-num { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: bold; color: #fff; text-shadow: 0 0 4px #000, 0 0 4px #000; }
@keyframes blink { 50% { opacity: 0.45; } }

/* buttons */
.btn { background: var(--bg); border: 6px solid var(--g); color: var(--g); display: flex; align-items: center; justify-content: center; position: relative; touch-action: none; cursor: pointer; }
.btn.round { border-radius: 50%; } .btn.square { border-radius: 24px; }
.btn.down, .btn.on { background: rgba(26, 255, 26, 0.35); box-shadow: 0 0 40px rgba(26, 255, 26, 0.6); }
.btn.empty { opacity: 0.45; }
.fire-mode { position: absolute; bottom: 14%; left: 0; right: 0; text-align: center; font-size: 22px; font-weight: bold; letter-spacing: 2px; }
.badge { position: absolute; right: 6px; bottom: 4px; font-size: 32px; font-weight: bold; text-shadow: 0 0 6px #000; }
.reload { border-radius: 24px; padding: 8px 18px; gap: 14px; overflow: hidden; justify-content: flex-start; }
.reload-ico { width: 84px; height: 56px; flex: none; } .reload-txt { display: flex; flex-direction: column; line-height: 1.15; }
.reload-txt b { font-size: 42px; white-space: nowrap; } .reload-txt i { font-size: 22px; font-style: normal; opacity: 0.8; }
.reload-prog { position: absolute; left: 0; bottom: 0; height: 12px; background: var(--g); }
.reload.empty .reload-txt b { color: var(--bad); }

/* floating joystick */
.stick-ring { display: none; position: absolute; width: 220px; height: 220px; margin: -110px 0 0 -110px; border: 5px solid rgba(26, 255, 26, 0.55); border-radius: 50%; background: rgba(26, 255, 26, 0.08); pointer-events: none; }
.stick-dot { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; background: rgba(26, 255, 26, 0.55); }

/* toasts */
.toasts { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--bg); border: 3px solid var(--g); border-radius: 12px; padding: 8px 20px; font-size: 30px; font-weight: bold; animation: toast 2.4s forwards; white-space: nowrap; }
.toast.warn { border-color: var(--warn); color: var(--warn); } .toast.part { border-color: #ffb347; color: #ffb347; }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* bag screen */
.bagscreen { background: rgba(2, 12, 6, 0.96); flex-direction: column; padding: 40px; z-index: 20; overflow: hidden; }
.bag-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.bag-title { font-size: 56px; font-weight: bold; letter-spacing: 6px; }
.tabs { display: flex; gap: 12px; flex: 1; } .bagscreen button { font-family: inherit; color: var(--g); background: var(--bg); border: 4px solid var(--g); border-radius: 14px; font-size: 32px; font-weight: bold; padding: 12px 28px; cursor: pointer; }
.bagscreen button.on { background: var(--g); color: #021008; } .bagscreen .x { padding: 12px 22px; }
.bag-body { flex: 1; overflow-y: auto; touch-action: pan-y; padding-bottom: 60px; }
.status { display: flex; gap: 28px; font-size: 30px; font-weight: bold; padding: 10px 6px 22px; flex-wrap: wrap; } .status .bad { color: var(--bad); }
.row { display: flex; align-items: center; gap: 22px; border: 3px solid var(--gd); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; background: var(--bg); }
.row .ico { width: 70px; height: 70px; flex: none; } .row .info { flex: 1; font-size: 32px; } .row .info i { display: block; font-size: 24px; font-style: normal; opacity: 0.75; margin-top: 4px; }
.cnt { color: #fff; } .empty { opacity: 0.6; font-size: 30px; padding: 20px 6px; }
.gunstats { border: 4px solid var(--g); border-radius: 16px; padding: 22px 26px; background: var(--bg); margin-bottom: 26px; }
.gname { font-size: 48px; font-weight: bold; } .gsub { font-size: 28px; opacity: 0.85; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; font-size: 30px; } .grid span { opacity: 0.8; } .grid b { color: #fff; } .grid small { font-size: 22px; color: var(--g); opacity: 0.8; font-weight: normal; }
.slot { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; font-size: 32px; } .slot .sn { width: 220px; font-weight: bold; }
.slot .sv { flex: 1; text-align: left; } .slot .sv.none { opacity: 0.55; } .slot.locked { opacity: 0.4; } .slot.locked .sv { border: 0; }
.picker { margin: 0 0 20px 236px; display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; font-size: 28px !important; font-weight: normal !important; } .opt b { font-size: 32px; } .opt i { display: block; font-style: normal; opacity: 0.75; font-size: 22px; }
.opt.remove { border-color: var(--bad) !important; color: var(--bad) !important; }
.dls { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; } .dl { font-size: 24px; } .dl.up { color: #6dff7a; } .dl.down { color: #ff7a6a; }

/* death */
.death { display: flex; align-items: center; justify-content: center; background: rgba(40, 0, 0, 0.82); z-index: 30; }
.death-box { text-align: center; } .death-title { font-size: 120px; font-weight: bold; color: var(--bad); letter-spacing: 8px; }
.death-stats { font-size: 40px; margin: 30px 0 50px; color: #fff; line-height: 1.5; }
.death button { font-family: inherit; font-size: 56px; font-weight: bold; color: var(--g); background: var(--bg); border: 6px solid var(--g); border-radius: 22px; padding: 22px 60px; cursor: pointer; }
