/* ════════════════════════════════════════════════════════════════════
   iMASKER — KOMUTA HUD
   ════════════════════════════════════════════════════════════════════ */

body.komuta-page { overflow-y: auto; background: #0d1117; padding-top: 0 !important; }
body.komuta-page .hud-nav-header { display: none; }

.hud-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0d1117;
  color: #e8f0f5;
  font-family: 'Courier New', monospace;
}

/* ── Top bar ── */
.hud-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 54px;
  border-bottom: 0.5px solid #1e3a4a;
  background: #111820;
  flex-shrink: 0;
}
.hud-topbar-l, .hud-topbar-r { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.hud-topbar-r { justify-content: flex-end; gap: 12px; }
.hud-topbar-rinfo { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hud-topbar-c { display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* Yaşam göstergesi: genel nav ile aynı (.hnav-yasam — style.css) */
.hud-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9a23a; box-shadow: 0 0 6px #c9a23a80; }
.hud-online { font-size: 11px; color: #c9a23a; letter-spacing: 2px; }
.hud-sysname { font-size: 15px; font-weight: bold; color: #c9a23a; letter-spacing: 1px; }
.hud-sysver { font-size: 10px; color: #4a7a8a; letter-spacing: 1px; }
.hud-mangir { font-size: 13px; color: #ef9f27; font-weight: bold; }
.hud-loc { font-size: 10px; color: #4a7a8a; }

/* ── 3-col body ── */
.hud-body {
  display: grid;
  grid-template-columns: 210px 1fr 210px;
  flex: 1;
  border-left: 0.5px solid #1e3a4a;
  border-right: 0.5px solid #1e3a4a;
}

/* ── Left & Right sidebars ── */
.hud-left, .hud-right {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  background: #111820;
  overflow: hidden;
}
.hud-left { border-right: 0.5px solid #1e3a4a; }
.hud-right { border-left: 0.5px solid #1e3a4a; }

/* Corner brackets */
.hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
}
.hud-corner-tl { top: 8px; left: 8px; border-top: 1px solid #c9a23a; border-left: 1px solid #c9a23a; }
.hud-corner-tr { top: 8px; right: 8px; border-top: 1px solid #c9a23a; border-right: 1px solid #c9a23a; }
.hud-corner-bl { bottom: 8px; left: 8px; border-bottom: 1px solid #c9a23a; border-left: 1px solid #c9a23a; }
.hud-corner-br { bottom: 8px; right: 8px; border-bottom: 1px solid #c9a23a; border-right: 1px solid #c9a23a; }

/* Avatar */
.hud-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0 4px; }
.hud-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: #0a1e2a; border: 1px solid #1e3a4a;
  display: flex; align-items: center; justify-content: center;
}
.hud-avatar-letters { font-size: 22px; font-weight: bold; color: #c9a23a; }
.hud-stars { font-size: 12px; color: #c9a23a; letter-spacing: 2px; }

.hud-rank-name { text-align: center; font-size: 14px; font-weight: bold; letter-spacing: 1px; }
.hud-soldier-name { text-align: center; font-size: 11px; color: #4a7a8a; margin-bottom: 4px; }

/* Labels */
.hud-section-label { font-size: 9px; color: #4a7a8a; letter-spacing: 2px; margin-top: 4px; }
.hud-section-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-stat-points {
  font-family: 'Orbitron', monospace; font-size: 8px; letter-spacing: 1px; text-decoration: none;
  color: #c9a23a; background: rgba(201,162,58,.12); border: 0.5px solid #c9a23a;
  border-radius: 4px; padding: 2px 6px; white-space: nowrap;
  animation: hud-pts-pulse 1.4s ease-in-out infinite;
}
.hud-stat-points:hover { background: rgba(201,162,58,.25); }
@keyframes hud-pts-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,162,58,0); } 50% { box-shadow: 0 0 8px 0 rgba(201,162,58,.5); } }
.hud-panel-label { font-size: 10px; color: #c9a23a; letter-spacing: 1px; }
.hud-divider { height: 0.5px; background: #1e3a4a; margin: 4px 0; }
.hud-row-label { display: flex; justify-content: space-between; margin-bottom: 3px; }
.hud-lbl-cyan { font-size: 10px; color: #c9a23a; }
.hud-lbl-muted { font-size: 10px; color: #4a7a8a; }

/* Bars */
.hud-bar-bg {
  width: 100%; height: 6px; background: #1a2a35; border-radius: 3px;
  overflow: hidden; margin-bottom: 6px;
}
.hud-bar-sm { height: 5px; margin-bottom: 0; }
.hud-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.hud-bar-xp { background: #c9a23a; }

/* Stat rows */
.hud-stat-row {
  display: grid;
  grid-template-columns: 44px 1fr 26px;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.hud-stat-key { font-size: 9px; color: #4a7a8a; letter-spacing: 1px; }
.hud-stat-val { font-size: 11px; font-weight: bold; text-align: right; }

.hud-power-row { display: flex; justify-content: space-between; align-items: center; }
.hud-power-val { font-size: 13px; color: #ef9f27; font-weight: bold; }

/* ── Center ── */
.hud-center {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

/* Life panel — alt alta */
.hud-life-panel { justify-content: flex-start; }
.hud-life-stack { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.hud-life-row {
  display: grid;
  grid-template-columns: 80px 1fr 36px;
  align-items: center;
  gap: 8px;
}
.hud-life-lbl { font-size: 9px; color: #4a7a8a; letter-spacing: 1px; white-space: nowrap; }
.hud-bar-life { height: 8px; margin-bottom: 0; }
.hud-life-val { font-size: 10px; font-weight: bold; text-align: right; font-family: 'Courier New', monospace; }
.hud-kondisyon-row { grid-template-columns: 80px 1fr; margin-top: 4px; border-top: 0.5px solid #1e3a4a; padding-top: 8px; }
.hud-kondisyon-val { font-size: 14px; font-weight: bold; font-family: 'Courier New', monospace; text-align: right; }

/* Enerji mini (sol panel) */
.hud-energy-mini {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hud-energy-mini-segs { display: flex; gap: 3px; flex: 1; }
.hud-energy-mini-seg {
  flex: 1; height: 8px; border-radius: 2px;
  background: #1a2a35; border: 0.5px solid #1e3a4a;
  transition: background .2s;
}
.hud-energy-mini-seg.aktif { background: #7f77dd; border-color: #afa9ec; }

/* Mid row */
.hud-mid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Panel */
.hud-panel {
  background: #111820;
  border: 0.5px solid #1e3a4a;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Görev yeri haritası */
.hud-gorev-map-panel { min-height: 200px; }
.hud-gorev-map-wrap {
  position: relative;
  flex: 1;
  min-height: 160px;
  border-radius: 4px;
  overflow: hidden;
  border: 0.5px solid #1e3a4a;
}
.hud-gorev-map-wrap .leaflet-container { background: #0a1520 !important; }
.hud-radar-loc { font-size: 9px; color: #4a7a8a; text-align: center; letter-spacing: 1px; }

/* Görev yeri — sol profil altında düz metin */
.hud-gorev-yeri {
  text-align: center; font-size: 11px; color: #c9a23a; letter-spacing: .5px;
  margin-bottom: 8px;
}

/* ── Birleşik Görev Yeri + Yaşam ── */
.hud-gorev-yasam { min-height: 240px; }
.hud-gorev-yasam .hud-gorev-map-wrap { min-height: 140px; }
.hud-yasam-mini {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 2px; padding-top: 8px; border-top: 0.5px solid #1e3a4a;
}
.hud-yasam-bar { display: grid; grid-template-columns: 20px 1fr 30px; align-items: center; gap: 8px; }
.hud-yasam-ikon { font-size: 12px; text-align: center; }
.hud-yasam-kond { font-size: 12px; font-weight: bold; font-family: 'Courier New', monospace; text-align: right; margin-top: 2px; }
.hud-yasam-kantin {
  font-size: 9px; color: #c9a23a; text-decoration: none; letter-spacing: 1px;
  text-align: right; margin-top: 2px; transition: color .15s;
}
.hud-yasam-kantin:hover { color: #e0c060; }

/* ── Bölüm menüleri (hub) ── */
.hud-menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 4px;
}
.hud-menu-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border-radius: 4px; text-decoration: none;
  background: #0a1520; border: 0.5px solid #1e3a4a;
  transition: border-color .15s, transform .1s;
}
.hud-menu-card:hover { border-color: #c9a23a; transform: translateY(-2px); }
.hud-menu-icon { font-size: 20px; line-height: 1; }
.hud-menu-name { font-size: 10px; color: #b9c4e0; letter-spacing: .4px; font-family: 'Rajdhani', sans-serif; font-weight: 600; text-align: center; }
@media (max-width: 560px) { .hud-menu-grid { grid-template-columns: repeat(2, 1fr); } }

/* Task icon img */
.hud-task-icon-img {
  width: 16px; height: 16px; flex-shrink: 0;
  filter: brightness(0) invert(0.6);
}
.hud-task-item.done .hud-task-icon-img {
  filter: brightness(0) saturate(100%) invert(62%) sepia(60%) saturate(400%) hue-rotate(120deg);
}

/* Energy */
.hud-energy-panel { align-items: center; }
.hud-energy-segs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hud-energy-seg {
  width: 36px; height: 44px; border-radius: 4px;
  background: #1a2a35; border: 0.5px solid #1e3a4a;
  transition: background .2s;
}
.hud-energy-seg.aktif { background: #7f77dd; border-color: #afa9ec; }
.hud-energy-count { font-size: 13px; color: #afa9ec; }
.hud-play-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #2a2410;
  border: 0.5px solid #c9a23a;
  border-radius: 4px;
  color: #c9a23a;
  font-size: 11px;
  text-decoration: none;
  letter-spacing: 1px;
  text-align: center;
  transition: background .15s;
}
.hud-play-btn:hover { background: #3a3216; }

/* Tasks */
.hud-tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hud-task-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #0a1520;
  border: 0.5px solid #1e3a4a;
  border-radius: 4px;
  font-size: 10px;
  color: #4a7a8a;
}
.hud-task-item.done { color: #c9a23a; border-color: #c9a23a30; }
.hud-task-icon { font-size: 12px; }
.hud-task-name { flex: 1; }
.hud-task-check { font-size: 11px; }

/* Duty banner */
.hud-duty-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1220;
  border: 0.5px solid #7f77dd;
  border-radius: 6px;
  flex-wrap: wrap;
}
.hud-duty-dot { width: 8px; height: 8px; border-radius: 50%; background: #afa9ec; flex-shrink: 0; }
.hud-duty-label { font-size: 12px; color: #afa9ec; font-weight: bold; letter-spacing: 1px; }
.hud-duty-clock { font-size: 14px; color: #7f77dd; font-weight: bold; margin-left: auto; }
.hud-duty-lock { font-size: 10px; color: #4a7a8a; width: 100%; }

/* Hub grid */
.hud-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.hud-hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  background: #111820;
  border: 0.5px solid #1e3a4a;
  border-radius: 6px;
  text-decoration: none;
  color: #8fa8b8;
  font-size: 9px;
  letter-spacing: 0.5px;
  transition: border-color .15s, color .15s;
}
.hud-hub-card:hover { border-color: #c9a23a; color: #c9a23a; }
.hud-hub-icon { font-size: 18px; }
.hud-hub-label { text-align: center; }

/* ── Right panel ── */
.hud-games-list { display: flex; flex-direction: column; gap: 6px; }
.hud-game-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #0a1520;
  border: 0.5px solid #1e3a4a;
  border-radius: 4px;
  text-decoration: none;
  color: #e8f0f5;
  font-size: 11px;
  transition: border-color .15s;
}
.hud-game-card:hover { border-color: #c9a23a; }
.hud-game-icon { font-size: 14px; flex-shrink: 0; }
.hud-game-name { flex: 1; }
.hud-game-play {
  font-size: 9px; color: #c9a23a; letter-spacing: 1px;
  border: 0.5px solid #c9a23a; border-radius: 3px;
  padding: 2px 6px; flex-shrink: 0;
}

/* Leaderboard */
.hud-lb-list { display: flex; flex-direction: column; gap: 5px; }
.hud-lb-row { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #4a7a8a; }
.hud-lb-row.self { color: #c9a23a; }
.hud-lb-rank { width: 16px; flex-shrink: 0; }
.hud-lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-lb-score { font-weight: bold; color: #ef9f27; }
.hud-lb-row.self .hud-lb-score { color: #c9a23a; }

.hud-more-link {
  display: block; text-align: center; font-size: 10px; color: #4a7a8a;
  text-decoration: none; padding: 6px; border-top: 0.5px solid #1e3a4a; margin-top: 4px;
  transition: color .15s;
}
.hud-more-link:hover { color: #c9a23a; }

/* ── Bottom nav ── */
.hud-bottombar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 48px;
  border-top: 0.5px solid #1e3a4a;
  background: #111820;
  flex-shrink: 0;
}
.hud-nav-item {
  flex: 1; text-align: center; font-size: 10px; color: #4a7a8a;
  text-decoration: none; letter-spacing: 0.5px; padding: 4px 0;
  border-right: 0.5px solid #1e3a4a;
  transition: color .15s;
}
.hud-nav-item:hover { color: #c9a23a; }
.hud-version { font-size: 9px; color: #2a3a4a; padding: 0 14px; letter-spacing: 1px; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .hud-body { grid-template-columns: 1fr; }
  .hud-left, .hud-right { border: none; border-bottom: 0.5px solid #1e3a4a; }
  .hud-mid-row { grid-template-columns: 1fr; }
  .hud-hub-grid { grid-template-columns: repeat(4, 1fr); }
  .hud-bottombar { display: none; }
  body.komuta-page nav { display: flex; }
}
