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

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  user-select: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ───── CROSSHAIR ───── */
#crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  width: 1px;
  height: 1px;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.ch-line {
  position: absolute;
  background: rgba(255,255,255,0.9);
  transition: all 0.07s ease;
  box-shadow: 0 0 6px rgba(0,0,0,0.55);
}
.ch-top    { width: 2px; height: 8px; top: -14px; left: -1px; }
.ch-bottom { width: 2px; height: 8px; top:   7px; left: -1px; }
.ch-left   { width: 8px; height: 2px; left: -14px; top: -1px; }
.ch-right  { width: 8px; height: 2px; left:   7px; top: -1px; }
.ch-dot    { width: 3px; height: 3px; background: rgba(255,255,255,0.95); border-radius: 50%; top: -1.5px; left: -1.5px; }
.ch-spread-ring {
  position: absolute;
  width: 0; height: 0;
  top: 0; left: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all 0.12s ease;
}

#crosshair.recoil .ch-top    { top: -20px; }
#crosshair.recoil .ch-bottom { top:  13px; }
#crosshair.recoil .ch-left   { left: -20px; }
#crosshair.recoil .ch-right  { left:  13px; }

#crosshair.ads-pistol .ch-top,
#crosshair.ads-pistol .ch-bottom { height: 6px; }
#crosshair.ads-pistol .ch-left,
#crosshair.ads-pistol .ch-right { width: 6px; }

#crosshair.ads-smg .ch-top { top: -11px; }
#crosshair.ads-smg .ch-bottom { top: 5px; }
#crosshair.ads-smg .ch-left { left: -11px; }
#crosshair.ads-smg .ch-right { left: 5px; }

#crosshair.ads-rifle .ch-line { background: rgba(180,235,255,0.95); }
#crosshair.ads-rifle .ch-top { top: -17px; height: 5px; }
#crosshair.ads-rifle .ch-bottom { top: 12px; height: 5px; }
#crosshair.ads-rifle .ch-left { left: -17px; width: 5px; }
#crosshair.ads-rifle .ch-right { left: 12px; width: 5px; }

#crosshair.ads-shotgun .ch-line { opacity: 0.55; }
#crosshair.ads-shotgun .ch-spread-ring {
  width: 42px; height: 42px;
  border-color: rgba(255,255,255,0.58);
  opacity: 1;
}

#crosshair.ads-sniper .ch-line { background: rgba(255,255,255,0.95); }
#crosshair.ads-sniper .ch-top { top: -28px; height: 18px; }
#crosshair.ads-sniper .ch-bottom { top: 10px; height: 18px; }
#crosshair.ads-sniper .ch-left { left: -28px; width: 18px; }
#crosshair.ads-sniper .ch-right { left: 10px; width: 18px; }
#crosshair.ads-sniper .ch-dot { width: 2px; height: 2px; top: -1px; left: -1px; }

#crosshair.ads-launcher .ch-spread-ring {
  width: 54px; height: 54px;
  border-color: rgba(255,118,72,0.72);
  box-shadow: 0 0 14px rgba(255,90,40,0.2);
  opacity: 1;
}

#crosshair.aiming {
  transform: translate(-50%, -50%) scale(0.94);
}

#scope-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
  background:
    radial-gradient(circle at center, transparent 0 27%, rgba(0,0,0,0.18) 27.5%, transparent 28% 35%, rgba(0,0,0,0.82) 35.5%),
    linear-gradient(to right, transparent calc(50% - 1px), rgba(255,255,255,0.25) 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), rgba(255,255,255,0.25) 50%, transparent calc(50% + 1px));
}

#scope-overlay.active {
  opacity: 1;
}

#damage-popups {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 18;
  pointer-events: none;
}

.damage-popup {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
  animation: damageFloat 0.72s ease forwards;
  will-change: transform, opacity;
}

.damage-popup.kill {
  color: #ffd66b;
  font-size: 26px;
}

@keyframes damageFloat {
  0%   { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
  15%  { opacity: 1; transform: translate(-50%, -60%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -118%) scale(0.9); }
}

#player-label-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.player-label {
  position: absolute;
  min-width: 96px;
  transform: translate(-50%, -100%);
  padding: 5px 7px 6px;
  border-radius: 7px;
  background: rgba(5, 8, 14, 0.76);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
  font-family: 'Courier New', monospace;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}

.player-label-name {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.player-label-level {
  color: #ffd66b;
  font-weight: 800;
}

.player-label-hp {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.player-label-hp span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #24d85a, #8dffb0);
  transition: width 0.12s linear;
}

#crosshair-reload {
  position: absolute;
  width: 26px; height: 26px;
  top: -13px; left: -13px;
  border-radius: 50%;
  background: conic-gradient(transparent 0deg, transparent 0deg);
  border: 2px solid transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, border-color 0.12s ease;
}

#crosshair-reload.active {
  opacity: 1;
  border-color: rgba(255,255,255,0.2);
}

#round-countdown {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
  z-index: 35;
  background: radial-gradient(circle at center, rgba(255, 150, 40, 0.08), transparent 35%);
}

#round-countdown.active {
  display: flex;
}

.round-countdown-kicker {
  padding: 5px 12px;
  border: 1px solid rgba(255, 190, 90, 0.26);
  border-radius: 6px;
  background: rgba(5, 7, 12, 0.76);
  color: #ffdca6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

#round-countdown-value {
  margin-top: 10px;
  min-width: 180px;
  text-align: center;
  color: #fff6df;
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 118px;
  line-height: 0.92;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(255, 160, 40, 0.85), 0 0 42px rgba(255, 90, 20, 0.4), 0 8px 22px rgba(0,0,0,0.75);
}

#round-countdown-value.countdown-pulse {
  animation: roundCountdownPop 0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

#round-countdown.go #round-countdown-value {
  font-size: 82px;
  letter-spacing: 4px;
  color: #ffe18b;
}

@keyframes roundCountdownPop {
  0% { transform: scale(0.62); opacity: 0; filter: blur(4px); }
  32% { transform: scale(1.08); opacity: 1; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

/* ───── BOTTOM-LEFT HUD ───── */
#hud-bottom-left {
  position: absolute;
  bottom: 28px; left: 24px;
  pointer-events: none;
  z-index: 10;
  min-width: 260px;
}

.hud-panel {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  padding: 14px 18px;
}

.hud-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #f5f7fb;
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 7px;
}

#profileName {
  color: #ffffff;
  font-weight: 700;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#accountCurrencyDisplay { color: #ffd66b; font-weight: 700; }
#levelDisplay { color: #8fd4ff; font-weight: 700; }

#xp-container {
  height: 5px;
  width: 100%;
  background: rgba(255,255,255,0.09);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

#xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #2c9cff, #80e0ff);
  border-radius: 4px;
  transition: width 0.25s ease;
}

.hud-weapon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

#weaponDisplay {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.rarity-badge {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.rarity-common    { background: rgba(170,170,170,0.25); color: #aaa; border: 1px solid #666; }
.rarity-rare      { background: rgba(0,220,100,0.2);    color: #00ee66; border: 1px solid #00aa44; }
.rarity-epic      { background: rgba(180,50,255,0.2);   color: #cc44ff; border: 1px solid #8800cc; }
.rarity-legendary { background: rgba(255,200,0,0.2);    color: #ffcc00; border: 1px solid #cc9900; }

.hud-ammo-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  color: #aaa;
}
.hud-ammo-row span:first-child { color: #fff; font-size: 18px; font-weight: bold; }
#dmgDisplay { color: #ff8844; font-weight: bold; }

.hud-hp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#hp-container {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
#hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #22dd44, #44ff66);
  transition: width 0.15s ease, background 0.3s ease;
  border-radius: 4px;
}
#hpText { font-size: 13px; color: #aaa; min-width: 28px; text-align: right; }

.hud-money-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hud-label { font-size: 10px; color: #666; letter-spacing: 1px; }
#moneyDisplay { font-size: 22px; font-weight: bold; color: #ffd700; }
#killsDisplay { font-size: 13px; color: #ff6644; }
#scoreDisplay { font-size: 13px; color: #aaaaff; margin-left: 10px; }

/* ───── TOP-RIGHT: WANTED ───── */
#hud-top-right {
  position: absolute;
  top: 20px; right: 20px;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#wanted-layer {
  background:
    linear-gradient(180deg, rgba(18, 20, 26, 0.82), rgba(3, 5, 10, 0.78));
  border: 1px solid rgba(255,210,105,0.16);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  padding: 8px 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}

.wanted-label {
  font-size: 9px;
  color: #b8beca;
  letter-spacing: 2px;
  margin-right: 2px;
}

#wanted-layer span.star {
  font-size: 20px;
  line-height: 1;
  color: #383b44;
  filter: grayscale(1);
  transform: translateY(0) scale(1);
  opacity: 0.72;
  transition: color 0.22s ease, text-shadow 0.22s ease, filter 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
}
#wanted-layer span.star.star-active {
  color: #ffd84f;
  filter: none;
  opacity: 1;
  text-shadow: 0 0 8px rgba(255,215,80,0.95), 0 0 22px rgba(255,150,20,0.55);
  animation: wantedStarGlow 1.65s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 1) * 0.06s);
}
#wanted-layer span.star.star-inactive {
  color: #333845;
  text-shadow: inset 0 0 0 transparent;
}
@keyframes starPulse {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-1px) scale(1.46); }
  100% { transform: translateY(0) scale(1); }
}
#wanted-layer span.star.star-pulse {
  animation: starPulse 0.42s ease, wantedStarGlow 1.65s ease-in-out infinite alternate;
}
@keyframes wantedStarGlow {
  from { text-shadow: 0 0 7px rgba(255,215,80,0.85), 0 0 16px rgba(255,130,20,0.35); }
  to { text-shadow: 0 0 12px rgba(255,230,110,1), 0 0 28px rgba(255,130,20,0.68); }
}

/* ───── MINIMAP ───── */
#minimap-wrap {
  padding: 5px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.08), transparent 36%),
    rgba(3, 6, 12, 0.74);
  border: 1px solid rgba(180,220,255,0.18);
  border-radius: 50%;
  box-shadow: 0 14px 38px rgba(0,0,0,0.42), inset 0 0 18px rgba(100,170,255,0.08);
  backdrop-filter: blur(8px);
}
#minimap {
  border-radius: 50%;
  display: block;
  width: 180px;
  height: 180px;
}

/* ───── KILL FEED ───── */
#kill-feed {
  position: absolute;
  top: 220px; right: 20px;
  width: 260px;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kill-feed-item {
  background: rgba(0,0,0,0.72);
  border-left: 3px solid currentColor;
  padding: 5px 10px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  letter-spacing: 0.3px;
  animation: slideIn 0.2s ease;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
}
@keyframes slideIn {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ───── MISSION DISPLAY ───── */
#mission-display {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 10, 16, 0.62);
  border: 1px solid rgba(120,150,220,0.18);
  border-radius: 12px;
  padding: 9px 16px 10px;
  pointer-events: none;
  z-index: 10;
  text-align: center;
  min-width: 320px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.mission-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 7px;
}

.mission-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #6a7ba8;
  background: rgba(80,110,200,0.15);
  padding: 2px 7px;
  border-radius: 4px;
}

#mission-title {
  font-size: 12.5px;
  color: #dde4ff;
  letter-spacing: 0.3px;
  font-weight: 600;
}

#mission-progress-text {
  font-size: 11px;
  color: #88aaff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#mission-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
#mission-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3a7bff, #7fd0ff);
  border-radius: 3px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 8px rgba(80,160,255,0.6);
}

/* ───── INVENTAR-LEISTE ───── */
#inventory-bar {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  pointer-events: none;
}

.inv-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 168px;
  padding: 8px 10px;
  background: rgba(8, 10, 16, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  backdrop-filter: blur(10px);
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.inv-slot.active {
  border-color: rgba(255,160,60,0.7);
  background: rgba(30, 20, 8, 0.75);
  box-shadow: 0 0 18px rgba(255,140,0,0.35), 0 4px 14px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

.inv-slot.empty { opacity: 0.4; }

.inv-key {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #ccc;
}
.inv-slot.active .inv-key {
  background: rgba(255,150,40,0.25);
  border-color: rgba(255,150,40,0.6);
  color: #ffcc88;
}

.inv-info { flex: 1; min-width: 0; }
.inv-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.inv-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}
.inv-dmg { font-size: 10px; color: #ff8855; font-weight: 600; }
.inv-ammo { font-size: 10px; color: #888; font-variant-numeric: tabular-nums; }

/* ───── KISTEN-PROMPT ───── */
#crate-prompt {
  position: absolute;
  bottom: 120px; left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 12;
  pointer-events: none;
}

#crate-prompt-ring {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: conic-gradient(#ff8800 0deg, rgba(255,255,255,0.12) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
#crate-prompt-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

#crate-prompt-label {
  background: rgba(8, 10, 16, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  color: #ddd;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
#crate-prompt-label strong {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 1px 7px;
  color: #fff;
}

#mission-flash {
  position: absolute;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 80, 0, 0.9);
  border: 1px solid #44ff66;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 13px;
  color: #88ffaa;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

#mp-status-panel {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 280px;
  display: none;
  pointer-events: none;
  z-index: 11;
  background: rgba(4, 7, 12, 0.78);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  backdrop-filter: blur(8px);
}

.mp-status-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

#mp-mode-label { color: #cfe8ff; font-weight: 700; }
#mp-code-label { color: #ffd66b; font-weight: 700; }

#mp-player-list {
  display: grid;
  gap: 5px;
  font-size: 11px;
}

.mp-player-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #e8eef7;
}

.mp-player-line span:last-child {
  color: #ff6f6f;
  font-variant-numeric: tabular-nums;
}

/* ───── LOOT POPUP ───── */
#loot-popup {
  position: absolute;
  top: 22%; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(5, 5, 10, 0.96);
  padding: 20px 44px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  border: 2px solid rgba(255, 100, 0, 0.6);
  box-shadow: 0 0 40px rgba(255, 100, 0, 0.3);
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
#loot-popup .loot-label {
  font-size: 10px;
  color: #666;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

/* ───── INSTRUCTIONS ───── */
#instructions {
  position: absolute;
  bottom: 28px; right: 24px;
  background: rgba(0,0,0,0.72);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: #777;
  pointer-events: none;
  backdrop-filter: blur(4px);
  text-align: right;
  line-height: 1.6;
}
#instructions strong { color: #bbb; }

@media (max-width: 860px) {
  #hud-bottom-left {
    left: 12px;
    bottom: 12px;
    min-width: 240px;
  }

  #instructions {
    display: none;
  }

  #inventory-bar {
    width: calc(100vw - 24px);
    gap: 6px;
  }

  .inv-slot {
    width: 25%;
    min-width: 0;
    padding: 7px;
  }

  .inv-name {
    max-width: 100%;
  }

  #mp-status-panel {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
  }
}
