:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #ffffff;
  --text-dim: #8e8e93;
  --you: #30d158;      /* green — your side */
  --opp: #0a84ff;      /* blue — opponent side */
  --danger: #ff453a;   /* red reset/confirm */
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

.app {
  width: 100%;
  max-width: 560px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

/* Two-player board */
.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 22px;
  padding: 18px 14px;
}

.side-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.side-you .side-title { color: var(--you); }
.side-opp .side-title { color: var(--opp); }

.score {
  font-size: clamp(3.5rem, 22vw, 6rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.btn {
  border: none;
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.96);
}

/* Primary +1 button: big and prominent, tinted per side */
.btn-plus {
  width: 100%;
  padding: 22px;
  font-size: 2rem;
}

.btn-you {
  background: var(--you);
  color: #00310f;
}

.btn-opp {
  background: var(--opp);
  color: #001b3d;
}

/* Secondary minus button: less prominent */
.btn-minus {
  width: 100%;
  padding: 14px;
  font-size: 1.15rem;
  background: var(--surface-2);
  color: var(--text-dim);
}

/* Reset spans the full width under the board */
.btn-reset {
  padding: 18px;
  font-size: 1.25rem;
  background: var(--surface-2);
  color: var(--danger);
}

/* Dialog overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.overlay[hidden] {
  display: none;
}

.dialog {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.dialog-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
}

.dialog-text {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.dialog-actions {
  display: flex;
  gap: 12px;
}

.btn-cancel,
.btn-confirm {
  flex: 1;
  padding: 14px;
  font-size: 1.05rem;
}

.btn-cancel {
  background: var(--surface-2);
}

.btn-confirm {
  background: var(--danger);
  color: #ffffff;
}
