/* ============================================================
   Xenos — desert sci-fi / alien western style
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Pro:ital,wght@0,400;0,600;1,400;1,600&family=Share+Tech+Mono&display=swap');

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

:root {
  --sand:          #d5a95f;
  --sand-light:    #f1d48b;
  --sand-pale:     #fff5d6;
  --sand-dark:     #9a6a36;
  --teal:          #2f8f8a;
  --teal-dark:     #1e615f;
  --teal-glow:     rgba(47,143,138,0.18);
  --rust:          #bf6b3c;
  --rust-dark:     #773b25;
  --bg-deep:       #25223b;
  --bg-dark:       #2b314c;
  --bg-mid:        #4d3d72;
  --bg-card:       #fff5d6;
  --page-bg:       #efe1bd;
  --panel-soft:    #f8ebc9;
  --border:        #b48754;
  --border-light:  rgba(180,135,84,0.56);
  --ink:           #2a2118;
  --ink-light:     #5d4631;
  --shadow:        rgba(0,0,0,0.65);
  --font-head:     'Cinzel', Georgia, serif;
  --font-body:     'Crimson Pro', Georgia, serif;
  --font-mono:     'Share Tech Mono', 'Courier New', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse at 18% 0%, rgba(47,143,138,0.11), transparent 28rem),
    radial-gradient(ellipse at 82% 12%, rgba(191,107,60,0.14), transparent 30rem),
    linear-gradient(180deg, #f8ebc9 0%, var(--page-bg) 48%, #e4c58e 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.75;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

a {
  color: var(--teal-dark);
  text-decoration-color: rgba(47,143,138,0.34);
  text-underline-offset: 0.18em;
  transition: color 0.18s;
}
a:hover { color: var(--rust); }

/* ── Navigation ── */
.site-nav {
  background: rgba(37,34,59,0.96);
  border-bottom: 1px solid rgba(241,212,139,0.36);
  box-shadow: 0 6px 24px rgba(42,33,24,0.24), 0 1px 0 rgba(47,143,138,0.16);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.25rem;
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 1.25rem;
}

.nav-brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sand-light);
  text-decoration: none;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.nav-brand:hover { color: var(--teal); }

.nav-toggle {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(62,201,167,0.3);
  border-radius: 6px;
  background: rgba(37,34,59,0.72);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.2s, border-color 0.2s;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  background: rgba(37,34,59,0.96);
  border-color: rgba(62,201,167,0.6);
  outline: none;
}
.nav-toggle span {
  width: 1.35rem;
  height: 2px;
  background: var(--teal);
  border-radius: 999px;
  transition: transform 0.22s, opacity 0.22s;
}
.site-nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  color: var(--sand-pale);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.78rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(62,201,167,0.12);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(62,201,167,0.3);
}

/* ── Hero ── */
.hero {
  min-height: clamp(420px, 70vh, 740px);
  background:
    radial-gradient(circle at 50% 30%, rgba(47,143,138,0.16), transparent 22rem),
    radial-gradient(circle at 80% 80%, rgba(191,107,60,0.2), transparent 28rem),
    linear-gradient(180deg, #2b314c 0%, #4d3d72 58%, #9b6a45 100%);
  border-bottom: 1px solid rgba(180,135,84,0.6);
  text-align: center;
  padding: clamp(2.2rem, 5.5vw, 4.2rem) 1.5rem 2.4rem;
  display: grid;
  justify-items: center;
  align-content: end;
  position: relative;
  overflow: hidden;
}

/* Starfield overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 12%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 74% 8%,  rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 42% 22%, rgba(255,255,255,0.4),  transparent),
    radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 6%  44%, rgba(255,255,255,0.3),  transparent),
    radial-gradient(1px 1px at 62% 16%, rgba(255,255,255,0.5),  transparent),
    radial-gradient(1px 1px at 90% 55%, rgba(255,255,255,0.3),  transparent),
    radial-gradient(1px 1px at 30% 48%, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(62,201,167,0.025) 0, rgba(62,201,167,0.025) 1px, transparent 1px, transparent 6px
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero:not(:has(.hero-cover)) {
  min-height: 160px;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
  align-content: center;
}
.hero:not(:has(.hero-cover)) .hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
}
.hero:not(:has(.hero-cover)) + .page-content {
  padding-top: 2rem;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  color: #fff7dd;
  text-shadow:
    0 0 40px rgba(47,143,138,0.5),
    0 4px 24px rgba(0,0,0,0.9),
    0 0 80px rgba(47,143,138,0.24);
  letter-spacing: 0.14em;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 2.2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--sand-light);
  margin-top: 0.35rem;
  margin-bottom: 1.4rem;
  max-width: 36rem;
  position: relative;
  z-index: 1;
}

.hero-cover {
  display: inline-block;
  border: 1px solid rgba(212,168,67,0.55);
  border-radius: 4px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.8),
    0 0 0 6px rgba(37,34,59,0.36),
    0 0 30px rgba(62,201,167,0.12);
  line-height: 0;
  transition: transform 0.26s, filter 0.26s, box-shadow 0.26s;
  position: relative;
  z-index: 1;
}
.hero-cover:hover {
  transform: translateY(-3px) scale(1.01);
  filter: saturate(1.1) contrast(1.03);
  box-shadow:
    0 28px 70px rgba(0,0,0,0.85),
    0 0 0 6px rgba(37,34,59,0.36),
    0 0 50px rgba(62,201,167,0.22);
}
.hero-cover img {
  width: min(440px, 76vw);
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ── Page content ── */
.page-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4.5rem;
}

/* ── Cards ── */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0)),
    radial-gradient(circle at 4% 0%, rgba(47,143,138,0.09), transparent 14rem),
    var(--bg-card);
  border: 1px solid rgba(180,135,84,0.76);
  border-top: 3px solid var(--teal-dark);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
  box-shadow: 0 14px 34px rgba(84,55,28,0.2);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgba(180,135,84,0.24);
  border-radius: 4px;
  pointer-events: none;
}

.card h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  color: var(--bg-deep);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(180,135,84,0.48);
  letter-spacing: 0.06em;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--teal-dark);
  letter-spacing: 0.05em;
  margin: 1.2rem 0 0.45rem;
}

.card p { margin-bottom: 0.85rem; color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol {
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
}
.card li { margin-bottom: 0.35rem; color: var(--ink); }

.manual-about-layout {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.manual-cover-link {
  display: block;
  flex: 0 0 auto;
}

.manual-cover-link img {
  width: min(120px, 36vw);
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: rgba(47,143,138,0.08);
  border: 1px solid rgba(180,135,84,0.5);
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(84,55,28,0.18);
}

.manual-about-text {
  flex: 1 1 260px;
  align-self: center;
}

body:has(.hero-title) .spoiler-warning,
.spoiler-warning {
  display: block;
  box-sizing: border-box;
  width: 100%;
  background: #9b1c1c;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 10px 24px rgba(84,55,28,0.2);
}

.spoiler-warning strong {
  color: inherit;
}

.manual-solution-cta {
  text-align: center;
  margin-top: 1rem;
}

.manual-solution-button {
  display: inline-block;
  background: linear-gradient(180deg, var(--teal-dark), var(--bg-deep));
  color: #fff7dd;
  border: 1px solid rgba(180,135,84,0.44);
  border-radius: 6px;
  padding: 0.55rem 1.05rem;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(84,55,28,0.18);
  transition: transform 0.18s, box-shadow 0.18s;
}

.manual-solution-button:hover {
  color: #fff7dd;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(84,55,28,0.25);
  text-decoration: none;
}

code {
  background: rgba(47,143,138,0.09);
  border: 1px solid rgba(47,143,138,0.28);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.05rem 0.3rem;
  color: var(--teal-dark);
}

/* ── Info table ── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(180,135,84,0.44);
}
.info-table td {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(180,135,84,0.44);
  vertical-align: top;
  color: var(--ink);
}
.info-table td:first-child {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--rust-dark);
  white-space: nowrap;
  width: 40%;
}

/* ── Covers grid ── */
.covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.cover-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  cursor: zoom-in;
}
.cover-thumb img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border: 1px solid rgba(180,135,84,0.6);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(84,55,28,0.26), 0 0 18px rgba(47,143,138,0.08);
  transition: transform 0.22s, filter 0.22s, box-shadow 0.22s;
  display: block;
}
.cover-thumb:hover img {
  transform: translateY(-3px) scale(1.01);
  filter: saturate(1.08);
  box-shadow: 0 14px 32px rgba(84,55,28,0.3), 0 0 28px rgba(47,143,138,0.14);
}
.cover-thumb figcaption {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--rust-dark);
  text-align: center;
}

/* ── Memories ── */
.memory {
  border-left: 3px solid var(--teal-dark);
  padding: 0.75rem 1rem 0.75rem 1.2rem;
  margin-bottom: 1.4rem;
  background: rgba(47,143,138,0.07);
  border-radius: 0 4px 4px 0;
}
.memory-author {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  margin-bottom: 0.45rem;
}
.memory p { color: var(--ink); margin-bottom: 0.65rem; }
.memory p:last-child { margin-bottom: 0; }

/* ── Screenshot ── */
.screenshot-wrap {
  text-align: center;
  margin: 1.25rem 0;
}
.screenshot-wrap img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(180,135,84,0.65);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(84,55,28,0.28);
  display: inline-block;
}
.screenshot-wrap figcaption {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* ── Game text (monospaced blocks) ── */
.game-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: #080a08;
  color: #a3e6c8;
  padding: 1rem 1.2rem;
  border-radius: 5px;
  border: 1px solid rgba(47,143,138,0.28);
  border-left: 3px solid var(--teal-dark);
  margin: 0.75rem 0;
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-x: auto;
}

/* ── Resource list ── */
.resource-list {
  list-style: none;
  padding: 0;
}
.resource-list li {
  padding: 0.42rem 0;
  border-bottom: 1px dotted rgba(180,135,84,0.56);
  color: var(--ink);
}
.resource-list li:last-child { border-bottom: none; }

/* ── Ornament divider ── */
.ornament {
  text-align: center;
  color: var(--teal-dark);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  margin: 1.25rem 0;
  user-select: none;
}

/* ── Walkthrough steps ── */
.wt-step {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #d8fff2;
  margin: 0.1rem 0;
}
.wt-comment {
  font-style: italic;
  color: var(--rust-dark);
  margin: 0.8rem 0 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--sand-dark);
}

/* ── Other games footer ── */
.site-footer {
  background: rgba(37,34,59,0.97);
  border-top: 1px solid rgba(241,212,139,0.34);
  padding: 2.25rem 1.5rem 1.75rem;
  color: var(--sand-pale);
  font-size: 0.88rem;
}
.site-footer a { color: var(--sand-light); }
.site-footer a:hover { color: var(--sand-pale); }

.footer-heading {
  font-family: var(--font-head);
  font-size: 0.88rem;
  color: var(--sand);
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.35rem;
}

.games-footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.game-footer-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  width: min(200px, 40vw);
  transition: transform 0.2s;
}
.game-footer-link:hover { transform: translateY(-3px); }
.game-footer-link img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(241,212,139,0.34);
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.55);
  display: block;
}
.game-footer-link span {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--sand-pale);
  text-align: center;
}
.game-footer-link:hover span { color: var(--teal); }

.footer-byline {
  text-align: center;
  border-top: 1px solid rgba(241,212,139,0.24);
  padding-top: 1rem;
  margin-top: 0.5rem;
  color: rgba(240,230,200,0.55);
}

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  height: auto;
  border: 1px solid rgba(212,168,67,0.5);
  border-radius: 4px;
  box-shadow: 0 0 70px rgba(62,201,167,0.18), 0 0 120px rgba(0,0,0,0.9);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  color: var(--sand-pale);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-head);
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; color: var(--teal); }
.zoomable { cursor: zoom-in; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-nav { padding: 0 0.85rem; }
  .nav-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.72rem 0;
  }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.2rem;
    padding: 0.5rem 0 0.6rem;
  }
  .site-nav.menu-open .nav-links { display: flex; }
  .nav-links a {
    display: block;
    font-size: 0.88rem;
    padding: 0.58rem 0.72rem;
    border-radius: 4px;
  }
  .hero {
    min-height: 500px;
    padding: 1.85rem 1rem 1.75rem;
  }
  .hero:not(:has(.hero-cover)) {
    min-height: 145px;
    padding: 1.35rem 1rem;
  }
  .page-content { padding: 2rem 0.85rem 3rem; }
  .info-table td,
  .info-table tr,
  .info-table tbody { display: block; width: 100%; }
  .info-table tr { border-bottom: 1px solid rgba(180,135,84,0.5); padding: 0.45rem 0; }
  .info-table td { border-bottom: 0; padding: 0.08rem 0; }
  .info-table td:first-child { width: 100%; white-space: normal; }
  .game-footer-link { width: min(200px, 82vw); }
  .covers-grid { grid-template-columns: repeat(2, 1fr); }
}
