body {
  margin: 0;
  background: #1a1a1a;
  font-family: 'Courier New', monospace;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#backButton {
  position: fixed;
  top: 13px;
  left: 13px;
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1em;
  z-index: 10000;
  transition: background 0.3s;
}
#backButton:hover {
  background: #555;
}

#facile { color: #66f; }
#normal { color: #ff0; }
#difficile { color: #f33; }
#nightmare {
  color: #c77dff;
  font-weight: bold;
  font-style: italic;
  text-shadow: 0 0 4px #6f2da8, 0 0 10px #c77dff;
}

.facile { color: #66f; }
.normal { color: #ff0; }
.difficile { color: #f33; }
.nightmare {
  color: #c77dff;
  font-weight: bold;
  font-style: italic;
  text-shadow: 0 0 4px #6f2da8, 0 0 10px #c77dff;
}

#mainContainer {
  position: relative;
  width: 600px;
  margin: 0 auto;
}

#gameContainer {
  text-align: center;
  position: relative;
}

#scoreBoard {
  font-size: 1.5em;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #0f0;
}

#difficultyContainer {
  margin-bottom: 20px;
}

button {
  padding: 8px 16px;
  margin: 0 5px;
  font-size: 1em;
  cursor: pointer;
  background: #333;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 5px;
  transition: background 0.3s;
}
button:hover {
  background: #555;
}

canvas {
  background: #111;
  display: none;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

#gameOverScreen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.9);
  padding: 20px;
  border: 2px solid #fff;
  border-radius: 10px;
  text-align: center;
  display: none;
  box-shadow: 0 0 20px rgba(255,0,0,0.5);
}

#playerName {
  padding: 8px;
  font-size: 1em;
  width: 80%;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#submitScoreBtn {
  background: #0a0;
  border-color: #0f0;
}
#submitScoreBtn:hover {
  background: #0c0;
}

#leaderboardContainer {
  display: none;
  position: absolute;
  top: 37px;
  left: calc(100% + 20px);
  width: fit-content;
  background: #222;
  padding: 10px;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}
#leaderboardContainer h2 {
  margin: 0 0 10px;
}

#leaderboardTable {
  border-collapse: collapse;
  width: 100%;
}
#leaderboardTable th,
#leaderboardTable td {
  border: 1px solid #fff;
  padding: 5px 10px;
  text-align: center;
}
#leaderboardTable th {
  background: #333;
}

#link {
  color: inherit;
  text-decoration: none;
  cursor: default;
}
#link:hover {
  text-decoration: none;
}

#menuBtn {
  padding: 4px 8px;
  font-size: 0.9em;
  margin-left: 10px;
  background: #555;
  border-color: #aaa;
}
#menuBtn:hover {
  background: #777;
}


#nightmareBtn {
  color: #c77dff;
  font-weight: bold;
  font-style: italic;
  text-shadow: 0 0 4px #6f2da8, 0 0 10px #c77dff;
}
#nightmareBtn:hover {
  background: #331144;
  border-color: #c77dff;
}