* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0c0f13;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  touch-action: none;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  display: block;
  background: #123;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  touch-action: none;
}

/* ---- HUD ---- */
#hud {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  padding: 10px 16px;
  pointer-events: none;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.hud-item .label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #b9f5cd;
  opacity: 0.8;
}

.hud-item span:last-child {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

/* ---- Banner ---- */
#banner {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  text-align: center;
  white-space: nowrap;
}

#banner.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

#banner.goal { color: #ffe14d; }
#banner.miss { color: #ff7a7a; }
#banner.save { color: #79c0ff; }

/* ---- Adım kontrol çubuğu ---- */
#controls {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(4, 16, 9, 0.92), rgba(4, 16, 9, 0));
  z-index: 15;
}

#controls.hidden { display: none; }

#steps {
  display: flex;
  gap: 6px;
}

.step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #9fdcb4;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  opacity: 0.55;
  transition: all 0.15s;
}

.step.active {
  opacity: 1;
  color: #06301a;
  background: #6dffa4;
  box-shadow: 0 2px 10px rgba(109, 255, 164, 0.4);
}

#instruction {
  font-size: 14px;
  font-weight: 600;
  color: #eafff0;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  min-height: 18px;
}

#ctrl-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  justify-content: center;
}

#action-btn {
  flex: 1;
  max-width: 300px;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #06301a;
  background: linear-gradient(180deg, #6dffa4, #23c46a);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(35, 196, 106, 0.4);
  transition: transform 0.1s, filter 0.1s;
}

#action-btn.shoot {
  background: linear-gradient(180deg, #ffd76d, #ff8a1e);
  color: #3a1a00;
  box-shadow: 0 6px 18px rgba(255, 138, 30, 0.45);
}

#action-btn:active { transform: scale(0.96); }

.ghost {
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 800;
  color: #eafff0;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 30px;
  cursor: pointer;
}

.ghost.hidden { display: none; }

/* ---- Start screen ---- */
#start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(160deg, rgba(10, 40, 22, 0.94), rgba(6, 20, 12, 0.97));
  text-align: center;
  color: #eafff0;
  z-index: 20;
}

#start-screen.hidden { display: none; }

#start-screen h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.tagline {
  font-size: 15px;
  max-width: 320px;
  opacity: 0.9;
  line-height: 1.4;
}

.how {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px 18px;
  border-radius: 14px;
}

#start-btn {
  margin-top: 8px;
  padding: 14px 46px;
  font-size: 20px;
  font-weight: 800;
  color: #06301a;
  background: linear-gradient(180deg, #6dffa4, #23c46a);
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(35, 196, 106, 0.4);
  transition: transform 0.1s;
}

#start-btn:active { transform: scale(0.95); }

.hint {
  font-size: 12px;
  max-width: 300px;
  opacity: 0.65;
  line-height: 1.4;
}
