@import url("https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Inter:wght@600;800;900&display=swap");
#nav {
  position: fixed;
  z-index: 7;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 15px 8px 8px;
  border-radius: 34px;
  background: #101714ed;
  border: 2px solid #ffc43d99;
  box-shadow:
    0 5px 28px #0009,
    0 0 25px #ffc43d33;
  pointer-events: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
#navArrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: #ffc43d;
  color: #17211f;
  font-size: 29px;
  line-height: 1;
  transition:
    transform 0.1s,
    background 0.2s;
}
#navLabel {
  min-width: 112px;
  color: #fff1cd;
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
}
:root {
  --cream: #fff1cd;
  --red: #ee4035;
  --yellow: #ffc43d;
  --ink: #101714;
  --green: #62d580;
  --danger: 0;
}
* {
  box-sizing: border-box;
}
html,
body,
#game {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #09100e;
  color: var(--cream);
  font-family: Inter, system-ui, sans-serif;
}
canvas {
  display: block;
}
header {
  position: fixed;
  z-index: 5;
  left: 24px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  text-shadow: 0 2px 8px #000;
}
header b {
  font:
    25px "Black Han Sans",
    Impact,
    sans-serif;
  color: var(--yellow);
  letter-spacing: 1px;
}
header i {
  font-style: normal;
  color: #fff;
  background: var(--red);
  font: 900 11px Inter;
  padding: 4px 6px;
  border-radius: 5px;
  vertical-align: 5px;
}
header span {
  color: #aab9b3;
  font-size: 11px;
}
.hidden {
  display: none !important;
}
.panel {
  position: fixed;
  z-index: 5;
  background: #101714e8;
  border: 1px solid #ffffff18;
  box-shadow: 0 10px 35px #0008;
  backdrop-filter: blur(10px);
  border-radius: 13px;
}
.stats {
  left: 24px;
  top: 64px;
  width: 340px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stats span,
.mission small,
.weapon small {
  font-size: 9px;
  color: #8fa39b;
  letter-spacing: 1px;
}
.stats strong {
  display: block;
  color: #fff1cd;
  font-size: 18px;
  margin-top: 3px;
}
.health {
  grid-column: 1/4;
  background: #441f21;
  height: 10px;
  border-radius: 8px;
  overflow: hidden;
}
.health i,
.order-time i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #38a85e, #76df82);
  transition: width 0.2s;
}
.mission {
  right: 24px;
  top: 20px;
  width: 315px;
  padding: 15px 18px;
}
.mission strong {
  display: block;
  color: var(--yellow);
  font-size: 14px;
  margin: 6px 0 9px;
}
.order-time {
  height: 7px;
  border-radius: 6px;
  background: #53321e;
  overflow: hidden;
}
.order-time i {
  background: var(--yellow);
}
.weapon {
  position: fixed;
  z-index: 5;
  left: 24px;
  bottom: 24px;
  padding: 12px 16px;
  background: #101714e8;
  border-radius: 11px;
  border-left: 4px solid var(--yellow);
}
.weapon b {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}
.stamina {
  width: 150px;
  height: 5px;
  margin-top: 8px;
  border-radius: 5px;
  overflow: hidden;
  background: #21383b;
}
.stamina i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #48bcd1, #8de9f0);
  transition: width 0.12s;
}
#sound {
  position: fixed;
  z-index: 9;
  right: 24px;
  bottom: 24px;
  width: 45px;
  height: 45px;
  border: 1px solid #ffffff25;
  border-radius: 50%;
  background: #101714e8;
  color: white;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 6px 22px #0008;
}
.boss {
  position: fixed;
  z-index: 6;
  width: 420px;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  text-align: center;
  color: #ffcc43;
  text-shadow: 0 2px #000;
}
.boss div {
  height: 12px;
  background: #35191b;
  border: 2px solid #8c3735;
  margin-top: 7px;
}
.boss i {
  display: block;
  width: 100%;
  height: 100%;
  background: #e33d35;
}
.overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #15251f77, #050907e8);
  backdrop-filter: blur(5px);
}
.card {
  text-align: center;
  width: min(460px, 90vw);
  padding: 38px;
  border: 4px solid #17211e;
  border-radius: 22px;
  background: var(--cream);
  color: var(--ink);
  box-shadow:
    13px 13px 0 var(--red),
    0 30px 100px #000;
}
.logo {
  font-size: 67px;
  filter: drop-shadow(5px 5px 0 #ed4036);
  animation: float 2s ease-in-out infinite;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 900;
  color: #64736e;
  margin-top: 12px;
}
.card h1 {
  font:
    56px/0.85 "Black Han Sans",
    Impact,
    sans-serif;
  color: var(--red);
  margin: 12px 0;
}
.card p {
  font-weight: 900;
}
.card button {
  display: block;
  margin: 23px auto 19px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  box-shadow: 0 6px 0 #9e2521;
  color: #fff;
  padding: 16px 27px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}
.card button:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #9e2521;
}
.card small {
  font-size: 11px;
  color: #65716d;
}
.vignette {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 160px #020504aa,
    inset 0 0 calc(70px + var(--danger) * 120px)
      rgba(180, 18, 22, calc(var(--danger) * 0.72));
  transition: box-shadow 0.16s;
}
#screenFx {
  position: fixed;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
#screenFx.active {
  animation: screen-pulse 0.24s ease-out;
}
#screenFx.hurt {
  background: radial-gradient(circle, transparent 25%, #d11e27aa 100%);
}
#screenFx.blast {
  background: radial-gradient(circle, #ffd46955, #f0442633 38%, transparent 72%);
}
#screenFx.freeze {
  background: radial-gradient(circle, transparent 30%, #68dcff66 100%);
}
#screenFx.delivery {
  background: radial-gradient(circle, #fff2a366, #62d58026 42%, transparent 75%);
}
#toast {
  position: fixed;
  z-index: 8;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: #101714e8;
  border: 1px solid #ffffff18;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
  transition: 0.25s;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@keyframes float {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}
@keyframes screen-pulse {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo,
  #screenFx.active {
    animation: none;
  }
}
@media (max-width: 700px) {
  header span {
    display: none;
  }
  .stats {
    width: 270px;
  }
  .mission {
    top: auto;
    bottom: 85px;
    width: 250px;
  }
  .card h1 {
    font-size: 43px;
  }
}
@media (min-width: 701px) and (max-width: 900px) {
  header span {
    display: none;
  }
  .stats {
    width: 300px;
  }
  .mission {
    width: 300px;
  }
  #nav {
    top: 132px;
  }
}
