/* Ashen Souls UI — fonts are system serif so nothing loads externally. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #060606; }
body { font-family: "Adobe Garamond Pro", Garamond, "EB Garamond", "Times New Roman", serif; color: #d8d2c0; user-select: none; -webkit-user-select: none; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- overlays ---------- */
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%); }
#hurt-flash { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(140,0,0,0.12) 40%, rgba(120,0,0,0.5) 100%); }
#heal-flash { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(232,163,61,0.05) 40%, rgba(232,163,61,0.28) 100%); }
#whiteout { position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0; background: #e8e4da; }
#fadeblack { position: fixed; inset: 0; pointer-events: none; z-index: 39; opacity: 0; background: #000; }
#stagger-flash { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: rgba(255,240,200,0.18); }

/* ---------- HUD top-left ---------- */
#hud-topleft { position: fixed; top: 18px; left: 22px; z-index: 10; }
.bar-frame { position: relative; border: 2px solid #16120c; outline: 1px solid #6e6757;
  background: #0d0b08; box-shadow: 0 1px 3px rgba(0,0,0,0.8), inset 0 0 6px rgba(0,0,0,0.9); overflow: hidden; }
#hp-frame { width: 380px; height: 15px; margin-bottom: 4px; }
#st-frame { width: 288px; height: 11px; }
.bar-fill { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; transform-origin: left; }
.hp-fill { background: linear-gradient(180deg, #c03028 0%, #8e1d18 45%, #6d130f 100%); }
.st-fill { background: linear-gradient(180deg, #7fae4a 0%, #5c8a30 45%, #456b22 100%); }
.bar-ghost { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; transform-origin: left;
  background: linear-gradient(180deg, #e0a13a 0%, #c07d20 100%); opacity: 0.9; }
#status-row { display: flex; gap: 6px; margin-top: 5px; height: 20px; }
.status-chip { font-size: 13px; letter-spacing: 1px; padding: 1px 7px; border: 1px solid #6e6757;
  background: rgba(10,8,6,0.8); color: #e8b93d; text-transform: uppercase; }

/* ---------- equipment (bottom-left) ---------- */
#hud-equipment { position: fixed; left: 22px; bottom: 20px; z-index: 10; display: grid;
  grid-template-columns: 52px 52px; grid-template-rows: 52px 52px; gap: 4px; }
.equip-slot { position: relative; border: 2px solid #16120c; outline: 1px solid #6e6757;
  background: rgba(13,11,8,0.85); box-shadow: inset 0 0 8px rgba(0,0,0,0.85); }
.equip-slot .icon { width: 100%; height: 100%; padding: 6px; }
#slot-estus { grid-column: 1; grid-row: 2; }
#estus-count { position: absolute; right: 2px; bottom: -1px; font-size: 15px; color: #f0e6cc;
  text-shadow: 0 0 3px #000, 0 0 3px #000; font-weight: bold; }

/* ---------- souls (bottom-right, kept clear of host share bar) ---------- */
#hud-souls { position: fixed; right: 22px; bottom: 96px; z-index: 10; display: flex; align-items: center;
  gap: 8px; padding: 4px 14px 4px 8px; border: 1px solid #6e6757; background: rgba(10,8,6,0.75);
  border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.7); }
#hud-souls .souls-icon { width: 20px; height: 20px; }
#souls-count { font-size: 19px; letter-spacing: 1.5px; color: #e5ddc5; text-shadow: 0 0 4px #000; }
#souls-count.gain { color: #f5e9a8; }

/* ---------- boss bar ---------- */
#boss-hud { position: fixed; left: 50%; transform: translateX(-50%); bottom: 52px; z-index: 10;
  width: min(880px, 72vw); text-align: left; }
#boss-name { font-size: 21px; letter-spacing: 3.5px; color: #ddd5bc; text-shadow: 0 1px 2px #000, 0 0 8px rgba(0,0,0,0.9);
  margin: 0 0 3px 2px; font-variant: small-caps; }
#boss-hp-frame { width: 100%; height: 12px; }

/* ---------- lock-on ---------- */
#lockon-reticle { position: fixed; z-index: 9; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  pointer-events: none; }
#lockon-reticle::before { content: ""; display: block; width: 10px; height: 10px; margin: 2px;
  border: 1.5px solid #e8e0c8; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.9), inset 0 0 3px rgba(0,0,0,0.6); }

/* ---------- prompts & banners ---------- */
#interact-prompt { position: fixed; left: 50%; top: 62%; transform: translateX(-50%); z-index: 11;
  font-size: 20px; letter-spacing: 1.5px; color: #e5ddc5; text-shadow: 0 1px 3px #000; }
#interact-prompt .key { border: 1px solid #8a8271; padding: 0 7px; margin-right: 8px; font-size: 16px;
  background: rgba(10,8,6,0.7); border-radius: 2px; }
#hint-text { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 11;
  font-size: 17px; letter-spacing: 1.2px; color: #cfc7ae; text-shadow: 0 1px 3px #000; opacity: 0.95; text-align: center; }
#center-banner { position: fixed; left: 0; right: 0; top: 38%; z-index: 30; text-align: center;
  font-size: 64px; letter-spacing: 14px; pointer-events: none; font-variant: small-caps; }
#center-banner.you-died { color: #8e1512; text-shadow: 0 0 22px rgba(120,10,5,0.55), 0 2px 4px #000; }
#center-banner.victory { color: #d9b455; text-shadow: 0 0 26px rgba(217,180,85,0.4), 0 2px 4px #000; font-size: 54px; letter-spacing: 10px; }
#center-banner.bonfire { color: #e8dcc0; text-shadow: 0 0 18px rgba(255,180,80,0.35), 0 2px 4px #000; font-size: 40px; letter-spacing: 8px; }
#center-banner.healed { color: #b9d98a; font-size: 30px; letter-spacing: 7px; text-shadow: 0 2px 4px #000; }
#banner-sub { position: fixed; left: 0; right: 0; top: 52%; z-index: 30; text-align: center;
  font-size: 19px; letter-spacing: 2px; color: #b8ae92; pointer-events: none; font-variant: small-caps; }

/* ---------- floating labels ---------- */
#world-labels { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.float-label { position: absolute; font-size: 17px; letter-spacing: 1px; text-shadow: 0 1px 3px #000;
  transition: none; white-space: nowrap; }
.float-label.souls-gain { color: #d8d0e8; font-size: 19px; }

/* ---------- title screen ---------- */
#title-screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #1a1611 0%, #0a0908 65%, #050404 100%); transition: opacity 1.1s ease; }
#title-screen.gone { opacity: 0; pointer-events: none; }
#title-inner { text-align: center; }
#title-logo { font-size: 84px; letter-spacing: 26px; color: #cfc4a4; font-variant: small-caps;
  text-shadow: 0 0 34px rgba(190,140,60,0.25), 0 3px 6px #000; margin-left: 26px; }
#title-tag { margin-top: 10px; font-size: 17px; letter-spacing: 2px; color: #7d7663; font-style: italic; }
#title-press { margin-top: 64px; font-size: 20px; letter-spacing: 6px; color: #d8cdb0; }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
#title-controls { margin-top: 46px; display: inline-block; text-align: left; opacity: 0.85; }

.ctl { font-size: 15px; letter-spacing: 1px; color: #a89f88; margin-top: 5px; }
.ctl .key, .key { display: inline-block; border: 1px solid #6e6757; background: rgba(20,16,10,0.8);
  padding: 0 6px; margin: 0 2px; font-size: 13px; color: #ddd3b8; border-radius: 2px; letter-spacing: 0.5px; }

/* ---------- help overlay ---------- */
#help-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,0.55); display: flex;
  align-items: center; justify-content: center; }
#help-box { border: 1px solid #6e6757; background: rgba(10,8,6,0.95); padding: 26px 34px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.8); }
.help-title { font-size: 22px; letter-spacing: 5px; color: #d8cdb0; margin-bottom: 12px; font-variant: small-caps; }
