body {
  background-color: rgb(202, 236, 248);
  background-image: url('background.jpg');
  background-size: cover;
  text-align: center;
  font-family: monospace;
}

button {
  background: #a2539e;
  color: white;
  border: 2px solid #6c386a;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  width: max-content;
  margin-top: 10px;
}

.buttons {
  display: flex;
  flex-direction: row-reverse;
  margin-right: 20px;
}

.mobile-toggle-container {
  display: none;
}

.game-container {
  display: grid;
  grid-template-columns: repeat(var(--grid-width), var(--tile-size));
  grid-template-rows: repeat(var(--grid-height), var(--tile-size));
  padding: 5px;
  background-color: rgb(66, 115, 75);
  border-radius: 2px;
}

.content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.side-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.stats-panel {
  background: rgba(255, 255, 255, 0.349);
  border-radius: 15px;
  margin-left: 20px;
  max-width: 200px;
  border: 2px dashed #a2539e;
  padding: 10px;
}

.settings {
  margin-right: 20px;
  align-self: flex-end;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-items: end;
}

input {
  border: 2px solid #a2539e;
  border-radius: 5px;
  padding: 5px;
  width: 42px;
  outline: none;
}

.tile {
  width: var(--tile-size);
  height: var(--tile-size);
  background-color: #97e290;
  border-top: 4px solid #c4fabf;
  border-left: 4px solid #c4fabf;
  border-right: 4px solid #83b87e;
  border-bottom: 4px solid #83b87e;
  box-sizing: border-box;
  font-size: x-large;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: url('wand.png'), pointer;
}

.tile:hover {
  background-color: #a3f39c;
}

.tile.revealed {
  background-color: #fee8fd;
  box-shadow: none;
  border: 1px solid #e3c0e1;
}

.game-over {
  position: absolute;
  z-index: 100;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 60px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {

  .description,
  .side-panel:has(.stats-panel) {
    display: none !important;
  }

  .content {
    flex-direction: column;
    align-items: center;
    margin-top: 0;
  }

  h1 {
    margin-bottom: 0;
  }

  .side-panel {
    width: 90%;
    text-align: center;
    align-self: center;
    margin: 10px 0;
  }

  .game-over {
    font-size: 40px;
    width: 80%;
  }

  .tile {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
  }

  .settings {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
    width: 100%;
  }

  .settings>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  /* Row 2: Button and Toggle */
  .buttons {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
  }

  .buttons button {
    margin-top: 0;
  }

  .mobile-toggle-container {
    display: flex;
    margin: 0;
  }

  .simple-toggle {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 2rem;
    border: 2px dashed #6c386a;
    border-radius: 10px;
  }

  .simple-toggle span {
    display: flex;
    align-items: center;
    line-height: 0;
  }

  #mode-checkbox {
    width: 30px;
    height: 30px;
    cursor: pointer;
  }
}