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

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  cursor: none;
}

#game-container {
  position: relative;
  width: 800px;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* HUD */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.45);
  color: white;
  font-size: 1rem;
  font-weight: bold;
  z-index: 10;
  pointer-events: none;
}

#score-value { color: #f9c74f; }
#timer-value { color: #f94144; }

/* 크로스헤어 */
#crosshair {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 20;
}

#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.85);
}

#crosshair::before {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

#crosshair::after {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

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

#reload-count {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  color: #f9c74f;
  font-size: 0.85rem;
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  display: none;
}

/* 오버레이 */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.72);
  color: white;
  z-index: 30;
  text-align: center;
  padding: 20px;
}

.overlay h1 {
  font-size: 2.8rem;
  text-shadow: 0 0 20px rgba(249,199,79,0.8);
}

.overlay p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.overlay .sub {
  font-size: 0.9rem;
  opacity: 0.6;
}

#rank-msg {
  font-size: 1.3rem;
  color: #f9c74f;
  font-weight: bold;
}

button {
  margin-top: 10px;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  background: #f9c74f;
  color: #1a1a2e;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 4px 15px rgba(249,199,79,0.4);
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(249,199,79,0.6);
}

button:active {
  transform: scale(0.97);
}

.hidden { display: none !important; }

/* 총알 발사 애니메이션 */
@keyframes shoot-flash {
  0%   { background: rgba(255,200,0,0.5); }
  100% { background: transparent; }
}

.shoot-flash {
  animation: shoot-flash 0.12s ease-out;
}
