﻿:root {
  --bg: #0f1424;
  --panel: #161c30;
  --accent: #6dd3ff;
  --text: #e7ecf6;
  --muted: #9fb1cc;
  --grid: #223048;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "SF Pro Display", "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(77, 112, 255, 0.15), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(255, 98, 146, 0.25), transparent 30%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1e2a42;
}
.topbar h1 { margin: 0 0 6px; letter-spacing: 0.5px; }
.topbar p { margin: 0; color: var(--muted); font-size: 14px; }

main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 24px;
  flex: 1;
}

.board-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--panel);
  border: 1px solid #1e2a42;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

#board {
  background: #0b1120;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  touch-action: none;
}

.info {
  background: var(--panel);
  border: 1px solid #1e2a42;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.info h2 { margin-top: 0; }
.info ol { margin-top: 8px; color: var(--muted); }
.info li + li { margin-top: 6px; }

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.controls button {
  background: #1f2c46;
  color: var(--text);
  border: 1px solid #2e3d5f;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.controls button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.controls button:active { transform: translateY(0); }
#status { color: #7eedc4; font-weight: 600; min-width: 130px; display: inline-flex; gap: 8px; align-items: center; }
#status button { background: #2fbb89; border: none; color: #0b1120; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-weight: 700; }

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.options label {
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
}
.options select {
  background: #1f2c46;
  color: var(--text);
  border: 1px solid #2e3d5f;
  padding: 8px;
  border-radius: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--panel);
  border: 1px solid #2b3652;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  min-width: 260px;
  text-align: center;
}
.modal-card h2 { margin: 0 0 8px; }
.modal-card p { margin: 0 0 16px; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions button {
  background: #2fbb89;
  color: #0b1120;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
.modal-actions button#modalClose { background: #1f2c46; color: var(--text); }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .board-wrap { order: 2; }
  .info { order: 1; }
}
