:root {
  color-scheme: dark;
  font-family: "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  background: #020302;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #15170d 0%, #050605 55%, #000 100%);
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
}

body {
  display: grid;
  place-items: center;
  padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
}

#gameShell {
  position: relative;
  width: 100vw;
  height: 56.25vw;
  max-width: 177.777778vh;
  max-height: 100vh;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 80px rgba(123, 112, 46, .18), 0 0 0 1px #36301a;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #000 url("assets/fallback/cover.jpg") center / cover no-repeat;
  cursor: crosshair;
  touch-action: none;
  outline: none;
}

#loader {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 30px;
  color: #d9cf8d;
  letter-spacing: .12em;
  text-shadow: 0 2px 10px #000;
  background: linear-gradient(rgba(3, 5, 4, .94), rgba(8, 8, 4, .96));
  z-index: 2;
  transition: opacity .35s ease;
}

#loader.hidden { opacity: 0; pointer-events: none; }
.loader-title { font-size: clamp(18px, 3vw, 34px); font-weight: 900; }
.loader-track {
  width: min(520px, 80vw);
  height: 16px;
  padding: 3px;
  border: 1px solid #8b7a35;
  background: #080a07;
}

#loaderFill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4b501f, #d0bd51);
  transition: width .12s linear;
}

#loaderText { font-size: 13px; color: #8f9270; }

#fatal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, .76);
}

#fatal[hidden] { display: none; }
.fatal-card {
  width: min(560px, 92%);
  padding: 28px;
  border: 2px solid #8c742d;
  border-radius: 14px;
  color: #d7d3af;
  text-align: center;
  background: rgba(8, 10, 8, .96);
  box-shadow: 0 12px 60px #000;
}
.fatal-title { margin-bottom: 14px; color: #df5346; font-size: 25px; font-weight: 900; }
.fatal-card button {
  margin-top: 20px;
  padding: 11px 28px;
  border: 1px solid #bca34a;
  border-radius: 8px;
  color: #f1eab9;
  font: 800 15px Arial, sans-serif;
  background: #353318;
}

@media (max-width: 720px), (max-height: 500px) {
  body { padding: 0; }
  #gameShell { box-shadow: none; }
}
