* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin:0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

h1 {
  color: white;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#game-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#game-board {
  position: relative;
  width: min(90vmin, 400px);
  height: min(90vmin, 400px);
  padding: 10px;
  background: #555;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.tile {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 5vmin, 32px);
  font-weight: bold;
  color: #222;
  background: #FFB93B;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.tile:hover {
  transform: scale(1.03);
}

dialog {
  border: none;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

dialog::backdrop {
  background: rgba(0,0,0,0.6);
}

dialog p {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

dialog button {
  margin-top: 0;
}

#info {
  margin-top: 15px;
  text-align: center;
  color: #333;
  font-size: 18px;
}

#moves {
  font-weight: bold;
  color: #667eea;
}

.btn {
  padding: 10px 30px;
  font-size: 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background: #764ba2;
}

#newGameBtn {
  margin-top: 15px;
}

dialog .btn {
  margin-top: 0;
}

button:hover {
  background: #764ba2;
}

.button-container {
  text-align: center;
}
