/* ============ CYBERPUNK 2077 // NIGHT CITY PROTOTYPE — HUD ============ */
:root {
  --yel: #fcee0a;
  --cyan: #00f0ff;
  --red: #ff003c;
  --pink: #ff2a6d;
  --panel: rgba(7, 9, 14, 0.72);
  --panel-border: rgba(252, 238, 10, 0.28);
  --ui-font: 'Rajdhani', 'Segoe UI', sans-serif;
  --spread: 6px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05030a; }
body { font-family: var(--ui-font); color: #e8ecf2; user-select: none; -webkit-user-select: none; }
.hidden { display: none !important; }

#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ---------------- HUD root ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud::after { /* faint scanlines */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.panel {
  position: absolute; background: var(--panel); border: 1px solid var(--panel-border);
  backdrop-filter: blur(3px); padding: 10px 14px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* ---------------- crosshair ---------------- */
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; }
#crosshair i { position: absolute; background: rgba(240, 246, 255, 0.92); box-shadow: 0 0 4px rgba(0,240,255,.8); }
.ch-t { width: 2px; height: 9px; left: -1px; top: calc(-9px - var(--spread)); }
.ch-b { width: 2px; height: 9px; left: -1px; top: var(--spread); }
.ch-l { width: 9px; height: 2px; top: -1px; left: calc(-9px - var(--spread)); }
.ch-r { width: 9px; height: 2px; top: -1px; left: var(--spread); }
.ch-dot { width: 2px; height: 2px; left: -1px; top: -1px; border-radius: 50%; }

#hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; z-index: 6; }
#hitmarker i { position: absolute; width: 10px; height: 2px; background: #fff; box-shadow: 0 0 6px #fff; }
#hitmarker i:nth-child(1) { transform: translate(-12px, -8px) rotate(45deg); }
#hitmarker i:nth-child(2) { transform: translate(3px, -8px) rotate(-45deg); }
#hitmarker i:nth-child(3) { transform: translate(-12px, 7px) rotate(-45deg); }
#hitmarker i:nth-child(4) { transform: translate(3px, 7px) rotate(45deg); }
#hitmarker.show { opacity: 1; transition: none; }
#hitmarker.fade { opacity: 0; transition: opacity .25s; }
#hitmarker.head i { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------------- quest tracker ---------------- */
#hud-quest { top: 22px; left: 22px; min-width: 250px; max-width: 340px; }
.q-kicker { font-size: 10px; letter-spacing: 3px; color: var(--yel); opacity: .85; }
.q-title { font-size: 19px; font-weight: 700; letter-spacing: 1px; color: #fff; margin: 2px 0; text-transform: uppercase; }
.q-obj { font-size: 14px; color: #b8c4d4; line-height: 1.45; }
.q-obj b { color: var(--cyan); }

/* ---------------- vitals ---------------- */
#hud-vitals { left: 22px; bottom: 22px; width: 300px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.bar { flex: 1; height: 13px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); position: relative; overflow: hidden; }
.bar-row.thin .bar { height: 5px; }
.bar .fill { height: 100%; width: 100%; transform-origin: left; transition: transform .15s ease-out; }
.bar.hp .fill { background: linear-gradient(90deg, #59ff8a, #21d07a); box-shadow: 0 0 8px rgba(60,255,140,.5); }
.bar.hp.low .fill { background: linear-gradient(90deg, #ff4d5e, #c8002a); box-shadow: 0 0 8px rgba(255,60,90,.6); }
.bar.armor .fill { background: var(--cyan); box-shadow: 0 0 8px rgba(0,240,255,.5); }
.bar.ram .fill { background: linear-gradient(90deg, #7a5cff, #b44dff); box-shadow: 0 0 8px rgba(140,90,255,.5); }
.bar.xp .fill { background: var(--yel); box-shadow: 0 0 6px rgba(252,238,10,.4); }
.bar-num { font-size: 13px; font-weight: 700; min-width: 34px; text-align: right; color: #dfe7f0; }
.vitals-meta { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1.5px; color: #8d9aa8; margin-top: 4px; }
#txt-level { color: var(--yel); font-weight: 700; }

/* ---------------- weapon ---------------- */
#hud-weapon { right: 22px; bottom: 22px; text-align: right; min-width: 210px; }
#wpn-name { font-size: 12px; letter-spacing: 2px; color: #93a1b0; text-transform: uppercase; }
#wpn-ammo { margin: 2px 0; }
#ammo-mag { font-size: 34px; font-weight: 700; color: #fff; }
#ammo-res { font-size: 17px; color: #77828f; margin-left: 5px; }
#ammo-mag.low { color: var(--red); }
#wpn-slots span { display: inline-block; margin-left: 6px; font-size: 12px; color: #5c6875; border: 1px solid #3a4450; padding: 1px 8px; }
#wpn-slots span.on { color: #061014; background: var(--yel); border-color: var(--yel); font-weight: 700; }
#wpn-reload { font-size: 12px; letter-spacing: 3px; color: var(--yel); animation: blink 0.7s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------------- minimap ---------------- */
#hud-map { right: 22px; top: 22px; padding: 8px; text-align: center; }
#minimap { width: 150px; height: 150px; border-radius: 50%; border: 1px solid rgba(0,240,255,.35); box-shadow: 0 0 12px rgba(0,240,255,.15) inset; }
#txt-eddies { margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--yel); letter-spacing: 1px; }

/* ---------------- feed / prompt / banner ---------------- */
#feed { position: absolute; left: 22px; bottom: 190px; display: flex; flex-direction: column-reverse; gap: 4px; max-width: 420px; }
.feed-msg { font-size: 13.5px; font-weight: 600; padding: 4px 10px; background: rgba(5,7,11,.68); border-left: 3px solid var(--cyan); color: #cfd9e4; animation: feedin .18s ease-out; }
.feed-msg.gold { border-color: var(--yel); color: var(--yel); }
.feed-msg.bad { border-color: var(--red); color: #ff8fa3; }
.feed-msg.xp { border-color: #7a5cff; color: #cdb8ff; }
@keyframes feedin { from { transform: translateX(-14px); opacity: 0; } }

#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-size: 15px; font-weight: 700; letter-spacing: 1px;
  background: rgba(5,7,11,.78); border: 1px solid rgba(0,240,255,.5); color: var(--cyan); padding: 6px 16px; }

#banner { position: absolute; left: 0; right: 0; top: 24%; text-align: center; pointer-events: none; }
#banner-title { font-size: 44px; font-weight: 800; letter-spacing: 6px; color: var(--yel); text-shadow: 0 0 24px rgba(252,238,10,.5); text-transform: uppercase; }
#banner-sub { font-size: 16px; letter-spacing: 3px; color: #cfd9e4; margin-top: 4px; }
#banner.red #banner-title { color: var(--red); text-shadow: 0 0 24px rgba(255,0,60,.6); }
#banner.cyan #banner-title { color: var(--cyan); text-shadow: 0 0 24px rgba(0,240,255,.5); }

/* ---------------- phone ---------------- */
#phone { position: absolute; right: 22px; top: 200px; width: 280px; background: rgba(6,8,13,.85); border: 1px solid rgba(0,240,255,.4);
  padding: 10px 12px; pointer-events: none; animation: feedin .2s ease-out; }
#phone-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ph-av { width: 26px; height: 26px; border-radius: 50%; background: var(--yel); color: #10120a; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; letter-spacing: 1px; }
#phone-name { font-size: 12px; letter-spacing: 2px; color: var(--cyan); font-weight: 700; }
#phone-text { font-size: 13.5px; line-height: 1.45; color: #dfe7f0; min-height: 38px; }
#phone-text .cursor { animation: blink .6s infinite; }

/* ---------------- dialog ---------------- */
#dialog { position: absolute; left: 50%; bottom: 24%; transform: translateX(-50%); width: 460px; max-width: 90vw;
  background: rgba(6,8,13,.9); border: 1px solid var(--panel-border); padding: 16px 20px; pointer-events: auto; text-align: center; }
#dialog-kicker { font-size: 10px; letter-spacing: 3px; color: var(--cyan); }
#dialog-title { font-size: 20px; font-weight: 700; color: var(--yel); margin: 4px 0 6px; text-transform: uppercase; }
#dialog-text { font-size: 14.5px; color: #cfd9e4; line-height: 1.5; margin-bottom: 12px; }
#dialog-accept { font-family: var(--ui-font); font-size: 15px; font-weight: 700; letter-spacing: 2px; color: #10120a;
  background: var(--yel); border: none; padding: 9px 22px; cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
#dialog-accept:hover { background: #fff95c; }

/* ---------------- quest log ---------------- */
#questlog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; max-width: 92vw;
  max-height: 70vh; overflow: auto; background: rgba(6,8,13,.94); border: 1px solid var(--panel-border); padding: 18px 22px; pointer-events: auto; }
#questlog h3 { color: var(--yel); letter-spacing: 3px; font-size: 16px; margin-bottom: 10px; }
#questlog h3 span { color: #77828f; font-size: 11px; letter-spacing: 1px; }
.ql-q { margin-bottom: 12px; }
.ql-title { font-size: 16px; font-weight: 700; color: #fff; text-transform: uppercase; }
.ql-obj { font-size: 13.5px; color: #a9b6c4; padding-left: 14px; }
.ql-obj.done { color: #59ff8a; text-decoration: line-through; }
.ql-obj.active { color: var(--cyan); }

/* ---------------- labels / dmg numbers / marker ---------------- */
#labels { position: absolute; inset: 0; overflow: hidden; }
.lbl { position: absolute; transform: translate(-50%, -100%); font-size: 11px; letter-spacing: 1px; white-space: nowrap;
  color: var(--red); text-shadow: 0 0 6px rgba(255,0,60,.8); font-weight: 700; }
.lbl small { display: block; color: #b9c4d0; font-weight: 500; letter-spacing: 0; }
.lbl.civ { color: #9fb4c8; text-shadow: 0 0 6px rgba(120,160,200,.6); }
.lbl.pickup { color: var(--cyan); text-shadow: 0 0 6px rgba(0,240,255,.8); }
.dmgnum { position: absolute; transform: translate(-50%, -50%); font-size: 15px; font-weight: 800; color: #ffe28a;
  text-shadow: 0 0 6px rgba(0,0,0,.9); }
.dmgnum.head { color: var(--red); font-size: 18px; }
.dmgnum.player { color: var(--red); }
.qmarker { position: absolute; transform: translate(-50%, -100%); text-align: center; }
.qmarker .dia { width: 14px; height: 14px; margin: 0 auto; border: 2px solid var(--yel); transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(252,238,10,.8); background: rgba(252,238,10,.18); }
.qmarker .dia.ncpd { border-color: #4da6ff; background: rgba(77,166,255,.2); box-shadow: 0 0 10px rgba(77,166,255,.8); }
.qmarker .dist { font-size: 11px; font-weight: 700; color: var(--yel); margin-top: 5px; letter-spacing: 1px; }
.qmarker .dist.ncpd { color: #4da6ff; }

/* ---------------- scan / vignette ---------------- */
#scan-overlay { position: absolute; inset: 0; opacity: 0; transition: opacity .12s;
  backdrop-filter: grayscale(0.85) contrast(1.25) brightness(0.72) sepia(0.25) hue-rotate(140deg); }
#scan-overlay.on { opacity: 1; }
.scan-frame { position: absolute; inset: 12px; border: 1px solid rgba(0,240,255,.25);
  clip-path: polygon(0 0, 40px 0, 40px 2px, 2px 2px, 2px 40px, 0 40px, 0 0, 100% 0, 100% 40px, calc(100% - 2px) 40px, calc(100% - 2px) 2px, calc(100% - 40px) 2px, calc(100% - 40px) 0, 100% 0, 100% 100%, 0 100%, 0 calc(100% - 40px), 2px calc(100% - 40px), 2px calc(100% - 2px), 40px calc(100% - 2px), 40px 100%, 0 100%, 100% 100%, calc(100% - 40px) 100%, calc(100% - 40px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 40px), 100% calc(100% - 40px)); }
#scan-hint { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: 4px; color: var(--cyan); }

#vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(255, 0, 40, 0.55) 100%); }
#lowhp { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(160, 0, 20, 0.5) 100%); }

/* ---------------- screens ---------------- */
.screen { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 120%, #1c0f33 0%, #0a0616 55%, #05030a 100%); }
.scanlines { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px); }
.s-inner { text-align: center; max-width: 780px; padding: 30px; position: relative; }
.s-inner.small { max-width: 460px; }
.s-kicker { font-size: 12px; letter-spacing: 5px; color: var(--cyan); margin-bottom: 14px; }
.s-title { font-family: 'Orbitron', var(--ui-font); font-size: clamp(44px, 9vw, 92px); font-weight: 800; letter-spacing: 4px;
  color: var(--yel); line-height: .95; text-shadow: 0 0 30px rgba(252,238,10,.35), 4px 4px 0 rgba(255,0,60,.65); }
.s-title span { display: block; font-size: 0.62em; color: #fff; text-shadow: 0 0 24px rgba(0,240,255,.6), 4px 4px 0 rgba(255,0,60,.65); }
.s-sub { margin: 10px 0 26px; font-size: 15px; letter-spacing: 6px; color: #aebccb; }
.s-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px 18px; text-align: left; margin: 0 auto 28px; max-width: 640px; }
.s-controls div { font-size: 13px; color: #9fb0c0; border-left: 2px solid rgba(0,240,255,.35); padding-left: 10px; }
.s-controls b { color: #fff; font-weight: 700; letter-spacing: 1px; display: block; }
.s-controls i { color: var(--cyan); font-style: normal; }
.screen button { font-family: var(--ui-font); font-size: 19px; font-weight: 700; letter-spacing: 3px; color: #10120a;
  background: var(--yel); border: none; padding: 14px 44px; cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: 0 0 30px rgba(252,238,10,.35); transition: transform .08s, background .12s; }
.screen button:hover { background: #fff95c; transform: scale(1.03); }
.s-note { margin-top: 16px; font-size: 13px; color: #8d9aa8; letter-spacing: 1px; }
.s-legal { margin-top: 22px; font-size: 10.5px; color: #5a6572; line-height: 1.5; max-width: 560px; margin-left: auto; margin-right: auto; }
.screen h2 { font-family: 'Orbitron', var(--ui-font); letter-spacing: 6px; font-size: 40px; color: #fff; margin-bottom: 18px; }
.screen h2.flat { color: var(--red); text-shadow: 0 0 30px rgba(255,0,60,.6); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 10px 0; font-size: 14px; color: #aebccb; }
.opt-row input[type=range] { width: 200px; accent-color: var(--yel); }
