/* Content pages of respawnroulette.com (encyclopedia, eras, about, contact, 404).
   Same palette and fonts as the game (css/game.css). */
:root {
  color-scheme: dark;
  --ink: #fff6e8;
  --muted: #f0c9a0;
  --soft: #cdb7d9;
  --gold: #ffd56a;
  --pop: #ff5fa2;
  --line: #ff8a4c;
  --mint: #3ee0c5;
  --panel: rgb(36 16 56 / 72%);
  --panel-line: rgb(255 213 106 / 22%);
  --font: "Nunito", "Trebuchet MS", sans-serif;
  --display: "Mystery Quest", "Nunito", cursive;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 18px/1.65 var(--font);
  background:
    radial-gradient(circle at 50% -10%, rgb(255 95 162 / 32%), transparent 40%),
    radial-gradient(circle at 100% 70%, rgb(62 224 197 / 16%), transparent 34%),
    radial-gradient(circle at 0% 95%, rgb(139 108 255 / 24%), transparent 36%),
    #160a28;
  background-attachment: fixed;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* ---------- header / footer ---------- */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 8px;
}

.brand {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  color: var(--pop);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-weight: 600;
  font-size: 16px;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .lang-switch { font-size: 14px; opacity: 0.85; }

.site-nav .spin-link, .button {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: #2a1244;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-nav .spin-link { padding: 6px 16px; }
.button { padding: 12px 26px; font-size: 18px; }
.site-nav .spin-link:hover, .button:hover { background: #3a1860; color: var(--ink); }
.button.ghost { border-color: var(--panel-line); background: transparent; }

.site-foot {
  width: min(1080px, calc(100% - 32px));
  margin: 72px auto 0;
  padding: 24px 0 40px;
  border-top: 1px solid var(--panel-line);
  color: var(--soft);
  font-size: 14px;
  text-align: center;
}

.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot p { margin: 14px 0 0; }

/* ---------- page shell ---------- */
.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.page > h1, .page article > h1 {
  margin: 18px 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  color: var(--gold);
}

.page h2 {
  margin: 40px 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  color: var(--pop);
}

.lede {
  max-width: 720px;
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.prose { max-width: 720px; }
.prose p { margin: 0 0 16px; }
.prose h2:first-child { margin-top: 28px; }

.crumbs {
  margin-top: 18px;
  color: var(--soft);
  font-size: 14px;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs > span { margin: 0 4px; opacity: 0.6; }

/* ---------- life page ---------- */
.life article { max-width: 760px; }

.life-stage {
  position: relative;
  margin: 0 0 24px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #100c18;
  box-shadow: 0 18px 50px rgb(0 0 0 / 35%);
}

.stage-scene { display: block; width: 100%; height: 100%; object-fit: cover; }

.stage-being {
  position: absolute;
  left: 50%;
  bottom: 8%;
  height: 58%;
  width: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 35%));
}

.life-solo {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(circle, #2a1244, #100c18);
  text-align: center;
}

.life-solo img { width: min(420px, 80%); height: auto; }

.life-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: var(--panel);
  font-size: 16px;
}

.life-meta dt { color: var(--soft); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.life-meta dd { margin: 2px 0 0; }

.facts {
  margin: 32px 0 0;
  padding: 4px 22px 14px;
  border-left: 4px solid var(--mint);
  border-radius: 0 16px 16px 0;
  background: var(--panel);
}

.facts h2 { margin-top: 14px; font-size: 26px; color: var(--mint); }
.facts ul { margin: 0; padding-left: 20px; }
.facts li { margin: 0 0 8px; }

.spin-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 40px 0 0;
}

.spin-cta p { margin: 0; color: var(--muted); max-width: 520px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  font-weight: 600;
}

.pager a { text-decoration: none; }
.pager [rel="next"] { margin-left: auto; text-align: right; }

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.life-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 14px;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.life-card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.life-card img { width: 110px; height: 110px; object-fit: contain; }
.card-name { font-weight: 800; line-height: 1.25; }

.era-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.era-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.era-card:hover { border-color: var(--gold); color: var(--ink); }
.era-card img { flex: none; width: 84px; height: 84px; object-fit: contain; }
.era-card > span { display: flex; flex-direction: column; gap: 2px; }
.era-card strong { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--gold); line-height: 1.1; }
.era-card span span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.era-card .count { color: var(--soft); font-size: 13px; }

.az-list { columns: 3 240px; column-gap: 32px; }
.az { break-inside: avoid; margin-bottom: 18px; }
.az h3 { margin: 0 0 4px; font-size: 17px; }
.az h3 a { color: var(--pop); text-decoration: none; }
.az ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.6; }
.az li a { color: var(--muted); text-decoration: none; }
.az li a:hover { color: var(--ink); text-decoration: underline; }

.also { max-width: 820px; color: var(--muted); font-size: 16px; }

.notfound { text-align: center; padding-top: 6vh; }
.notfound .lede { margin-inline: auto; }
.notfound .spin-cta { justify-content: center; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-head { padding-top: 14px; }
  .brand { font-size: 26px; }
  .site-nav { gap: 6px 14px; font-size: 15px; }
  .lede { font-size: 19px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .life-card img { width: 96px; height: 96px; }
  .era-grid { grid-template-columns: 1fr; }
  .stage-being { height: 62%; }
}
