* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  font-family: "Segoe UI", system-ui, sans-serif;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  z-index: 9;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

#crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: rgba(255, 100, 80, 0.95);
  border-radius: 50%;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  z-index: 10;
  pointer-events: none;
  color: #e8e8ef;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  max-width: 320px;
}

.hud-row span {
  min-width: 88px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.bar {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.bar .fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transition: transform 0.12s ease-out;
}

.bar .fill.player {
  background: linear-gradient(90deg, #3d9cff, #6ec0ff);
}

.bar .fill.bot {
  background: linear-gradient(90deg, #ff5c5c, #ff8a65);
}

.hint {
  font-size: 12px;
  opacity: 0.65;
  margin-top: 12px;
  max-width: 420px;
  line-height: 1.4;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 14, 0.82);
  backdrop-filter: blur(6px);
}

#overlay.hidden {
  display: none;
}

.panel {
  text-align: center;
  padding: 40px 48px;
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  max-width: 400px;
}

.panel h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #f0f4ff;
  margin-bottom: 12px;
}

.panel p {
  color: #a8b0c4;
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.5;
}

#restart {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #0a0a12;
  background: linear-gradient(180deg, #6ec0ff, #3d9cff);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#restart:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(61, 156, 255, 0.4);
}

#restart:active {
  transform: translateY(0);
}
