@font-face {
  font-family: "Dogica";
  src: url("fonts/dogicapixel.ttf");
}

@font-face {
  font-family: "Dogica";
  src: url("fonts/dogicapixelbold.ttf");
  font-weight: bold;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: "Dogica", monospace;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

#gameContainer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  max-width: 177.78vh;
  max-height: 56.25vw;
  container-type: size;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #008080;
  image-rendering: pixelated;
}

#accueil {
  position: absolute;
  inset: 0;
  z-index: 20;
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("assets/background.png") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#accueil.cache {
  display: none;
}

.accueil-record {
  position: absolute;
  top: 1.5cqh;
  left: 0.8cqw;
  padding: 1.2cqh 1.2cqw;
  background-color: #c0c0c0;
  color: #000000;
  font-size: 1.2cqw;
  box-shadow:
    inset 0.15cqw 0.15cqw 0 #ffffff,
    inset -0.15cqw -0.15cqw 0 #555555;
}

.accueil-record span {
  color: #000080;
  font-weight: bold;
}

.accueil-titre {
  margin-top: 18cqh;
  font-weight: bold;
  font-size: 6.5cqw;
  letter-spacing: 0.4cqw;
  color: #ffffff;
  text-shadow: 0.4cqw 0.4cqw 0 #1a1a1a;
}

.accueil-titre .bleu {
  color: #0a84ff;
}

.btn-jouer {
  margin-top: 18cqh;
  font-family: inherit;
  font-size: 4.6cqw;
  line-height: 1;
  padding: 3cqh 3cqw;
  background-color: #a8a8a8;
  color: #000000;
  border: none;
  cursor: pointer;
  box-shadow:
    inset 0.4cqw 0.4cqw 0 #555555,
    inset -0.2cqw -0.2cqw 0 #d0d0d0;
}

.btn-jouer:hover {
  background-color: #b8b8b8;
}

.btn-jouer:active {
  transform: translate(0.15cqw, 0.15cqw);
}

.accueil-note {
  position: absolute;
  right: 1.5cqw;
  bottom: 13cqh;
  width: 20cqw;
  padding: 1.5cqh 1.2cqw;
  background-color: #c0c0c0;
  color: #000000;
  box-shadow:
    inset 0.15cqw 0.15cqw 0 #ffffff,
    inset -0.15cqw -0.15cqw 0 #555555;
  display: flex;
  flex-direction: column;
  gap: 0.8cqh;
}

.note-ligne {
  display: flex;
  align-items: center;
  gap: 0.6cqw;
  font-size: 1cqw;
}

.note-ligne img {
  width: 3.5cqw;
  height: 3.5cqw;
  image-rendering: pixelated;
}

.note-ligne .points {
  margin-left: auto;
  font-weight: bold;
  color: #006400;
}

.note-ligne .points.danger {
  color: #b00000;
}

.touch-controls {
  position: absolute;
  bottom: 16px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
}

.touch-group {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.touch-btn {
  font-family: "Dogica", monospace;
  font-size: 16px;
  padding: 14px 22px;
  background: #c0c0c0;
  color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  opacity: 0.45;
  touch-action: manipulation;
}

.touch-btn:active {
  opacity: 0.8;
}

.touch-btn.jump-btn {
  padding: 14px 28px;
  background: #dcdcdc;
  font-size: 14px;
}

@media (hover: hover) and (pointer: fine) and (min-width: 800px) {
  .touch-controls {
    display: none;
  }
}

