#main-menu {
  text-align: center;
  padding: 40px;
}

#main-menu button {
  font-size: 1.5rem;
  padding: 10px 20px;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  width: 90vmin;
  height: 90vmin;
  gap: 2px;
  background: #ddd;
  border: 2px solid black;
  margin: auto;
  border-block-end: 1px solid rgba(0,0,0,0.1);
  position: relative;
}
.tile {
  width: 100%;
  height: 100%;
  background-color: rgb(78, 125, 78);
  z-index: 998;
}
.tile.empty {
  background-color: transparent;
  pointer-events: none;
}
.player, .goal, .bed, .blockade {
  width: 100%;
  height: 100%;
}
.player {
  background: red;
  z-index: 999;
}
.goal {
  background: greenyellow;
  z-index: 999;
}
.blockade {
  background-color: rgb(0, 0, 0);
  z-index: 999;
}
#fade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
  z-index: 1000;
}
#counter {
  position: fixed;
  top: 10px;
  left: 10px;
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.2rem;
  z-index: 999;
  opacity: 0;
}
.hidden {
  opacity: 0;
  pointer-events: none;
}
#messagebox {
  position: fixed;
  height: 100%;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #111;
  color: white;
  padding: 20px 40px;
  box-sizing: border-box;
  text-align: center;
  font-size: 18px;
  font-family: sans-serif;
  opacity: 0;
  z-index: 1001;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  pointer-events: none;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

#message {
  max-width: 800px;
  font-size: 50px;
  margin: 0 auto;
  line-height: 1.2;
  white-space: nowrap;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}