body {
  font-family: "Trebuchet MS", sans-serif;
  background: #0f172a;
  color: white;
  text-align: center;
  min-height: 100vh;
  margin: 0;
  padding: 30px 20px;
  box-sizing: border-box;
}

h1 {
  font-size: 3rem;
  margin: 0 0 10px 0;
  color: #4ade80;
  text-shadow: 3px 3px 0 #166534;
}

.difficulty {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.level {
  font-family: inherit;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border: 2px solid #4ade80;
  border-radius: 10px;
  background: transparent;
  color: #4ade80;
  cursor: pointer;
}

#speedword {
  margin-left: 8px;
  color: #fbbf24;
  min-width: 60px;
  text-align: left;
}

.level:hover {
  background: rgba(74, 222, 128, 0.2);
}

/* The one you've picked */
.level.chosen {
  background: #4ade80;
  color: #0f172a;
  font-weight: bold;
}

.scoreboard {
  display: flex;
  gap: 25px;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

canvas {
  background: #1e293b;
  border: 4px solid #4ade80;
  border-radius: 10px;
  /* Stops the canvas going blurry when the squares are tiny */
  image-rendering: pixelated;
}

#message {
  font-size: 1.2rem;
  height: 30px;
  color: #fbbf24;
}

footer {
  margin-top: 30px;
  opacity: 0.6;
}

/* ---- Back button to the arcade menu ---- */
.arcade-back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 27, 46, 0.85);
  border: 1px solid #3a4568;
  color: #e8ecf8;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.arcade-back:hover {
  background: #ff6b9d;
  border-color: #ff6b9d;
  color: #fff;
}
