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

html { scrollbar-gutter: stable; }

/* ── Base ── */
body {
  margin: 0;
  background-color: #09090f;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 200, 255, 0.018) 3px,
    rgba(0, 200, 255, 0.018) 4px
  );
  color: #d0d0d0;
  font-family: "Noto Sans", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Links ── */
a {
  color: #0af;
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: #0ff; }

/* ── Layout ── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2.5rem;
}

/* ── Site Header ── */
.site-header {
  background-color: #09090f;
  border-bottom: 2px solid #0cf;
  box-shadow: 0 2px 24px rgba(0, 204, 255, 0.2);
  padding: 0.5rem 0 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-header-logo-link {
  display: block;
  line-height: 0;
}

.site-header-logo {
  height: 88px;
  width: auto;
  display: block;
}

.site-header-tagline {
  margin: 0;
  font-size: 0.75rem;
  color: #5a6a7a;
  letter-spacing: 0.3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  font-size: 0.85rem;
  color: #7a8a9a;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.site-nav a:hover {
  background-color: #0a2030;
  color: #0cf;
}

/* ── Site Footer ── */
.site-footer {
  background-color: #09090f;
  border-top: 1px solid #1a2a3a;
  padding: 1.5rem 0;
  text-align: center;
  color: #5a6a7a;
  font-size: 0.85rem;
  margin-top: 3rem;
}

/* ── Page headings ── */
main h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0cf;
  border-bottom: 1px solid #1a3a4a;
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

/* ── Post ── */
.post { margin: 2rem 0; }

.post-content-area {
  background-color: #141414;
  border-radius: 6px;
  overflow: hidden;
}

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0f0f0;
  margin: 0;
  padding: 1.25rem 2rem 0.75rem;
  border-bottom: 1px solid #222;
}

/* ── Post container ── */
.post-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Nav buttons ── */
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
}

.nav-button {
  display: block;
  padding: 0.4rem 0.9rem;
  background-color: transparent;
  color: #7a8a9a;
  border: 1px solid #253545;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.nav-button:hover {
  border-color: #0cf;
  color: #0cf;
  background-color: transparent;
  box-shadow: none;
}

.nav-button.toc {
  flex: 0 0 auto;
  padding: 0.4rem 1rem;
  color: #7a8a9a;
  border-color: #1e2e3e;
}

.nav-button.toc:hover {
  border-color: #0cf;
  color: #0cf;
  background-color: transparent;
  box-shadow: none;
}

.nav-button.prev,
.nav-button.next {
  flex: 1 1 0;
}

/* ── iframe ── */
.post-html {
  width: 100%;
  border: none;
  display: block;
  background-color: #141414;
}

/* ── TOC header ── */
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.toc-header h1 {
  border: none;
  margin: 0;
  padding: 0;
  font-size: 1.6rem;
}

.toc-header-text {
  flex: 1;
}

.toc-subheading {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #5a6a7a;
}

.toc-back {
  font-size: 0.85rem;
  color: #7a8a9a;
  white-space: nowrap;
  transition: color 0.15s;
}

.toc-back:hover { color: #0cf; }

.toc-start {
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ── TOC list ── */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #1a3a4a;
  border-radius: 6px;
  overflow: hidden;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: #0d1520;
  color: #c0c0c0;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid #1a3a4a;
  transition: background-color 0.15s, color 0.15s;
}

.toc-list li:last-child .toc-link { border-bottom: none; }

.toc-link:hover {
  background-color: #0a2a3a;
  color: #0cf;
}

/* ── Games list (splash page) ── */
.games-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 0;
  margin: 1.5rem auto;
  width: fit-content;
}

.overview-list {
  margin-bottom: 2.5rem;
}

/* ── Game cards ── */
.game-link {
  display: flex;
  flex-direction: column;
  padding: 0;
  background-color: #0d1520;
  color: #0af;
  border: 1px solid #0a4a6a;
  border-radius: 8px;
  flex: 0 0 auto;
  width: 320px;
  text-align: center;
  overflow: hidden;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.game-link:hover {
  border-color: #0cf;
  box-shadow: 0 0 16px rgba(0, 204, 255, 0.3);
  transform: translateY(-3px);
  color: inherit;
  background-color: #0d1520;
}

.game-link:hover .game-link-title { color: #0ff; }
.game-link:hover .game-link-count { color: #8a9aaa; }

.game-link-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  border-color: #1a2a3a;
  
}

.game-link-disabled .game-link-title { color: #5a6a7a; }

.game-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Game card images — background-size: cover is inherited from .game-preview */
.preview-overview {
  background-image: url('/images/whatis-z4-thumb.png');
}
.preview-game-1 {
  background-image: url('/images/z4c-thumb.png');
}
.preview-game-2 {
  background-image: url('/images/z4c2-thumb.png');
}
.preview-game-3 {
  background-image: url('/images/z4crr-thumb.png');
}
.preview-game-wip {
  background-image: url('/images/z4crr-z-thumb.png');
}

.game-link-title {
  display: block;
  padding: 0.6rem 1rem 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0af;
  transition: color 0.15s;
}

.game-link-count {
  display: block;
  padding: 0 1rem 0.6rem;
  font-size: 0.8rem;
  color: #6a7a8a;
  transition: color 0.15s;
}

/* ── Splash banner ── */
.site-banner {
  text-align: center;
  border-bottom: 1px solid #1a3a4a;
  background-color: #09090f;
}

.site-banner img {
  display: block;
  max-width: 80%;
  height: auto;
  margin: 0 auto;
}

/* ── Splash page ── */
.splash-intro {
  margin: 2rem auto 2.5rem;
  text-align: center;
  color: #8a9aaa;
  font-size: 0.95rem;
  line-height: 1.8;
}

.splash-intro h1 {
  border: none;
  margin-bottom: 0.75rem;
}

.games-section-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: #5a6a7a;
  margin: 0 0 0.25rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .container {
    padding: 1rem 1.25rem;
  }

  /* Header stays as a row on small screens */
  .site-header-inner {
    flex-direction: row;
    align-items: center;
  }

  .site-header-logo {
    height: 60px;
  }

  .site-nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
  }

  /* Nav buttons: shrink padding to stay on one row */
  .nav-button {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  /* Game cards go full width */
  .game-link {
    width: 100%;
    max-width: 100%;
  }

  .games-list {
    flex-direction: column;
    align-items: stretch;
  }

  /* TOC: bigger touch targets */
  .toc-link {
    padding: 1rem;
    font-size: 0.95rem;
  }

  /* TOC header stacks */
  .toc-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toc-start {
    width: 100%;
    text-align: center;
  }
}
