/* Teplice City: Hodina Smrti - base styles (HUD, menus, overlays). */
/* Fonts are self-hosted (assets/fonts, SIL OFL): Bebas Neue for display type, Inter (variable) for text. */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/bebas-neue-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/bebas-neue-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: Inter, system-ui, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
canvas {
  display: block;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.hidden {
  display: none !important;
}
#topright {
  position: absolute;
  top: 14px;
  right: 18px;
  text-align: right;
}
#money {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 44px;
  letter-spacing: 2px;
  color: #9be37a;
  text-shadow:
    0 0 2px #000,
    2px 2px 0 #000,
    -1px -1px 0 #000;
}
#stars {
  font-size: 30px;
  letter-spacing: 3px;
  margin-top: -4px;
}
#stars span {
  color: rgba(0, 0, 0, 0.35);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
}
#stars span.on {
  color: #ffd23f;
  -webkit-text-stroke: 1px #000;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
}
#stars.blink span.on {
  animation: bl 0.5s steps(2) infinite;
}
@keyframes bl {
  50% {
    opacity: 0.25;
  }
}
#obj {
  position: absolute;
  top: 14px;
  left: 18px;
  max-width: min(420px, 60vw);
  background: rgba(0, 0, 0, 0.55);
  padding: 10px 14px;
  border-left: 4px solid #ffd23f;
  font-size: 15px;
  line-height: 1.35;
  border-radius: 2px;
}
#obj:empty {
  display: none;
}
#obj b {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 1px;
  color: #ffd23f;
  display: block;
}
#timer {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 46px;
  text-shadow: 2px 2px 0 #000;
}
#timer.low {
  color: #ff5a4f;
}
#sub {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, calc(100vw - 400px));
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  text-shadow:
    0 0 4px #000,
    1px 1px 2px #000;
  line-height: 1.4;
}
#big {
  position: absolute;
  top: 32%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: min(84px, 13vw);
  letter-spacing: 3px;
  color: #ffd23f;
  text-shadow:
    3px 3px 0 #000,
    -2px -2px 0 #000;
  transition: opacity 0.4s;
}
#big small {
  display: block;
  font-size: 0.42em;
  color: #fff;
  letter-spacing: 2px;
}
#zone {
  position: absolute;
  bottom: 34px;
  right: 24px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 38px;
  letter-spacing: 2px;
  color: #cfe9ff;
  text-shadow: 2px 2px 0 #000;
  transition: opacity 0.6s;
  opacity: 0;
}
#mini {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.6),
    0 4px 16px rgba(0, 0, 0, 0.5);
}
#speed {
  position: absolute;
  left: 196px;
  bottom: 26px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 34px;
  text-shadow: 2px 2px 0 #000;
}
#speed small {
  font-size: 18px;
  margin-left: 3px;
}
#hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 60px);
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
}
#hint:empty {
  display: none;
}
#bigmap {
  position: fixed;
  inset: 0;
  margin: auto;
  background: rgba(0, 0, 0, 0.85);
  z-index: 5;
}
kbd {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  background: #222b3d;
  border: 1px solid #556;
  border-bottom-width: 3px;
  border-radius: 4px;
  padding: 0 6px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  margin-right: 2px;
}
#touch {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
#touch .b {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.45);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  touch-action: none;
}
#touch .b.on {
  background: rgba(255, 210, 63, 0.5);
}
#tbtn {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: auto;
  display: flex;
  gap: 8px;
}
#tbtn button {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
}
@media (max-width: 700px) {
  #money {
    font-size: 32px;
  }
  #stars {
    font-size: 22px;
  }
  #mini {
    width: 104px;
    height: 104px;
  }
  #speed {
    left: 146px;
    font-size: 24px;
  }
  #hpbar {
    left: 128px !important;
    height: 104px !important;
    width: 9px !important;
  }
  #zone {
    font-size: 26px;
    bottom: auto;
    top: 110px;
  }
  #sub {
    bottom: 132px;
    font-size: 14px;
    width: 92vw;
  }
  #obj {
    font-size: 13px;
    max-width: 55vw;
  }
}
#grave,
#win {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(circle at 50% 35%, #1d2336 0%, #05060b 85%);
  padding: 16px;
  overflow: auto;
  text-align: center;
}
#grave.hidden,
#win.hidden {
  display: none;
}
#grave h3,
#win h3 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 52px);
  letter-spacing: 2px;
  color: #ffd23f;
  text-shadow: 3px 3px 0 #000;
  margin: 0;
  max-width: 760px;
  line-height: 1.1;
}
#win canvas {
  width: min(520px, 92vw);
  height: auto;
  border: 3px solid #ffd23f;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px #000,
    0 10px 30px rgba(0, 0, 0, 0.7);
}
#win h3 {
  font-size: clamp(30px, 7vw, 60px);
  color: #fff35c;
}
#win .btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
#grave canvas {
  width: min(360px, 80vw);
  height: auto;
  border: 3px solid #555;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px #000,
    0 10px 30px rgba(0, 0, 0, 0.7);
}
#graveGo,
.endBtn {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 28px;
  letter-spacing: 3px;
  background: #ffd23f;
  color: #111;
  border: 0;
  border-radius: 8px;
  padding: 10px 26px;
  cursor: pointer;
}
#graveGo:hover,
.endBtn:hover {
  background: #fff;
}
#goal {
  font-weight: 700;
  font-size: 15px;
  color: #ffd23f;
  text-shadow:
    0 0 2px #000,
    1px 1px 0 #000;
  text-align: right;
  margin-top: 2px;
}
