/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6f9;
  color: #333;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

/* Layout */
#game-container {
  text-align: center;
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

/* Header */
#game-container h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

#game-container .subtitle {
  color: #555;
  font-size: 1.1rem;
}

/* Game Board */
#board {
  display: grid;
  gap: 2px;
  margin: 1.5rem auto 0 auto; /* auto left/right margins for centering */
  aspect-ratio: 1;
  width: 100%;
  max-width: 100%;
}

/* Levels Section */
#levels {
  margin-top: 2rem;
}

#wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#disclaimer {
  margin-top: 1rem;
  text-align: center;
  color: grey;
  font-size: 0.9rem;
}
/* Tiles */
.tile {
  background: #b2bec3;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-family: monospace;
  font-size: clamp(0.8rem, 4vw, 2rem); /* scales with viewport width */
  transition: background-color 0.2s ease, transform 0.2s ease;
  aspect-ratio: 1 / 1;
  width: 100%;
  color: #2d3436;
}


.tile:hover {
  transform: translateY(-3px);
}

.tile.dug {
  background: #dfe6e9;
}

.tile.flagged {
  background: #ffec99;
}

/* Button */
button#restart {
  padding: 0.5em 1.2em;
  border: none;
  border-radius: 8px;
  background-color: #1971c2;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

button#restart:hover {
  background-color: #1864ab;
  transform: translateY(-2px);
}

/* Optional Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: #888;
  font-size: 0.9rem;
}
