.minesweeper-game {
  text-align: center;
  padding: 2rem;
}

.minesweeper-game h1 {
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.game-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 1rem;
  flex-wrap: wrap;
}

.score-container {
  background: var(--card-bg);
  border: 2px solid var(--card-border-color);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
}

.score-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--text-muted-color);
  margin-bottom: 0.25rem;
}

.mines-count, .timer {
  font-size: 1.5rem;
  font-weight: bold;
}

.reset-button, .retry-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--link-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.reset-button:hover, .retry-button:hover {
  opacity: 0.8;
}

.difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.difficulty-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: var(--card-bg);
  color: var(--text-color);
  border: 2px solid var(--card-border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.difficulty-btn:hover {
  background: var(--card-header-bg);
}

.difficulty-btn.active {
  background: var(--link-color);
  color: white;
  border-color: var(--link-color);
}

.instructions {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted-color);
}

.board-container {
  display: inline-block;
  margin: 0 auto;
}

.board {
  display: inline-grid;
  gap: 2px;
  background: var(--card-border-color);
  padding: 5px;
  border-radius: 8px;
}

.cell {
  width: 30px;
  height: 30px;
  background: var(--card-bg);
  border: 2px outset var(--card-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.cell:hover:not(.revealed):not(.flagged) {
  background: var(--card-header-bg);
}

.cell.revealed {
  background: #ddd;
  border: 1px solid #999;
  cursor: default;
}

.cell.mine {
  background: #ff4444;
}

.cell.flagged::after {
  content: '🚩';
}

.cell.revealed.num-1 { color: #0000ff; }
.cell.revealed.num-2 { color: #008000; }
.cell.revealed.num-3 { color: #ff0000; }
.cell.revealed.num-4 { color: #000080; }
.cell.revealed.num-5 { color: #800000; }
.cell.revealed.num-6 { color: #008080; }
.cell.revealed.num-7 { color: #000000; }
.cell.revealed.num-8 { color: #808080; }

.game-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  border: 2px solid var(--card-border-color);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-message.hidden {
  display: none;
}

.message-text {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.final-time {
  font-size: 1.5rem;
  color: var(--link-color);
  margin-bottom: 2rem;
}

.game-message-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.submit-score-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: #f39c12;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.submit-score-button:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .cell {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }

  .difficulty-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}
