/* apps/client/src/styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow: hidden;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  background: #000;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

#game-canvas {
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

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

#ui-root > * {
  pointer-events: auto;
}

#loading-screen {
  position: fixed;
  display: flex;
  z-index: 100;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
  justify-content: center;
  align-items:  center;
  width: 100%;
  height: 100%;
  transition: opacity .5s ease-out;
  top: 0;
  left: 0;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-content h1 {
  letter-spacing: .5em;
  text-transform: uppercase;
  color: #c9aa71;
  text-shadow: 0 0 30px #c9aa714d;
  margin-bottom: 2rem;
  font-size: 3rem;
  font-weight: 300;
}

.loading-status {
  color: #888;
  min-height: 1.2em;
  margin-bottom: 1rem;
  font-size: .875rem;
}

.loading-bar {
  overflow: hidden;
  background: #ffffff1a;
  border-radius: 2px;
  width: 300px;
  height: 4px;
  margin: 0 auto;
}

.loading-bar-fill {
  background: linear-gradient(90deg, #c9aa71, #e8d5a3);
  border-radius: 2px;
  width: 0%;
  height: 100%;
  transition: width .3s;
}

/* apps/client/src/ui/hud.css */
.unit-frame {
  position: absolute;
  background: #000000bf;
  border: 1px solid #c9aa71;
  border-radius: 4px;
  width: 220px;
  padding: 8px;
  font-size: 12px;
}

.unit-frame--player {
  top: 12px;
  left: 12px;
}

.unit-frame--target {
  display: none;
  top: 12px;
  left: 248px;
}

.unit-frame--target.visible {
  display: block;
}

.unit-frame__header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 4px;
}

.unit-frame__name {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
  font-weight: 600;
}

.unit-frame__level {
  color: #c9aa71;
  flex-shrink: 0;
  font-size: 11px;
}

.bar {
  overflow: hidden;
  position: relative;
  background: #00000080;
  border-radius: 2px;
  height: 14px;
  margin-bottom: 3px;
}

.bar:last-child {
  margin-bottom: 0;
}

.bar__fill {
  border-radius: 2px;
  height: 100%;
  transition: width .15s;
}

.bar__fill--health {
  background: linear-gradient(#2ecc40, #1a9928);
}

.bar__fill--mana {
  background: linear-gradient(#4a90d9, #2a5fa0);
}

.bar__text {
  position: absolute;
  display: flex;
  color: #fff;
  text-shadow: 0 1px 2px #000c;
  justify-content: center;
  align-items:  center;
  font-size: 10px;
  inset: 0;
}

.action-bar {
  position: absolute;
  display: flex;
  gap: 2px;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.action-bar__slot {
  position: relative;
  display: flex;
  color: #666;
  background: #000000b3;
  border: 1px solid #555;
  border-radius: 4px;
  justify-content: center;
  align-items:  center;
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.action-bar__slot.active {
  background: #c9aa7126;
  border-color: #c9aa71;
}

.action-bar__keybind {
  position: absolute;
  color: #999;
  font-size: 9px;
  top: 2px;
  right: 3px;
}

.minimap {
  position: absolute;
  text-align: center;
  width: 140px;
  top: 12px;
  right: 12px;
}

.minimap__circle {
  position: relative;
  overflow: hidden;
  background: #0009;
  border: 2px solid #c9aa71;
  border-radius: 50%;
  width: 140px;
  height: 140px;
}

.minimap__player-dot {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.minimap__compass {
  position: absolute;
  color: #c9aa71;
  font-size: 11px;
  font-weight: 700;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.minimap__arrow {
  position: absolute;
  transform-origin: bottom center;
  background: linear-gradient(#c33, #0000);
  width: 2px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
}

.minimap__zone {
  color: #c9aa71;
  margin-top: 6px;
  font-size: 11px;
}

.nameplate {
  position: absolute;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

.nameplate__name {
  color: #f44;
  text-shadow: 0 1px 3px #000000e6;
  margin-bottom: 2px;
  font-size: 11px;
}

.nameplate__bar {
  overflow: hidden;
  background: #0009;
  border-radius: 2px;
  width: 60px;
  height: 6px;
  margin: 0 auto;
}

.nameplate__fill {
  background: #2ecc40;
  border-radius: 2px;
  height: 100%;
}
