/* Boter, Kaas & Eieren — agent-demo.
   Vormgeving 1-op-1 overgenomen uit het HTML-prototype (kleuren, fonts, ronde vormen).
   Alle klassen zijn geprefixt met .bke- zodat er niets lekt. */

:root {
  --bke-bg:        #EFE9DC;
  --bke-ink:       #16130D;
  --bke-cell:      #F7F3EA;
  --bke-cell-hov:  #E6DFCF;
  --bke-x:         #D9532B;
  --bke-x-dark:    #A63B1B;
  --bke-o:         #1F7A8C;
  --bke-draw:      #7E7566;
  --bke-muted:     #9A9083;
  --bke-muted-2:   #B8AF9F;
  --bke-muted-3:   #A79E8E;
  --bke-line:      #DDD5C5;
  --bke-cream:     #FFF7EE;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bke-bg);
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  color: var(--bke-ink);
}

[v-cloak] { display: none; }

.bke-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 72px;
  gap: 26px;
}

.bke-title {
  margin: 0;
  text-align: center;
  font-size: clamp(38px, 8.5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.94;
  text-wrap: balance;
  max-width: 9ch;
}

/* ---- Score-balk ---- */
.bke-score {
  display: flex;
  align-items: stretch;
  background: var(--bke-ink);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.bke-score-seg {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 9px 20px 9px 16px;
}
.bke-score-seg--side { background: var(--bke-bg); }
.bke-score-seg--mid  { padding: 9px 18px; }
.bke-score-glyph {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
}
.bke-score-glyph--x { color: var(--bke-x); }
.bke-score-glyph--o { color: var(--bke-o); }
.bke-score-mid-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bke-muted);
}
.bke-score-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bke-score-num--mid { color: var(--bke-bg); }

/* ---- Status ---- */
.bke-status {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.bke-status-text {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ---- Bord ---- */
.bke-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(400px, 88vw);
  background: var(--bke-ink);
  padding: 8px;
  border-radius: 32px;
  box-shadow: 0 18px 40px -18px rgba(22, 19, 13, 0.55);
}
.bke-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: clamp(40px, 11vw, 62px);
  font-weight: 400;
  line-height: 1;
  border-radius: 22px;
  border: none;
  background: var(--bke-cell);
  color: transparent;
  padding: 0;
  cursor: default;
  transition: background 140ms ease, color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
.bke-cell--playable { cursor: pointer; }
.bke-cell--playable:hover { background: var(--bke-cell-hov); }
.bke-cell--x { color: var(--bke-x); }
.bke-cell--o { color: var(--bke-o); }
.bke-cell--win-x { background: var(--bke-x); color: var(--bke-cream); }
.bke-cell--win-o { background: var(--bke-o); color: var(--bke-cream); }

/* ---- Knoppen ---- */
.bke-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}
.bke-btn {
  font-family: 'Bricolage Grotesque', Helvetica, sans-serif;
  border: none;
  cursor: pointer;
  border-radius: 999px;
}
.bke-btn--primary {
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  background: var(--bke-x);
  color: var(--bke-cream);
  box-shadow: 0 4px 0 var(--bke-ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.bke-btn--primary:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--bke-ink);
}
.bke-btn--ghost {
  font-size: 16px;
  font-weight: 500;
  padding: 14px 24px;
  background: transparent;
  color: var(--bke-draw);
  transition: color 120ms ease;
}
.bke-btn--ghost:hover { color: var(--bke-ink); }
.bke-btn:disabled { opacity: 0.5; cursor: default; }

/* ---- Laatste uitslagen ---- */
.bke-history {
  width: min(400px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 18px;
}
.bke-history-head {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bke-muted);
  padding-bottom: 8px;
}
.bke-history-list { display: flex; flex-direction: column; }
.bke-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--bke-line);
}
.bke-history-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.bke-history-id {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--bke-muted-2);
}
.bke-history-label {
  font-size: 16px;
  font-weight: 700;
}
.bke-history-label--x { color: var(--bke-x); }
.bke-history-label--o { color: var(--bke-o); }
.bke-history-label--draw { color: var(--bke-draw); }
.bke-history-date {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--bke-muted);
  white-space: nowrap;
}
.bke-history-empty {
  font-size: 15px;
  color: var(--bke-muted-3);
  padding: 12px 2px;
  border-top: 1px solid var(--bke-line);
}
