:root {
  --bg: #0f1220;
  --panel: #1b1f33;
  --border: #32374f;
  --text: #e6e9f5;
  --muted: #8b91ad;
  --accent: #6ea8ff;
  --gold: #f5c518;
  --red: #e05a5a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
header h1 { font-size: 22px; margin: 0; }
#timer { color: var(--muted); font-size: 15px; }

main { width: 100%; max-width: 720px; padding: 12px 20px 30px; }

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}
#controls label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
#controls select, #controls input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #12152a;
  color: var(--text);
  font-size: 14px;
}
#controls button {
  background: var(--accent);
  color: #0b0e1c;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.muted { color: var(--muted); font-size: 13px; }
#message { min-height: 24px; font-size: 20px; font-weight: 700; color: var(--gold); text-align: center; }

#board {
  display: grid;
  gap: 2px;
  background: #000;
  border: 2px solid #000;
  border-radius: 4px;
  width: min(92vw, 520px);
  margin: 0 auto;
}
.cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  color: #1a1a2e;
}
.cell.queen { color: #111; }
.cell.conflict { outline: 3px solid var(--red); z-index: 1; }
.cell.mark { color: #333; opacity: 0.7; }
.cell.blocked { color: rgba(20, 20, 40, 0.35); }
.cell.reveal { outline: 3px solid var(--gold); z-index: 2; }

.hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 16px; }
