/* ══════════════════════════════════════
   Common styles — shared across all pages
   ══════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg: #0f1118;
  --bg-card: #181b25;
  --bg-card-hover: #1e2230;
  --border: #2a2e3d;
  --border-accent: #3d4260;
  --text: #d8dce8;
  --text-muted: #8890a6;
  --text-dim: #5c6380;
  --accent-ice: #6eb8d7;
  --accent-fire: #d47b5e;
  --accent-green: #7abf8e;
  --accent-gold: #c4a96a;
  --accent-purple: #9b8ec4;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Source Sans 3', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 10px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Hero header ── */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(110,184,215,0.08), transparent),
    radial-gradient(ellipse 50% 50% at 70% 60%, rgba(212,123,94,0.06), transparent);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.02em;
  color: #fff;
  position: relative;
}
.hero h1 span {
  display: block;
  font-size: 0.42em;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.hero .rune-line {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.6em;
}

/* ── Back to home button ── */
.back-link {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.back-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(110,184,215,0.06);
}
.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── User nav (injected by auth.js) ── */
#user-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
}
.user-nav-name {
  color: var(--text-muted);
}
.admin-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(196,169,106,0.15);
  color: var(--accent-gold);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  vertical-align: middle;
}
.user-nav-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.user-nav-logout:hover {
  color: var(--text);
  border-color: var(--border-accent);
  background: rgba(212,123,94,0.08);
}

/* ── Responsive base ── */
@media (max-width: 600px) {
  .hero { padding: 3rem 1rem 2rem; }
  .back-link { top: 0.8rem; left: 0.6rem; font-size: 0.75rem; padding: 0.3rem 0.6rem; }
}
