:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --text: #17223b;
  --muted: #4a5a7e;
  --cell: #e5ecfb;
  --accent: #2563eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #dbeafe 0%, var(--bg) 55%, #eef4ff 100%);
  color: var(--text);
  min-height: 100vh;
}
.container { max-width: 620px; margin: 0 auto; padding: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.topbar a { color: #ea580c; text-decoration: none; font-weight: 700; }
.topbar h1 { margin: 0; font-size: 1.9rem; }
.hud {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid #ccdaf4;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}
.hud p { margin: 0; color: var(--muted); }
button {
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  background: #cad8f4;
  border-radius: 10px;
  padding: 8px;
}
.cell {
  border: none;
  border-radius: 6px;
  background: var(--cell);
  aspect-ratio: 1 / 1;
  font-weight: 700;
  color: #1e40af;
  cursor: pointer;
}
.cell.revealed {
  background: #f8fbff;
  cursor: default;
}
.cell.mine {
  background: #fecaca;
  color: #b91c1c;
}
.cell.flagged {
  background: #fde68a;
}
.status { margin-top: 10px; color: var(--muted); }
@media (max-width: 560px) {
  .hud { grid-template-columns: 1fr 1fr; }
  button { grid-column: span 2; }
}
