/* ==========================================================================
   Armour — UI skin. Utilitarian, back-lit instrument panel look.
   ==========================================================================*/
* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0d0e;
  color: #d8dbd2;
  font-family: "Consolas", "SF Mono", "Roboto Mono", ui-monospace, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", monospace;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: fixed;
  inset: 0;
}

#view {
  position: absolute;
  inset: 0;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.hidden {
  display: none !important;
}

.dim {
  color: #8b9086;
}

.tiny {
  font-size: 10px;
  color: #7d837a;
  margin-top: 8px;
  letter-spacing: .04em;
}

/* ------------------------------------------------------------- HUD ---- */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: .03em;
}

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(6, 8, 8, .72), rgba(6, 8, 8, 0));
}

.tb-block {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.tb-block.right {
  gap: 8px;
}

#tankName {
  font-size: 15px;
  font-weight: 700;
  color: #eef0e6;
  text-shadow: 0 1px 3px #000;
}

.tag {
  border: 1px solid #5d6b52;
  color: #cfe0bd;
  background: rgba(20, 28, 18, .6);
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: .12em;
}

.tag.amber {
  border-color: #7a6330;
  color: #f0cf8a;
  background: rgba(32, 24, 8, .6);
}

.panel {
  position: absolute;
  min-width: 208px;
  background: rgba(12, 16, 14, .78);
  border: 1px solid rgba(126, 140, 112, .35);
  border-radius: 3px;
  padding: 8px 10px 9px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .03);
  backdrop-filter: blur(2px);
}

.panel-title {
  font-size: 10px;
  letter-spacing: .22em;
  color: #93a383;
  border-bottom: 1px solid rgba(126, 140, 112, .3);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 17px;
}

.row label {
  flex: 0 0 74px;
  color: #8e9688;
  font-size: 11px;
}

.row .v {
  color: #e6ecdd;
  font-size: 11px;
  font-weight: 600;
}

.row .v.small {
  font-size: 10px;
  color: #b9c2ae;
  min-width: 34px;
  text-align: right;
}

.row .v.warn {
  color: #ffb14a;
}

.row .v.bad {
  color: #ff6a52;
}

.row .v.good {
  color: #8fe08a;
}

.bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(160, 170, 150, .25);
  border-radius: 1px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b8f4e, #b8d060);
}

.bar i.hot {
  background: linear-gradient(90deg, #b06a2a, #ff9a3c);
}

#drivePanel {
  left: 14px;
  bottom: 14px;
}

#gunPanel {
  right: 14px;
  bottom: 14px;
}

#scorePanel {
  right: 14px;
  top: 46px;
  min-width: 178px;
}

.ammo {
  margin-top: 6px;
  border-top: 1px solid rgba(126, 140, 112, .3);
  padding-top: 5px;
  display: grid;
  gap: 2px;
}

.ammo div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #b9c2ae;
}

.ammo div.sel {
  color: #ffd98a;
}

.ammo div b {
  font-weight: 600;
}

#stationBar {
  position: absolute;
  top: 42px;
  left: 14px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

#stationBar button {
  pointer-events: auto;
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  color: #c3cbb6;
  background: rgba(14, 18, 16, .8);
  border: 1px solid rgba(126, 140, 112, .4);
  border-radius: 2px;
  padding: 4px 9px;
  cursor: pointer;
}

#stationBar button.on {
  color: #10140f;
  background: #c8d89a;
  border-color: #d8e6ac;
}

#stationBar button:hover {
  border-color: #b9c98e;
}

#log {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 92px;
  width: min(620px, 60vw);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-align: center;
}

#log div {
  background: rgba(8, 10, 9, .6);
  padding: 2px 10px;
  border-radius: 2px;
  color: #dfe6d2;
  font-size: 12px;
  animation: fade 8s forwards;
}

@keyframes fade {
  0% { opacity: 0; transform: translateY(4px); }
  6% { opacity: 1; transform: none; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

#tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 14, 12, .92);
  border: 1px solid rgba(180, 200, 150, .45);
  border-left: 3px solid #c8d89a;
  padding: 6px 10px;
  border-radius: 2px;
  max-width: 300px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .6);
}

#tooltip b {
  display: block;
  color: #f2f6e6;
  font-size: 12px;
  margin-bottom: 2px;
}

#tooltip span {
  color: #b7c8a0;
  font-size: 11px;
}

#tooltip i {
  display: block;
  color: #8d9683;
  font-size: 10px;
  margin-top: 3px;
  font-style: normal;
}

#hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 74px;
  background: rgba(10, 14, 12, .72);
  border: 1px solid rgba(160, 180, 130, .3);
  padding: 4px 12px;
  color: #cfe0bd;
  font-size: 11px;
  border-radius: 2px;
}

/* ---------------------------------------------------------- garage ---- */
#garage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(6, 8, 8, .9) 0%, rgba(8, 10, 10, .55) 40%, rgba(6, 8, 8, .92) 100%);
  padding: 22px 26px;
  overflow: auto;
}

#garageHead h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: .34em;
  color: #e8eddc;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

#garageHead .sub {
  margin: 2px 0 16px;
  color: #97a08c;
  font-size: 12px;
  letter-spacing: .08em;
}

#garageBody {
  display: flex;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

#garageList {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.card {
  border: 1px solid rgba(126, 140, 112, .35);
  background: rgba(14, 18, 16, .82);
  border-radius: 3px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}

.card:hover {
  border-color: #a8bb82;
  transform: translateX(2px);
}

.card.on {
  border-color: #d8e6ac;
  background: rgba(40, 48, 32, .9);
  box-shadow: inset 3px 0 0 #d8e6ac;
}

.card h3 {
  margin: 0 0 2px;
  font-size: 14px;
  color: #eef1e4;
  font-weight: 700;
}

.card .cmeta {
  font-size: 11px;
  color: #98a189;
  display: flex;
  gap: 10px;
}

.card .cflag {
  color: #d3c184;
  letter-spacing: .1em;
}

#garageInfo {
  flex: 1;
  min-width: 300px;
  max-width: 520px;
  background: rgba(12, 16, 14, .84);
  border: 1px solid rgba(126, 140, 112, .35);
  border-radius: 3px;
  padding: 16px 18px;
  align-self: flex-start;
}

#garageInfo h2 {
  margin: 0;
  font-size: 20px;
  color: #f0f3e6;
}

#giMeta {
  font-size: 11px;
  margin: 3px 0 10px;
  letter-spacing: .06em;
}

#giDesc {
  font-size: 12px;
  line-height: 1.55;
  color: #c4ccb8;
  margin: 0 0 12px;
}

#giStats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
  margin-bottom: 10px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9ba593;
}

.stat span {
  flex: 0 0 92px;
}

.stat .sbar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(150, 165, 135, .25);
}

.stat .sbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7d9a52, #cfe08a);
}

.stat b {
  color: #dfe6d2;
  font-weight: 600;
  flex: 0 0 66px;
  text-align: right;
}

#giNotes {
  margin: 0 0 14px;
  padding-left: 16px;
  color: #aab49d;
  font-size: 11px;
  line-height: 1.6;
}

#giCrew {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

#giCrew span {
  border: 1px solid rgba(126, 140, 112, .4);
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: .1em;
  color: #cbd4bb;
  border-radius: 2px;
}

#deployBtn,
#helpClose {
  font: inherit;
  font-size: 13px;
  letter-spacing: .16em;
  padding: 10px 18px;
  color: #10140f;
  background: linear-gradient(180deg, #d8e6ac, #a8bb7c);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 700;
}

#deployBtn:hover,
#helpClose:hover {
  background: linear-gradient(180deg, #e6f2be, #b8cb8c);
}

/* ------------------------------------------------------------ help ---- */
#help {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 94vw);
  max-height: 86vh;
  overflow: auto;
  background: rgba(10, 13, 12, .96);
  border: 1px solid rgba(126, 140, 112, .4);
  border-radius: 4px;
  padding: 18px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7);
  z-index: 40;
}

#help h2 {
  margin: 0 0 12px;
  letter-spacing: .2em;
  font-size: 16px;
  color: #eef1e4;
}

.help-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.help-cols h3 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .18em;
  color: #c3cf9e;
}

.help-cols p {
  margin: 0 0 4px;
  font-size: 11px;
  color: #a9b39c;
  line-height: 1.5;
}

.help-cols b {
  color: #f0f3e6;
}

#helpClose {
  margin-top: 16px;
}

#boot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0d0e;
  color: #9aa48c;
  letter-spacing: .3em;
  font-size: 12px;
  z-index: 60;
}

/* --------------------------------------------------------- tutorial ---- */
#tutorial {
  position: absolute;
  left: 14px;
  top: 78px;
  width: 296px;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(22, 30, 20, .93), rgba(12, 16, 14, .93));
  border: 1px solid rgba(196, 214, 150, .5);
  border-left: 3px solid #cfe08a;
  border-radius: 3px;
  padding: 8px 11px 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}

#tutorial.flash {
  border-left-color: #8fe08a;
  box-shadow: 0 0 0 1px rgba(143, 224, 138, .6), 0 10px 30px rgba(0, 0, 0, .55);
}

.tut-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: .16em;
  color: #a8b892;
  margin-bottom: 3px;
}

.tut-head button {
  pointer-events: auto;
  background: none;
  border: none;
  color: #7f8877;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0 2px;
}

.tut-head button:hover {
  color: #e6f0cc;
}

#tutTitle {
  margin: 0 0 4px;
  font-size: 14px;
  color: #f2f7e4;
  letter-spacing: .02em;
}

#tutText {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd4ba;
}

#tutHint {
  font-size: 10.5px;
  color: #e3cf8d;
  border-top: 1px dashed rgba(180, 196, 140, .3);
  padding-top: 5px;
}

.tut-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.tut-btns button {
  pointer-events: auto;
  flex: 1;
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  color: #d8e2c2;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(180, 200, 150, .4);
  border-radius: 2px;
  padding: 3px 6px;
  cursor: pointer;
}

.tut-btns button:hover {
  background: rgba(207, 224, 138, .22);
}

/* ------------------------------------------------- language + minis ---- */
.mini {
  pointer-events: auto;
  font: inherit;
  font-size: 10px;
  letter-spacing: .08em;
  color: #cfe0bd;
  background: rgba(20, 28, 18, .7);
  border: 1px solid #5d6b52;
  border-radius: 2px;
  padding: 2px 7px;
  cursor: pointer;
}

.mini:hover {
  border-color: #b9c98e;
  color: #f2f7e4;
}

.head-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

#langWrap {
  display: flex;
  gap: 4px;
}

button.lang {
  font: inherit;
  font-size: 11px;
  letter-spacing: .1em;
  padding: 4px 12px;
  color: #c3cbb6;
  background: rgba(14, 18, 16, .85);
  border: 1px solid rgba(126, 140, 112, .5);
  border-radius: 2px;
  cursor: pointer;
}

button.lang.on {
  color: #10140f;
  background: #c8d89a;
  border-color: #d8e6ac;
  font-weight: 700;
}

.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

button.ghost {
  font: inherit;
  font-size: 12px;
  letter-spacing: .14em;
  padding: 10px 16px;
  color: #d8e2c2;
  background: transparent;
  border: 1px solid rgba(180, 200, 150, .55);
  border-radius: 2px;
  cursor: pointer;
}

button.ghost:hover {
  background: rgba(207, 224, 138, .18);
}

label.chk {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: #a9b39c;
  cursor: pointer;
}

label.chk input {
  accent-color: #b8cb8c;
}

