@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Space+Mono:wght@400;700&display=swap');

/* PATCHED для игры: html,body → .hud-screen, чтобы фикс-canvas 1920×1080 не ломал реальную страницу.
   .hud-screen — контейнер одного экрана HUD, живёт внутри масштабирующей обёртки .hud-scale (game.css). */
.hud-screen * { margin:0; padding:0; box-sizing:border-box; }
.hud-screen {
  width: 1920px; height: 1080px;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  font-feature-settings: "ss01","ss02";
  -webkit-font-smoothing: antialiased;
}

/* Corner brackets utility */
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid #ffffff;
}
.corner.tl { top:0; left:0; border-right:none; border-bottom:none; }
.corner.tr { top:0; right:0; border-left:none; border-bottom:none; }
.corner.bl { bottom:0; left:0; border-right:none; border-top:none; }
.corner.br { bottom:0; right:0; border-left:none; border-top:none; }

/* --- Brand top-left --- */
.brand {
  position: absolute;
  top: 44px; left: 60px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 3px;
  display: flex; align-items: center; gap: 12px;
}
.brand::before {
  content: '';
  width: 26px; height: 26px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
}

/* --- Profile top-right --- */
.profile {
  position: absolute;
  top: 32px; right: 60px;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
}
.profile .avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg,#2a2a2a,#4a4a4a);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 2px;
}
.profile .p-info { text-align: right; }
.profile .p-num {
  font-size: 24px; font-weight: 500;
  letter-spacing: 2px;
  color: #ffffff;
}
.profile .p-nick {
  font-size: 15px; font-weight: 500;
  letter-spacing: 4px;
  margin-top: 2px;
}
.profile .p-id {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.55);
  margin-top: 3px;
}
.profile .p-bar {
  margin-top: 6px;
  height: 3px; width: 140px;
  background: rgba(255,255,255,0.15);
  position: relative;
}
.profile .p-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 72%;
  background: #ffffff;
}
.profile .settings {
  width: 20px; height: 20px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  position: relative;
}

/* --- Bottom watermark --- */
.watermark {
  position: absolute;
  bottom: 30px; right: 60px;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.55);
}

/* --- Panel base --- */
.panel {
  position: absolute;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 24px 26px;
}
.panel .p-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 4px;
  margin-bottom: 20px;
}
.panel .p-title-sub {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
}

/* --- Menu items (main menu) --- */
.menu-list {
  position: absolute;
  left: 80px;
  top: 480px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.menu-item {
  display: flex; align-items: center; gap: 22px;
  padding: 16px 26px;
  font-size: 22px;
  letter-spacing: 5px;
  font-weight: 500;
  min-width: 380px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.15);
}
.menu-item .ico { width: 24px; text-align: center; opacity: 0.8; }
.menu-item.active {
  background: rgba(255,255,255,0.92);
  color: #0a0a0a;
  border-color: #ffffff;
}

/* --- Equipment list --- */
.eq-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.eq-tabs .tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 12px; letter-spacing: 3px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.55);
}
.eq-tabs .tab.active {
  background: rgba(255,255,255,0.9);
  color: #0a0a0a;
  border-color: #ffffff;
}
.eq-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 8px;
}
.eq-row.selected {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
}
.eq-row.dim { opacity: 0.4; }
.eq-icon {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.eq-name { font-size: 14px; letter-spacing: 2px; }
.eq-meta { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 1.5px; margin-top: 3px; }
.eq-stat { margin-left: auto; text-align: right; font-size: 10px; letter-spacing: 1.5px; color: rgba(255,255,255,0.65); line-height: 1.5; }

/* --- Attributes panel --- */
.attr-row {
  margin-bottom: 18px;
}
.attr-name {
  display: flex; justify-content: space-between;
  font-size: 13px; letter-spacing: 2px;
  margin-bottom: 6px;
}
.attr-bar {
  height: 6px;
  background: rgba(255,255,255,0.12);
  position: relative;
}
.attr-bar > span {
  position: absolute; top:0; bottom:0; left:0;
  background: #ffffff;
}
.total {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 13px; letter-spacing: 3px;
  display: flex; justify-content: space-between;
}
.action-row {
  margin-top: 24px;
  display: flex; gap: 12px; align-items: center;
  font-size: 11px; letter-spacing: 2px;
}
.btn {
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.7);
  font-size: 12px; letter-spacing: 3px;
  background: rgba(0,0,0,0.2);
}
.btn.primary {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
  padding: 14px 28px;
  font-weight: 700;
}
.cost { color: #ff4d3d; font-size: 12px; letter-spacing: 2px; }
.gain { color: #b5ff5b; font-size: 12px; letter-spacing: 2px; }

/* --- Annotations (leader lines) --- */
.anno {
  position: absolute;
  font-size: 11px;
  letter-spacing: 2.5px;
  line-height: 1.4;
  color: #ffffff;
}
.anno .label { font-weight: 700; }
.anno .sub { font-size: 8.5px; color: rgba(255,255,255,0.55); letter-spacing: 2px; margin-top: 3px; }
.anno-line {
  position: absolute;
  background: #ffffff;
  height: 1px;
}
.anno-dot {
  position: absolute;
  width: 6px; height: 6px;
  border: 1px solid #ffffff;
  background: transparent;
  border-radius: 50%;
  transform: translate(-3px,-3px);
}

/* --- Armament grid --- */
.arm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.arm-cell {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  min-height: 92px;
}
.arm-cell.active {
  border-color: #ffffff;
  background: rgba(255,255,255,0.08);
}
.arm-cell .ic {
  width: 36px; height: 24px;
  border: 1px solid rgba(255,255,255,0.35);
  margin-bottom: 8px;
}
.arm-cell .n { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.arm-cell .st { font-size: 8px; color: rgba(255,255,255,0.55); margin-top: 4px; line-height: 1.4; letter-spacing: 1px; }
.arm-cat {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 3px;
  margin: 14px 0 8px;
  color: rgba(255,255,255,0.5);
}
.arm-cat::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.2);
}

/* --- Loading --- */
.loading-wrap {
  position: absolute;
  bottom: 88px;
  left: 50%; transform: translateX(-50%);
  width: 780px;
}
.loading-label {
  display: flex; justify-content: space-between;
  font-size: 12px; letter-spacing: 5px;
  margin-bottom: 12px;
}
.loading-bar {
  height: 2px;
  background: rgba(255,255,255,0.2);
  position: relative;
}
.loading-bar > span {
  position: absolute; top:0; bottom:0; left:0;
  background: #ffffff;
}
.loading-bar::after {
  content: '';
  position: absolute; top: -3px; bottom: -3px;
  left: 89%;
  width: 2px;
  background: #ffffff;
}

/* --- Gameplay HUD --- */
.gp-minimap {
  position: absolute;
  top: 44px; left: 60px;
  width: 200px; height: 200px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,20,40,0.55) 0%, rgba(0,0,0,0.35) 100%);
  overflow: hidden;
}
.gp-minimap::before {
  content:''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 20px);
}
.gp-minimap::after {
  content:''; position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  background: #ffffff;
  transform: translate(-50%,-50%);
  clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%);
}
.gp-objective {
  position: absolute;
  top: 260px; left: 60px;
  font-size: 12px; letter-spacing: 3px;
  color: rgba(255,255,255,0.85);
}
.gp-objective .obj-label { color: rgba(255,255,255,0.5); font-size: 10px; margin-bottom: 4px; }

.gp-topright {
  position: absolute;
  top: 44px; right: 60px;
  text-align: right;
}
.gp-time {
  font-family: 'Space Mono', monospace;
  font-size: 42px; font-weight: 700;
  letter-spacing: 4px;
}
.gp-money {
  font-size: 20px; letter-spacing: 3px;
  margin-top: 6px;
  color: #b5ff5b;
}

.gp-hp {
  position: absolute;
  bottom: 60px; left: 60px;
  width: 340px;
}
.gp-hp .hp-line {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: 3px;
  margin-bottom: 6px;
}
.gp-hp .hp-bar {
  height: 8px; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.5);
  position: relative;
  margin-bottom: 14px;
}
.gp-hp .hp-bar > span {
  position: absolute; top:0; bottom:0; left:0;
  background: #ffffff;
}
.gp-hp .hp-bar.stam > span { background: rgba(181,255,91,0.9); }

.gp-weapon {
  position: absolute;
  bottom: 60px; right: 60px;
  display: flex; align-items: flex-end; gap: 20px;
}
.gp-weapon .w-info { text-align: right; }
.gp-weapon .w-name { font-size: 12px; letter-spacing: 3px; color: rgba(255,255,255,0.6); }
.gp-weapon .w-ammo { font-family: 'Space Mono', monospace; font-size: 42px; font-weight: 700; letter-spacing: 2px; }
.gp-weapon .w-ammo .total { color: rgba(255,255,255,0.5); font-size: 24px; }
.gp-weapon .w-icon {
  width: 120px; height: 60px;
  border: 1px solid rgba(255,255,255,0.5);
  position: relative;
  background: rgba(0,0,0,0.25);
}
.gp-weapon .w-icon::before {
  content: ''; position: absolute;
  top: 50%; left: 12%;
  width: 76%; height: 4px;
  background: rgba(255,255,255,0.8);
  transform: translateY(-50%);
}
.gp-weapon .w-icon::after {
  content: ''; position: absolute;
  bottom: 20%; right: 22%;
  width: 12px; height: 14px;
  background: rgba(255,255,255,0.8);
}

/* --- Global corner brackets --- */
.frame-corner {
  position: absolute;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(255,255,255,0.55);
}
.frame-corner.tl { top: 24px; left: 24px; border-right:none; border-bottom:none; }
.frame-corner.tr { top: 24px; right: 24px; border-left:none; border-bottom:none; }
.frame-corner.bl { bottom: 24px; left: 24px; border-right:none; border-top:none; }
.frame-corner.br { bottom: 24px; right: 24px; border-left:none; border-top:none; }
