/* ---------- Design tokens ---------- */
:root {
  --bg-0: #0b1020;
  --bg-1: #131a36;
  --bg-2: #1a2350;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);

  --text: #eef1ff;
  --muted: #9aa3c7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --cell-bg: rgba(255, 255, 255, 0.03);
  --cell-bg-alt: rgba(255, 255, 255, 0.06);
  --cell-given: #cbd2ff;
  --cell-user: #ffffff;

  --glow-1: rgba(124, 92, 255, 0.35);
  --glow-2: rgba(34, 211, 238, 0.25);
  --glow-3: rgba(244, 114, 182, 0.20);

  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Auto light kicks in only when no explicit theme is set */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-0: #eef1ff;
    --bg-1: #ffffff;
    --bg-2: #e6e9ff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(20, 24, 60, 0.10);
    --border-strong: rgba(20, 24, 60, 0.22);
    --text: #131736;
    --muted: #5a6086;
    --cell-bg: rgba(255, 255, 255, 0.7);
    --cell-bg-alt: rgba(124, 92, 255, 0.06);
    --cell-given: #2a2f5a;
    --cell-user: #4338ca;
    --shadow-lg: 0 30px 80px rgba(20, 24, 60, 0.12);
  }
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 10% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, var(--glow-2), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, var(--glow-3), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; }
button, .cell, .np, .seg-btn, .fab { -webkit-tap-highlight-color: rgba(124, 92, 255, 0.25); touch-action: manipulation; }
kbd {
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
}

/* ---------- Layout ---------- */
.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  font-size: 28px;
  filter: drop-shadow(0 4px 12px rgba(124, 92, 255, 0.5));
}
.brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #fff, #c7c0ff 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hud-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hud-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hud-value {
  font-weight: 600;
  font-size: 18px;
}
.muted { color: var(--muted); font-weight: 400; }
.mono { font-family: var(--font-mono); }

/* ---------- Play area ---------- */
.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 880px) {
  .play { grid-template-columns: 1fr; }
}

.board-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.board {
  --gap-thin: 1px;
  --gap-thick: 3px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--border-strong);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cell-bg);
  font-size: clamp(18px, 4vw, 30px);
  font-weight: 600;
  color: var(--cell-user);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
  outline: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.cell.alt { background: var(--cell-bg-alt); }
.cell.given { color: var(--cell-given); cursor: default; }
.cell.peer { background: rgba(124, 92, 255, 0.10); }
.cell.same { background: rgba(34, 211, 238, 0.16); }
.cell.selected {
  background: rgba(124, 92, 255, 0.30);
  box-shadow: inset 0 0 0 2px var(--accent);
  z-index: 1;
}
.cell.error { color: var(--bad); animation: shake 220ms ease; }
.cell.placed { animation: pop 180ms ease; }
.cell.hint { animation: glow 600ms ease; }

/* Thicker borders between 3x3 boxes */
.cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cell[data-col="2"], .cell[data-col="5"] { border-right: 2px solid var(--border-strong); }
.cell[data-row="2"], .cell[data-row="5"] { border-bottom: 2px solid var(--border-strong); }
.cell[data-col="8"] { border-right: none; }
.cell[data-row="8"] { border-bottom: none; }

.notes {
  position: absolute;
  inset: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  font-size: clamp(8px, 1.3vw, 11px);
  color: var(--muted);
  font-weight: 500;
  pointer-events: none;
}
.notes span {
  display: flex; align-items: center; justify-content: center;
}

@keyframes pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
@keyframes glow {
  0% { box-shadow: inset 0 0 0 0 rgba(52, 211, 153, 0.0); }
  50% { box-shadow: inset 0 0 0 3px rgba(52, 211, 153, 0.8); }
  100% { box-shadow: inset 0 0 0 0 rgba(52, 211, 153, 0.0); }
}

.board-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 16, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  z-index: 5;
}
.board-overlay[hidden] { display: none; }
.overlay-card {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}
.overlay-card h2 { margin: 0 0 6px; font-size: 22px; }
.overlay-card p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Side panel ---------- */
.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* On desktop, the drawer is just a normal stack of panels. */
.drawer {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.drawer-handle,
.drawer-close,
.fab,
.drawer-backdrop,
.mobile-only { display: none; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.row:last-child { margin-bottom: 0; }
.row.buttons { gap: 8px; flex-wrap: wrap; }
.row-label { color: var(--muted); font-size: 13px; flex: 1; }

.select {
  appearance: none;
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px;
  font-size: 14px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.btn {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: transform 100ms ease, background 120ms ease, border-color 120ms ease;
  flex: 1 0 auto;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.35);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.toggle[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent-2), #5fa9ff);
  border-color: transparent;
  color: #04121a;
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn.small { padding: 6px 10px; font-size: 12px; flex: 0 0 auto; }

/* Numpad */
.numpad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.np {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: transform 100ms ease, background 120ms ease;
}
.np:hover { background: rgba(255, 255, 255, 0.18); }
.np:active { transform: translateY(1px); }
.np .count {
  position: absolute;
  top: 3px; right: 5px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}
.np.done { opacity: 0.45; }

/* Scoreboard */
.scoreboard .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 10px; flex-wrap: wrap;
}
.scoreboard h2 { margin: 0; font-size: 16px; }
.seg {
  display: inline-flex;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 10px; border-radius: 999px; cursor: pointer; font-size: 12px;
}
.seg-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: white;
}
.scores {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 60px;
}
.scores li {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: var(--cell-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
}
.scores .rank { color: var(--muted); font-weight: 600; text-align: center; }
.scores .pts { font-family: var(--font-mono); font-weight: 600; }
.scores .time { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.scores .empty { text-align: center; color: var(--muted); padding: 14px; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* Confetti */
.confetti {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  overflow: hidden;
}
.confetti span {
  position: absolute;
  top: -10px;
  width: 8px; height: 14px;
  border-radius: 2px;
  opacity: 0.9;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.6; }
}

/* ---------- Mobile: drawer + FAB ---------- */
@media (max-width: 880px) {
  /* Lock layout to viewport height so board + numpad always fit on screen. */
  html, body { height: 100%; overflow: hidden; }
  .app {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    gap: 8px;
    height: 100dvh;
    min-height: 0;
    max-width: 100%;
  }
  .topbar { gap: 8px; flex-wrap: nowrap; }
  .brand h1 { font-size: 18px; }
  .brand-mark { font-size: 22px; }
  .hud { gap: 4px; flex: 1; justify-content: flex-end; flex-wrap: nowrap; }
  .hud-item { padding: 4px 7px; min-width: 0; border-radius: 9px; }
  .hud-label { font-size: 9px; letter-spacing: 0.04em; }
  .hud-value { font-size: 13px; }

  .play {
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .board-wrap {
    padding: 6px;
    /* Cap board so it never pushes the numpad off-screen.
       Reserve room for topbar (~52) + numpad+actions (~190) + padding. */
    width: min(100%, calc(100dvh - 250px));
    align-self: center;
    flex: 0 0 auto;
  }
  .side {
    flex: 0 0 auto;
    gap: 8px;
  }
  .actions-panel {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .actions-panel .row.buttons { gap: 6px; margin: 0; }
  .actions-panel .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 9px 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    border-color: transparent;
    color: white;
    font-size: 16px;
  }
  .actions-panel .btn { padding: 9px 6px; font-size: 13px; flex: 1 1 0; }
  .numpad { grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 0; }
  .np { padding: 12px 0; font-size: 18px; }
  .np .count { font-size: 9px; top: 2px; right: 3px; }

  .panel { padding: 12px; }

  /* The drawer becomes a bottom sheet, hidden by default. */
  .drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background:
      linear-gradient(180deg, rgba(19, 26, 54, 0.92), rgba(11, 16, 32, 0.96));
    border-top: 1px solid var(--border-strong);
    border-radius: 22px 22px 0 0;
    padding: 6px 14px max(18px, env(safe-area-inset-bottom)) 14px;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
    transform: translateY(105%);
    transition: transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1);
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  @media (prefers-color-scheme: light) {
    .drawer {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 241, 255, 0.98));
    }
  }
  .drawer.open { transform: translateY(0); }

  .drawer-handle {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--border-strong);
    margin: 6px auto 10px;
  }
  .drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    z-index: 1;
  }
  .drawer-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 4px;
  }
  /* Inside the drawer the panels lose their own backdrop to avoid double-blur. */
  .drawer .panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 6px 2px 2px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .drawer .panel + .panel {
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }
  .drawer .scores { max-height: 38vh; overflow-y: auto; }

  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 32, 0.45);
    z-index: 55;
    opacity: 0;
    transition: opacity 220ms ease;
  }
  .drawer-backdrop[hidden] { display: none; }
  .drawer-backdrop.open { opacity: 1; }

  /* Floating menu button (replaced by inline ☰ in actions row) */
  .fab { display: none; }

  .foot { display: none; }
}

@media (max-width: 380px) {
  .hud-item { padding: 4px 7px; }
  .hud-label { font-size: 8px; }
  .hud-value { font-size: 13px; }
  .np { padding: 12px 0; font-size: 18px; }
}

/* ---------- Site nav (added by Astro rewrite) ---------- */
.site-nav {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.site-nav .brand-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.site-nav .nav-links { display: flex; gap: 14px; margin-left: 8px; }
.site-nav .nav-links a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-nav .nav-links a.active { color: #fff; font-weight: 600; }
.site-nav .nav-account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-nav .nav-user { color: rgba(255,255,255,0.85); }
.site-nav .logout-form { display: inline; }

/* Smaller buttons used in nav and tables */
.btn.small { padding: 4px 10px; font-size: 13px; }

/* ---------- Generic content pages ---------- */
.page { max-width: 960px; margin: 24px auto; padding: 0 18px; }
.page h1 { margin-top: 0; }
.lb-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.lb-table th, .lb-table td {
  padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left;
}
.lb-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.lb-table tr:hover td { background: rgba(255,255,255,0.03); }

.save-list { list-style: none; padding: 0; margin: 12px 0 0; }
.save-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.save-list .save-name { font-weight: 600; }
.save-list .save-actions { margin-left: auto; display: flex; gap: 6px; }
form.inline { display: inline; }

/* ---------- Auth forms ---------- */
.auth-wrap { max-width: 420px; margin: 48px auto; padding: 0 16px; }
.auth-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.auth-card h1 { margin: 0 0 4px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.auth-card input {
  padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25); color: inherit; font-size: 15px;
}
.form-error {
  background: rgba(239, 68, 68, 0.15); color: #fecaca;
  padding: 8px 12px; border-radius: 8px; margin: 0;
}

/* In-drawer compact save list */
.save-list.compact { margin-top: 10px; max-height: 220px; overflow-y: auto; padding: 0; list-style: none; }
.save-list.compact li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  align-items: center;
}
.save-list.compact .save-name { font-weight: 600; font-size: 14px; grid-column: 1; grid-row: 1; }
.save-list.compact .muted { grid-column: 1; grid-row: 2; }
.save-list.compact .save-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; }

/* Inline save form in drawer */
.save-form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.save-form .input {
  flex: 1; min-width: 0;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25); color: inherit;
  font-size: 14px;
}

/* ---------- Theme presets ---------- */

[data-theme="juicy-orange"] {
  --bg-0: #2a0f05;
  --bg-1: #3d1707;
  --bg-2: #5a230b;
  --surface: rgba(255, 220, 180, 0.10);
  --surface-strong: rgba(255, 220, 180, 0.20);
  --border: rgba(255, 200, 150, 0.22);
  --border-strong: rgba(255, 200, 150, 0.48);
  --text: #ffffff;
  --muted: #ffd9b8;
  --accent: #ff7a18;
  --accent-2: #ffb347;
  --accent-3: #ffd166;
  --cell-bg: rgba(255, 220, 180, 0.04);
  --cell-bg-alt: rgba(255, 122, 24, 0.08);
  --cell-given: #ffd9b3;
  --cell-user: #ffffff;
  --glow-1: rgba(255, 122, 24, 0.45);
  --glow-2: rgba(255, 179, 71, 0.30);
  --glow-3: rgba(255, 209, 102, 0.22);
}

[data-theme="lavender-dream"] {
  --bg-0: #f3eeff;
  --bg-1: #ffffff;
  --bg-2: #ece4ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(90, 60, 160, 0.12);
  --border-strong: rgba(90, 60, 160, 0.26);
  --text: #2a1f55;
  --muted: #6a5e94;
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --accent-3: #f0abfc;
  --cell-bg: rgba(255, 255, 255, 0.78);
  --cell-bg-alt: rgba(139, 92, 246, 0.07);
  --cell-given: #3b2a78;
  --cell-user: #6d28d9;
  --glow-1: rgba(167, 139, 250, 0.45);
  --glow-2: rgba(192, 132, 252, 0.30);
  --glow-3: rgba(244, 114, 182, 0.22);
  --shadow-lg: 0 30px 80px rgba(90, 60, 160, 0.18);
}

[data-theme="dark-purple"] {
  --bg-0: #0a0518;
  --bg-1: #160a30;
  --bg-2: #21104a;
  --surface: rgba(180, 140, 255, 0.06);
  --surface-strong: rgba(180, 140, 255, 0.12);
  --border: rgba(180, 140, 255, 0.14);
  --border-strong: rgba(180, 140, 255, 0.30);
  --text: #ece6ff;
  --muted: #a89cd9;
  --accent: #a855f7;
  --accent-2: #d946ef;
  --accent-3: #818cf8;
  --cell-bg: rgba(180, 140, 255, 0.04);
  --cell-bg-alt: rgba(168, 85, 247, 0.10);
  --cell-given: #d8c8ff;
  --cell-user: #ffffff;
  --glow-1: rgba(168, 85, 247, 0.45);
  --glow-2: rgba(217, 70, 239, 0.30);
  --glow-3: rgba(129, 140, 248, 0.25);
}
