* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #1a1a2e;
  color: #eee;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: fit-content;
}

h1 {
  font-size: 2rem;
  letter-spacing: 2px;
  color: #e94560;
  margin-top: 10px;
}

#controls {
  display: flex;
  gap: 8px;
}

.diff-btn {
  padding: 8px 16px;
  border: 2px solid #e94560;
  background: transparent;
  color: #eee;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.diff-btn:hover,
.diff-btn.active {
  background: #e94560;
  color: #fff;
}

#status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #16213e;
  border: 2px solid #0f3460;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.1rem;
  font-weight: bold;
  min-width: 200px;
}

#reset-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
}

#reset-btn:hover {
  transform: scale(1.2);
}

#board {
  display: grid;
  gap: 2px;
  background: #0f3460;
  border: 3px solid #0f3460;
  border-radius: 6px;
  padding: 4px;
  user-select: none;
}

.cell {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}

.cell.hidden {
  background: #1a4a7a;
  border: 2px solid #2a6aaa;
}

.cell.hidden:hover {
  background: #2a5a8a;
}

.cell.revealed {
  background: #16213e;
  border: 1px solid #0f3460;
  cursor: default;
}

.cell.flagged {
  background: #1a4a7a;
  border: 2px solid #e94560;
}

.cell.mine-exploded {
  background: #e94560;
}

.cell.mine-revealed {
  background: #16213e;
  border: 1px solid #0f3460;
}

/* Number colors */
.n1 { color: #4fc3f7; }
.n2 { color: #81c784; }
.n3 { color: #e57373; }
.n4 { color: #9575cd; }
.n5 { color: #ff8a65; }
.n6 { color: #4dd0e1; }
.n7 { color: #f06292; }
.n8 { color: #aaa; }

#message {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#message.hidden {
  display: none;
}

#message-box {
  background: #16213e;
  border: 3px solid #e94560;
  border-radius: 12px;
  padding: 32px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#message-text {
  font-size: 1.8rem;
  font-weight: bold;
}

#message-btn {
  padding: 10px 24px;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

#message-btn:hover {
  background: #c73652;
}
