@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

:root {
  color-scheme: dark;
  font-family: "Pixelify Sans", monospace;
  background: #08090f;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #08090f;
}

.game-shell {
  height: 100%;
  position: relative;
  width: 100%;
}

#road-layer,
canvas {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

#road-layer {
  object-fit: fill;
}

canvas {
  display: block;
  pointer-events: none;
}

#objects-layer {
  z-index: 1;
}

#game {
  z-index: 2;
}

.audio-menu,
.legend {
  color: #d9e2ef65;
  font-size: 14px;
  letter-spacing: .03em;
  position: absolute;
  z-index: 4;
}

.audio-menu {
  left: 24px;
  top: 24px;
}

.icon-button,
.resume-button {
  align-items: center;
  background: #ffffff69;
  border: 1px solid #707e9500;
  border-radius: 6px;
  color: #1a233600;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  padding: 8px;
}

.icon-button img,
.resume-button img {
  height: 24px;
  object-fit: contain;
  width: 24px;
}

.icon-button {
  padding: 8px;
}

.volume-panel {
  align-items: center;
  background: #80808066;
  border: 0;
  border-radius: 6px;
  display: flex;
  left: calc(100% + 8px);
  margin: 0;
  padding: 10px 12px;
  position: absolute;
  top: 0;
}

.volume-panel[hidden] {
  display: none;
}

.volume-panel input {
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 14px;
  outline: none;
  width: 130px;
}

.volume-panel input::-webkit-slider-runnable-track {
  background: #747474;
  border: 0;
  border-radius: 4px;
  height: 4px;
}

.volume-panel input::-webkit-slider-thumb {
  appearance: none;
  background: #b8b8b8;
  border: 0;
  border-radius: 50%;
  height: 12px;
  margin-top: -4px;
  width: 12px;
}

.volume-panel input::-moz-range-track {
  background: #747474;
  border: 0;
  border-radius: 4px;
  height: 4px;
}

.volume-panel input::-moz-range-progress {
  background: #b8b8b8;
  border-radius: 4px;
  height: 4px;
}

.volume-panel input::-moz-range-thumb {
  background: #b8b8b8;
  border: 0;
  border-radius: 50%;
  height: 12px;
  width: 12px;
}

.version {
  bottom: 24px;
  color: #d9e2ef99;
  font-size: 14px;
  position: absolute;
  right: 24px;
  text-shadow: 1px 1px #00000066;
  z-index: 4;
}

.legend {
  bottom: 24px;
  left: 24px;
}

.legend summary {
  cursor: pointer;
  padding: 4px 0;
  text-shadow: 1px 1px #00000066;
}

.legend-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 0;
  text-shadow: 1px 1px #00000066;
}

.legend-content span {
  align-items: center;
  display: flex;
  gap: 12px;
}

.pause-overlay {
  align-items: center;
  background: #6d717798;
  display: flex;
  flex-direction: column;
  gap: 16px;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 5;
}

.loading-status {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: .08em;
  margin: 0;
  text-shadow: 2px 2px #00000088;
}

.loading-status[hidden] {
  display: none;
}

.pause-overlay[hidden] {
  display: none;
}

.resume-button {
  background: #ffffff79;
  padding: 5px;
}

.resume-button:disabled {
  cursor: wait;
  opacity: .6;
}

.resume-button img {
  height: 90px;
  width: 90px;
}

kbd {
  background: #29324699;
  border: 1px solid #68738a;
  border-bottom-width: 3px;
  border-radius: 4px;
  box-shadow: 1px 1px #00000055;
  color: #fff;
  font: inherit;
  padding: 2px 7px;
}

@media (max-width: 560px) {
  .audio-menu { left: 12px; top: 12px; }
  .legend { bottom: 12px; left: 12px; font-size: 12px; }
}
