/* Shared styles for the whole site (hub + every game page). */

:root {
  --bg: #07110c;
  --bg-2: #0c1a13;
  --surface: #12241a;
  --surface-2: #183022;
  --line: #24412f;
  --text: #eef6f0;
  --muted: #98b3a3;
  --accent: #3ddc84;
  --accent-2: #2bb86b;
  --accent-ink: #052012;
  --gold: #ffcf4a;
  --danger: #ff6464;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(61, 220, 132, 0.12), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 17, 12, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand .pill {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}

.topbar .spacer {
  flex: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: 700 0.95rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.seg button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(61, 220, 132, 0.3);
}

.btn-primary:hover {
  background: #5ae99a;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

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

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

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

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn svg[hidden] {
  display: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
