/* Tank Battle 3D (shared: sim3d.css + car-kit.css) */
.tb3-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; font-weight: 700; }
.tb3-pick > span { min-width: 44px; }
.tb3-pick button { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.tb3-pick button small { font-weight: 600; font-size: 11px; opacity: .75; }
.tb3-pick button.is-on { border-color: #5eead4; background: rgba(94,234,212,.12); }
.tb3-pick button:disabled { opacity: .5; cursor: not-allowed; }
.tb3 + .ak-start-btn, .ak-setup .ak-start-btn { margin-top: 12px; }

.tb3-hud { position: absolute; inset: 0; pointer-events: none; font: 700 13px system-ui, sans-serif; color: #fff; }
.tb3-score { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); text-align: center; background: rgba(8,16,28,.66); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 4px 14px; line-height: 1.15; }
.tb3-sb { display: block; font-size: 24px; font-weight: 900; letter-spacing: .03em; }
.b { color: #60a5fa; } .r { color: #f87171; }
.tb3-sub { font-size: 11px; opacity: .85; white-space: nowrap; }
.tb3-me { position: absolute; left: 10px; bottom: 10px; width: 210px; background: rgba(8,16,28,.62); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px; }
.tb3-hp { position: relative; height: 18px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.tb3-hp i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #4ade80; transition: width .15s; }
.tb3-hp span { position: absolute; inset: 0; text-align: center; line-height: 18px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.tb3-rel { height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 4px; overflow: hidden; }
.tb3-rel i { display: block; height: 100%; width: 0; background: #facc15; }
.tb3-pow { font-size: 12px; color: #fde68a; min-height: 0; margin-top: 2px; }
.tb3-pow:empty { display: none; }
.tb3-feed { position: absolute; left: 10px; top: 10px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; max-width: 34%; }
.tb3-feed li { background: rgba(8,16,28,.6); border-radius: 7px; padding: 2px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (.sim-stage canvas stretches every canvas over the stage: undo that for the minimap) */
.sim-stage canvas.tb3-map { position: absolute; inset: 10px 10px auto auto; width: 176px; height: 122px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); }
.tb3-ret { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.tb3-ret::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.tb3-ret.is-lock { border-color: #f87171; transform: scale(.8); }
.tb3-ret.is-hit { border-color: #facc15; transform: scale(1.25); }
.tb3-hurt { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 60px 20px rgba(239,68,68,.9); }
/* a tablet with touch buttons along the bottom: tools go to the top */
.tb3 .sim-has-touch .sim-toolbar { top: 140px; bottom: auto; }
.tb3 .sim-has-touch .tb3-me { bottom: auto; top: 10px; left: auto; right: 196px; width: 170px; }
.tb3 .ck-touch .sim-tbtn[data-id="fire"] { order: 5; background: rgba(194, 65, 12, .85); font-size: 15px; min-width: 84px; }

.sim-result__card.tb3-res { max-height: 94%; overflow: auto; padding: 12px 18px; }
.tb3-res h3 { margin-bottom: 0; }
.tb3-res .sim-result__stars { font-size: 24px; margin: 0 0 4px; }
.tb3-res .sim-result__btns { margin: 2px 0 6px; }
.tb3-big { font-size: 30px; font-weight: 900; margin: 0; }
.tb3-tip { font-size: 12px; opacity: .8; }
.tb3-board { margin: 6px auto 2px; border-collapse: collapse; font-size: 12px; }
.tb3-board th, .tb3-board td { padding: 1px 6px; text-align: left; white-space: nowrap; }
.tb3-board td:nth-child(2n) { text-align: right; opacity: .85; padding-right: 14px; }
.tb3-board td.is-me { background: rgba(250,204,21,.2); }

@container (max-width: 480px) {
  .tb3-score { top: 6px; left: 8px; transform: none; padding: 3px 10px; }
  .tb3-sb { font-size: 19px; }
  .sim-stage canvas.tb3-map { width: 110px; height: 76px; inset: 8px 8px auto auto; }
  .tb3-feed { display: none; }
  .tb3 .sim-toolbar { top: 92px; left: 8px; right: auto; }
  .tb3 .sim-has-touch .tb3-me, .tb3-me { top: 54px; left: 8px; right: auto; bottom: auto; width: 150px; padding: 4px; }
  .tb3 .sim-has-touch .sim-toolbar { top: 92px; }
  .tb3-board { font-size: 11px; }
  .tb3-big { font-size: 26px; }
}
