@import url('https://fonts.googleapis.com/css2?family=Nova+Flat&display=swap');

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #111;
  font-family: sans-serif;
  touch-action: none;
}

canvas {
  display: block;
  background: #222;
  touch-action: none;
}

#header, #footer {
  position: absolute;
  left: 0;
  width: 100%;
  background: #000;
  color: #0af;
  z-index: 5;
  transition: transform .4s ease;
}

#header {
  top: 0;
  text-align: center;
  padding: 10px;
}

#footer {
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

#header.hide-header {
  transform: translateY(-100%);
}

#footer.hide-footer {
  transform: translateY(100%);
}

#scoreDisplay {
  position: absolute;
  top: 60px;
  left: 10px;
  z-index: 10;
  background: rgba(0,0,0,.7);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 16px;
  color: #fff;
  transition: top .3s ease;
}

#scoreDisplay.game-active {
  top: 10px;
}

#pauseBtn {
  position: absolute;
  top: 60px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,.7);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  color: #fff;
  transition: top .3s ease;
}

#pauseBtn.game-active {
  top: 10px;
}

#overlay {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.8);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  z-index: 20;
  max-width: 90%;
  color: #fff;
}

button {
  font-size: 16px;
  padding: 10px 16px;
  margin: 5px;
  cursor: pointer;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
}

.difficulty-btn.active {
  background: #0af;
  color: white;
}

@media (max-width: 600px) {
  #overlay {
    width: 95% !important;
    max-width: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  #footer {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #footer a {
    display: inline-block;
    text-decoration: none;
    padding: 5px 10px;
    margin-right: 5px;
    color: #0af;
  }
}

/* Don't remove */

#header a {
  display: block;
  color: #ffd600;
  font-size: 22px;
  margin: 4px auto 0 -20px;
  text-decoration: none;
  font-family: 'Nova Flat', system-ui;
}

#footer a {
  text-decoration: none;
  color: #0af;
}

@media (max-width: 600px) {
  #header a {
    font-size: 18px;
  }

  #footer a {
    font-size: 18px;
  }
}
