/* dzined games — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0f1020;
  --bg-2: #171833;
  --panel: #1e2042;
  --panel-2: #272a55;
  --line: #34386b;
  --text: #eef0ff;
  --muted: #9aa0d0;
  --accent: #ffcc33;      /* primary yellow */
  --accent-ink: #1a1400;
  --accent-2: #4fd1c5;    /* teal */
  --accent-3: #ff6b8b;    /* pink */
  --good: #5ee07a;
  --bad: #ff5d5d;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #262a66 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; max-width: 1100px; margin: 0 auto;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.2);
}
.brand span.dim { color: var(--muted); font-weight: 500; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 999px;
}
.topbar nav a:hover, .topbar nav a.active { color: var(--text); background: var(--panel); }
@media (max-width: 640px) { .topbar nav { display: none; } }

/* ---- layout ---- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 8px 16px 48px; }
.game-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.game-head h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); }
.game-head p { margin: 4px 0 0; color: var(--muted); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}

/* ---- buttons ---- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: 600 14px/1 var(--font-body); padding: 10px 16px; border-radius: 999px; cursor: pointer;
  transition: transform .08s ease, background .15s ease; user-select: none;
}
.btn:hover { background: #31356a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #ffd65c; }
.btn.ghost { background: transparent; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .value { font-family: var(--font-display); font-size: 22px; font-weight: 700; }

select, input[type=text] {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; font: 500 14px var(--font-body);
}

/* ---- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 6, 20, .7); display: none; place-items: center; z-index: 50; padding: 16px;
}
.modal-backdrop.show { display: grid; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 8px; font-size: 28px; }
.modal p { color: var(--muted); }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
