/* Dots and Boxes — aesthetic styling */

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1e1e2d;
  --muted: #6a6b76;
  --border: #e6e6ef;
  --red: #e53935;
  --blue: #1e88e5;
  --shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 800px at 20% -10%, #ffffff 0%, #f2f3f8 40%, #eef0f7 70%, #e8ebf5 100%),
    linear-gradient(180deg, #f8f9ff 0%, #f3f5ff 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dab-app {
  max-width: 840px;
  margin: 24px auto 48px auto;
  padding: 16px 20px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.dab-title {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dab-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  margin: 8px 0 14px;
}

.dab-score {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}
.dab-score.red { border-left: 4px solid var(--red); }
.dab-score.blue { border-left: 4px solid var(--blue); }

.dab-turn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.dab-turn-badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px #fff inset, 0 1px 2px rgba(0,0,0,0.12);
}

.dab-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 14px;
}
.dab-controls .label {
  color: var(--muted);
  font-weight: 600;
  margin-right: 6px;
}
.dab-controls button {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.dab-controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16,24,40,0.08);
  border-color: #d6d7e2;
}
.dab-controls .btn {
  background: linear-gradient(180deg, #ffffff, #fafbff);
}

.dab-board {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  background-image: radial-gradient(circle at 24px 24px, rgba(30, 136, 229, 0.06) 2px, transparent 2px);
  background-size: 48px 48px;
}

/* Dots */
.dab-dot {
  box-shadow: 0 1px 2px rgba(0,0,0,0.24);
  background: radial-gradient(circle at 30% 30%, #666, #333 70%);
}

/* Edges */
.dab-edge {
  transition: background-color 150ms ease, box-shadow 150ms ease;
}
.dab-edge.is-clickable {
  cursor: pointer;
}
.dab-edge.is-hot:not(.is-drawn) {
  box-shadow: 0 0 0 4px rgba(30,136,229,0.15);
}

/* Captured box */
.dab-box {
  transition: opacity 180ms ease;
}

/* Overlay */
.dab-overlay {
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
