/* SPLAT 2 — interface styles */
* { box-sizing: border-box; user-select: none; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden; background: #0a0d12;
  font-family: 'Segoe UI', Roboto, Impact, sans-serif; color: #fff;
}
canvas { display: block; }
#canvas-container { width: 100vw; height: 100vh; position: relative; overflow: hidden; }

/* Reticle */
#reticle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; pointer-events: none; z-index: 10;
  border: 2px solid rgba(0, 255, 200, 0.7); border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 255, 200, 0.5);
}
#reticle::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 4px; height: 4px; background: #ff3300; border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 0 6px #ff3300;
}
#hitmarker {
  position: absolute; top: 50%; left: 50%; width: 34px; height: 34px;
  transform: translate(-50%, -50%) rotate(45deg); opacity: 0; z-index: 11; pointer-events: none;
}
#hitmarker i { position: absolute; background: #fff; box-shadow: 0 0 6px #fff; }
#hitmarker i:nth-child(1) { left: 16px; top: 0; width: 2px; height: 10px; }
#hitmarker i:nth-child(2) { left: 16px; bottom: 0; width: 2px; height: 10px; }
#hitmarker i:nth-child(3) { top: 16px; left: 0; width: 10px; height: 2px; }
#hitmarker i:nth-child(4) { top: 16px; right: 0; width: 10px; height: 2px; }
#hitmarker.kill i { background: #ff2244; box-shadow: 0 0 8px #ff2244; }

/* Screen effects */
#flash-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0;
  background: radial-gradient(circle, transparent 35%, rgba(255, 20, 40, 0.85) 100%);
}
#lowhp-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(circle, transparent 45%, rgba(160, 0, 20, 0.7) 100%);
}
#pickup-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(circle, transparent 50%, rgba(0, 255, 160, 0.35) 100%);
}
#fade { position: absolute; inset: 0; background: #e8fff6; opacity: 0; pointer-events: none; z-index: 50; transition: opacity 0.45s; }
.dmg-ind {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px;
  border-radius: 50%; border-top: 8px solid rgba(255, 40, 70, 0.95); opacity: 0;
  pointer-events: none; z-index: 8; filter: drop-shadow(0 0 8px #ff2244);
}
.dmg-num {
  position: absolute; left: 0; top: 0; font-weight: 900; font-size: 20px; color: #fff;
  text-shadow: 0 0 6px #000, 0 0 10px rgba(255,255,255,0.5); pointer-events: none;
  z-index: 9; display: none; white-space: nowrap;
}
.dmg-num.head { color: #ffd24a; font-size: 26px; }
.dmg-num.kill { color: #ff3355; font-size: 28px; }

/* HUD */
#hud {
  position: absolute; bottom: 22px; left: 28px; right: 28px;
  display: flex; justify-content: space-between; align-items: flex-end;
  pointer-events: none; z-index: 10; gap: 12px;
}
.hud-card {
  background: linear-gradient(135deg, rgba(16, 22, 32, 0.88), rgba(8, 11, 18, 0.94));
  border: 1px solid rgba(120, 200, 255, 0.25);
  border-bottom: 4px solid #00f0ff;
  padding: 12px 22px; border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.65), 0 0 20px rgba(0,240,255,0.15);
  backdrop-filter: blur(8px); min-width: 230px;
}
.hud-card.vital { border-bottom-color: #ff2a55; }
.hud-card.center { border-bottom-color: #00ff88; text-align: center; min-width: 260px; }
.hud-title {
  font-size: 11px; font-weight: 800; letter-spacing: 2.5px;
  color: #9ab; text-transform: uppercase; margin-bottom: 4px;
}
.hud-big { font-size: 38px; font-weight: 900; line-height: 1; text-shadow: 0 0 16px currentColor; }
.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.armor-box { text-align: right; }
#armor-text { font-size: 24px; font-weight: 900; color: #4db8ff; text-shadow: 0 0 12px #4db8ff; }
.bar-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.12); border-radius: 4px; margin-top: 7px; overflow: hidden; }
.bar-bg.thin { height: 4px; margin-top: 4px; }
#hp-bar-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #ff2a55, #ff7700); box-shadow: 0 0 10px #ff2a55; transition: width 0.2s ease; }
#armor-bar-fill { width: 0%; height: 100%; background: #4db8ff; box-shadow: 0 0 8px #4db8ff; transition: width 0.2s ease; }
#dash-bar-fill { width: 100%; height: 100%; background: #ffd24a; box-shadow: 0 0 8px #ffd24a; }
.mini-label { font-size: 9px; letter-spacing: 2px; color: #789; margin-top: 3px; font-weight: 800; }
#objective { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: #cde; margin-top: 6px; }
#objective.go { color: #00ff88; text-shadow: 0 0 10px #00ff88; }
#wpn-text { color: #00f0ff; font-size: 17px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 12px #00f0ff; }
#ammo-text { color: #fff; margin-top: 4px; }
#ammo-text.low { color: #ff3355; }
#wpn-rack { display: flex; gap: 5px; margin-top: 8px; }
.w-pill {
  flex: 1; text-align: center; padding: 3px 0; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,0.08); border-radius: 4px; color: #789;
  border: 1px solid rgba(255,255,255,0.1);
}
.w-pill.locked { opacity: 0.25; }
.w-pill.active { background: #00f0ff; color: #050811; border-color: #fff; box-shadow: 0 0 12px #00f0ff; opacity: 1; }

#score-box { position: absolute; top: 22px; right: 26px; text-align: right; z-index: 10; pointer-events: none; }
#score-text { font-size: 34px; font-weight: 900; color: #ffd24a; text-shadow: 0 0 14px #ffaa00; }
#combo-text { font-size: 16px; font-weight: 900; color: #ff2a55; letter-spacing: 2px; min-height: 20px; text-shadow: 0 0 10px #ff2a55; }
#combo-bar { width: 140px; height: 3px; margin-left: auto; background: #ff2a55; transform-origin: right; transform: scaleX(0); }

#banner { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; z-index: 10; }
#sector-name {
  font-size: 26px; font-weight: 900; letter-spacing: 6px; color: #fff; white-space: nowrap;
  text-shadow: 0 0 24px #00f0ff, 0 4px 12px #000;
  background: rgba(8,14,24,0.75); padding: 8px 28px; border-radius: 30px;
  border: 1px solid rgba(0,240,255,0.4); transition: opacity 0.6s ease; opacity: 0;
}
#boss-bar { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); width: 420px; text-align: center; z-index: 10; pointer-events: none; display: none; }
#boss-bar .bar-bg { height: 10px; border: 1px solid rgba(255,0,68,0.5); }
#boss-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #ff0044, #ff8800); box-shadow: 0 0 12px #ff0044; transition: width 0.15s; }
#notice {
  position: absolute; top: 24%; left: 50%; transform: translateX(-50%); font-size: 30px; font-weight: 900;
  letter-spacing: 4px; text-align: center; opacity: 0; transition: opacity 0.4s; white-space: nowrap;
  text-shadow: 0 0 20px currentColor, 0 3px 10px #000; z-index: 12; pointer-events: none;
}
#toast-stack {
  position: absolute; bottom: 160px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; z-index: 12; pointer-events: none;
}
.toast {
  font-weight: 800; font-size: 15px; letter-spacing: 2px; padding: 4px 14px; white-space: nowrap;
  background: rgba(8,14,24,0.78); border-radius: 14px; animation: toastAnim 2.2s forwards;
}
@keyframes toastAnim { 0% { opacity: 0; transform: translateY(10px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#radar {
  position: absolute; top: 22px; left: 22px; width: 170px; height: 170px; border-radius: 12px;
  border: 2px solid rgba(0, 240, 255, 0.4); background: rgba(6, 12, 20, 0.82);
  box-shadow: 0 8px 25px rgba(0,0,0,0.7); z-index: 10; pointer-events: none;
}

#lives-text { font-size: 20px; font-weight: 900; color: #ff2a55; letter-spacing: 2px; text-shadow: 0 0 10px #ff2a55; }
#secrets-text { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: #ffd24a; margin-top: 4px; text-shadow: 0 0 8px rgba(255,170,0,0.6); }

/* Overlays */
.overlay {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 28, 48, 0.86) 0%, rgba(4, 6, 12, 0.97) 100%);
  z-index: 100; backdrop-filter: blur(10px); text-align: center; padding: 20px;
}
.overlay.show { display: flex; }
.overlay h1 {
  font-size: 88px; margin: 0; font-weight: 900; letter-spacing: 10px;
  background: linear-gradient(180deg, #fff 0%, #00f0ff 50%, #0066ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6));
}
.overlay h1.small { font-size: 60px; }
.overlay h1.red { background: linear-gradient(180deg, #fff 0%, #ff2a55 55%, #880022 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 30px rgba(255, 40, 80, 0.6)); }
.overlay h2 { margin: 4px 0 20px; font-size: 18px; letter-spacing: 6px; color: #ff2a55; text-transform: uppercase; }
.controls-box {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  padding: 16px 30px; border-radius: 10px; font-size: 14px; color: #cde; line-height: 1.8; max-width: 640px;
}
.diff-row, .btn-row { display: flex; gap: 12px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
.diff-btn {
  padding: 10px 22px; font-size: 14px; font-weight: 900; letter-spacing: 3px; cursor: pointer;
  background: rgba(255,255,255,0.06); color: #9ab; border: 2px solid rgba(255,255,255,0.15); border-radius: 30px;
}
.diff-btn.sel { color: #050811; background: #ff2a55; border-color: #fff; box-shadow: 0 0 18px #ff2a55; }
.start-btn {
  margin-top: 10px; padding: 15px 48px; font-size: 20px; font-weight: 900;
  letter-spacing: 4px; color: #050811; background: #00f0ff;
  border: none; border-radius: 40px; cursor: pointer; box-shadow: 0 0 30px #00f0ff; transition: transform 0.15s;
}
.start-btn:hover { transform: scale(1.06); background: #fff; }
.btn-alt {
  margin-top: 10px; padding: 13px 30px; font-size: 15px; font-weight: 900; letter-spacing: 3px; cursor: pointer;
  background: transparent; color: #00f0ff; border: 2px solid #00f0ff; border-radius: 40px;
}
.btn-alt:hover { background: rgba(0,240,255,0.15); }
.hi { margin-top: 18px; font-weight: 800; letter-spacing: 3px; color: #ffd24a; text-shadow: 0 0 10px #ffaa00; }
.hint { margin-top: 10px; font-size: 13px; color: #ff9; min-height: 18px; letter-spacing: 1px; }
.slider-row {
  display: flex; justify-content: space-between; align-items: center; width: 420px; max-width: 90vw; margin: 7px 0;
  font-weight: 800; letter-spacing: 2px; font-size: 13px; color: #cde;
}
.slider-row input { width: 200px; accent-color: #00f0ff; }
.slider-row span.val { width: 44px; text-align: right; color: #00f0ff; }
.stats { font-size: 17px; line-height: 1.9; color: #cde; margin-top: 14px; letter-spacing: 2px; }
.stats b { color: #fff; }

@media (max-width: 1100px) {
  #hud { transform: scale(0.82); transform-origin: bottom center; left: 0; right: 0; }
  .overlay h1 { font-size: 60px; }
}

/* Interaction prompt */
#use-prompt {
  position: absolute; top: calc(50% + 46px); left: 50%; transform: translateX(-50%); z-index: 11; pointer-events: none;
  font-weight: 900; letter-spacing: 3px; font-size: 15px; color: #ffd24a; text-shadow: 0 0 10px #ffaa00, 0 2px 6px #000;
  background: rgba(8,14,24,0.7); padding: 5px 14px; border-radius: 14px; border: 1px solid rgba(255,210,74,0.5);
  opacity: 0; transition: opacity 0.2s;
}
#use-prompt.show { opacity: 1; }
#load-error { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 30px; z-index: 300; background: #05070b; color: #ff8899; font-size: 16px; line-height: 1.7; }

.credit { margin-top: 14px; font-size: 12px; font-weight: 800; letter-spacing: 4px; color: #7f93a8; }
