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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: #101b16;
  color: white;
  cursor: crosshair;
}

body {
  user-select: none;
}

#gameCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

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

.hud {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;

  height: 90px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 35px;

  background: linear-gradient(
    to bottom,
    rgba(5, 15, 10, 0.9),
    rgba(5, 15, 10, 0)
  );

  pointer-events: none;
}

.hud-item {
  width: 130px;
  text-align: center;
}

.hud-item span {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #b7c7ba;
  margin-bottom: 3px;
}

.hud-item strong {
  font-size: 32px;
  color: #ffd95a;
  text-shadow: 0 2px 10px rgba(255, 200, 50, 0.4);
}

.hud-center {
  text-align: center;
}

.hud-center h2 {
  font-size: 20px;
  letter-spacing: 4px;
  color: #fff;
}

.hud-center span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #d0ddd3;
}

/* ---------------- POWER ---------------- */

.power-container {
  position: fixed;
  z-index: 20;

  bottom: 28px;
  left: 50%;

  transform: translateX(-50%);

  width: 260px;

  text-align: center;

  pointer-events: none;
}

.power-container span {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  color: #d5dfd7;
  margin-bottom: 7px;
}

.power-bar {
  width: 100%;
  height: 9px;

  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;

  overflow: hidden;

  background: rgba(0,0,0,0.4);
}

#powerFill {
  width: 0%;
  height: 100%;

  border-radius: 20px;

  background: linear-gradient(
    90deg,
    #62d86e,
    #f6d44a,
    #ff713b
  );

  transition: width 0.05s linear;
}

/* ---------------- CROSSHAIR ---------------- */

.crosshair {
  position: fixed;

  width: 28px;
  height: 28px;

  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;

  transform: translate(-50%, -50%);

  pointer-events: none;

  z-index: 15;

  opacity: 0.7;
}

.crosshair::before,
.crosshair::after {
  content: "";

  position: absolute;

  background: rgba(255,255,255,0.7);
}

.crosshair::before {
  width: 42px;
  height: 1px;
  left: -9px;
  top: 12px;
}

.crosshair::after {
  width: 1px;
  height: 42px;
  left: 12px;
  top: -9px;
}

/* ---------------- POPUPS ---------------- */

.popup {
  position: fixed;
  z-index: 100;

  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(3, 10, 6, 0.72);

  backdrop-filter: blur(8px);
}

.popup.hidden {
  display: none;
}

.popup-card {
  width: min(440px, 90vw);

  padding: 40px;

  text-align: center;

  background:
    linear-gradient(
      145deg,
      rgba(32, 58, 43, 0.98),
      rgba(14, 28, 21, 0.98)
    );

  border: 1px solid rgba(255,255,255,0.15);

  border-radius: 20px;

  box-shadow:
    0 30px 100px rgba(0,0,0,0.7),
    inset 0 1px rgba(255,255,255,0.08);
}

.big-bow {
  font-size: 65px;
  margin-bottom: 10px;
}

.popup-card h1 {
  font-size: 30px;
  letter-spacing: 5px;
  margin-bottom: 25px;
  color: #f9d65c;
}

.popup-card p {
  margin: 10px 0;
  color: #d4ded6;
  line-height: 1.5;
}

.space-key {
  display: inline-block;

  margin: 20px 0 5px;

  padding: 12px 30px;

  background: #eee;
  color: #222;

  border-radius: 7px;

  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;

  box-shadow:
    0 5px 0 #999,
    0 10px 25px rgba(0,0,0,0.3);
}

button {
  margin-top: 25px;

  padding: 14px 32px;

  border: none;
  border-radius: 8px;

  background: #e5bd43;
  color: #1c241d;

  font-weight: bold;
  letter-spacing: 2px;

  cursor: pointer;

  transition: 0.2s;

  box-shadow: 0 5px 20px rgba(229,189,67,0.25);
}

button:hover {
  transform: translateY(-2px);
  background: #ffda61;
}

.final-score {
  font-size: 70px;
  color: #ffd84f;
  font-weight: bold;
  margin: 10px;
}

/* ---------------- MOBILE ---------------- */

@media (max-width: 600px) {

  .hud {
    padding: 12px 15px;
  }

  .hud-item {
    width: 70px;
  }

  .hud-item strong {
    font-size: 24px;
  }

  .hud-center h2 {
    font-size: 13px;
    letter-spacing: 2px;
  }

  .hud-center span {
    font-size: 9px;
  }

  .power-container {
    width: 190px;
  }

  .popup-card {
    padding: 30px 20px;
  }

  .popup-card h1 {
    font-size: 22px;
  }
}
