* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; }

body {
  overflow: hidden;
  background: #111815;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  cursor: none;
}

body.menu,
body.menu .overlay,
body.menu button {
  cursor: default;
}

body.menu button {
  cursor: pointer;
}

#game { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; }

.hud {
  position: absolute;
  top: 28px;
  left: 32px;
  display: flex;
  gap: 30px;
  pointer-events: none;
  text-shadow: 0 2px 12px #000;
}
.hud div { display: flex; flex-direction: column; }
.hud span { font-family: Arial, sans-serif; font-size: 11px; letter-spacing: 3px; color: #cbd8cc; }
.hud strong { font-size: 30px; font-weight: normal; }

.highscores {
  position: absolute;
  top: 24px;
  right: 26px;
  width: min(260px, 35vw);
  padding: 12px 14px;
  background: rgba(10, 15, 12, 0.45);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  z-index: 30;
}

.highscores h2 {
  margin: 0 0 8px;
  font: bold 11px Arial, sans-serif;
  letter-spacing: 3px;
  color: #cbd8cc;
}

.highscores ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.highscores li {
  font: 13px Arial, sans-serif;
  color: #f5f7f4;
  text-shadow: 0 1px 4px #000;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 4px 6px;
}

#crosshair {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(255,255,255,.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 4px #000;
}
#crosshair::before, #crosshair::after { content:""; position:absolute; background:#fff; box-shadow:0 0 3px #000; }
#crosshair::before { width:1px; height:8px; left:14px; top:-5px; }
#crosshair::after { height:1px; width:8px; top:14px; left:-5px; }

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12,18,15,.48);
  backdrop-filter: blur(4px);
  transition: opacity .35s;
}
.overlay.hidden { opacity: 0; pointer-events: none; }
.panel {
  width: min(440px, calc(100vw - 40px));
  padding: 42px 48px;
  text-align: center;
  background: rgba(17,25,21,.94);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.eyebrow { color:#aebaa9 !important; font: bold 11px Arial, sans-serif !important; letter-spacing:5px; }
.panel h1 { margin: 8px 0 14px; font-size: 48px; font-weight: normal; }
.panel p { color:#cbd2c9; line-height:1.7; }
button {
  margin-top: 16px;
  padding: 14px 26px;
  border: 1px solid #dce8d7;
  background: transparent;
  color: #fff;
  font: bold 12px Arial, sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
}
button:hover { background:#dce8d7; color:#172019; }

#shotInfo {
  position:absolute;
  left:32px;
  bottom:28px;
  display:flex;
  align-items:flex-end;
  gap:8px;
  opacity:0;
  transition: opacity .15s;
  pointer-events:none;
  text-shadow:0 2px 8px #000;
}
#shotInfo.visible { opacity:1; }
#shotValue { font-size:38px; }
#shotInfo small { margin-bottom:7px; font:10px Arial,sans-serif; letter-spacing:2px; }

#endScreen { z-index: 20; }
#endScreen.hidden { opacity: 0; pointer-events: none; }

.target-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #dbe4d8;
  font: 14px Arial, sans-serif;
}

.target-option input {
  width: 16px;
  height: 16px;
  accent-color: #dce8d7;
  cursor: pointer;
}
