/* mirage-city — HUD overlay styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e0e0e0;
}

/* ---- Canvas ---- */

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* ---- HUD ---- */

#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

#hud > * {
  pointer-events: auto;
}

/* ---- Header ---- */

#hud-header {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

#city-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#search-input {
  padding: 8px 16px;
  border: 1px solid #334;
  border-radius: 20px;
  background: rgba(26, 26, 46, 0.85);
  color: #e0e0e0;
  font-size: 14px;
  width: 240px;
  outline: none;
  backdrop-filter: blur(10px);
}

#search-input:focus {
  border-color: #5588cc;
  box-shadow: 0 0 8px rgba(85, 136, 204, 0.3);
}

#search-input::placeholder {
  color: #667;
}

#search-box {
  position: relative;
}

#search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: rgba(26, 26, 46, 0.96);
  border: 1px solid #334;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

#search-results[hidden] {
  display: none;
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #e0e0e0;
}

.search-item:hover,
.search-item.active {
  background: rgba(85, 136, 204, 0.25);
}

.search-name {
  font-family: 'Consolas', 'Menlo', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-meta {
  color: #889;
  font-size: 11px;
  white-space: nowrap;
}

/* ---- Info Panel ---- */

#info-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 300px;
  background: rgba(26, 26, 46, 0.92);
  border: 1px solid #334;
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(12px);
}

#info-panel.hidden {
  display: none;
}

#info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

#info-close:hover {
  color: #fff;
}

#info-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-all;
}

.info-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(85, 136, 204, 0.2);
  color: #88bbee;
  margin-right: 6px;
  margin-bottom: 12px;
}

#info-metrics {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

#info-metrics td {
  padding: 4px 0;
  font-size: 13px;
}

#info-metrics td:first-child {
  color: #889;
}

#info-metrics td:last-child {
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.file-link {
  display: block;
  font-size: 12px;
  color: #5588cc;
  text-decoration: none;
  word-break: break-all;
}

.file-link:hover {
  text-decoration: underline;
}

/* ---- Legend ---- */

#legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 16px;
  background: rgba(26, 26, 46, 0.85);
  padding: 10px 16px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid #334;
}

.legend-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  color: #ccc;
}

.legend-lang {
  color: #667;
  font-size: 11px;
}

/* ---- Controls Hint ---- */

#controls-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #556;
}
