/* assets/styles.css */
:root{
  --bg: #0f1115;
  --header-grad: #141a2a;
  --card: color-mix(in oklab, var(--bg) 78%, white 22%);
  --border: color-mix(in oklab, var(--bg) 70%, white 30%);
  --text: #e9ecf1;
  --muted: #b7c0d1;
  --link: #8ab4ff;
  --max: 980px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Apple Colour Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px;
}

.site-header{
  background: linear-gradient(
    180deg,
    var(--header-grad) 0%,
    rgba(0,0,0,0) 100%
  );
}
.site-header h1{ margin: 0 0 6px 0; font-size: 1.8rem; }
.subtitle{ margin: 0; color: var(--muted); }

.site-footer{
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 40px 0 60px;

  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--header-grad, #141a2a) 100%
  );
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}

.breadcrumb{
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.game-title{
  margin: 0 0 14px 0;
  font-size: 1.6rem;
}

.media{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 10px;
  align-items: start;
}

.cover{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0d12;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.thumb-grid{
  display: grid;
  grid-template-columns: 1fr 1fr; /* two per row */
  gap: 14px;
  align-content: start; /* keep the grid packed at the top */
}

.thumb{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0d12;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.details{
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.dl{
  margin: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 14px;
}

.dl dt{
  color: var(--muted);
}
.dl dd{
  margin: 0;
}

.index-list{
  columns: 2;
  column-gap: 26px;
  padding-left: 18px;
  margin: 0;
}
.index-list li{ break-inside: avoid; padding: 4px 0; }

@media (max-width: 780px){
  .media{ grid-template-columns: 1fr; }
  .index-list{ columns: 1; }
  .dl{ grid-template-columns: 1fr; }
}


/* ─────────────────────────────
   Lightbox (image pop-out)
   ───────────────────────────── */

.thumb-btn{
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

#lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: grid;
  place-items: center;
  z-index: 1000;
}

#lightbox[hidden]{
  display: none;
}

#lightbox-img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #000;
}

/* Lightbox Previous/Next buttons */
#lightbox-prev,
#lightbox-next{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;

  font-size: 1.1rem;
  line-height: 1;
  padding: 10px 14px;

  color: var(--text);
  background: rgba(21,25,37,0.6);
  border: 1px solid var(--border);
  border-radius: 999px;

  cursor: pointer;
}

#lightbox-prev{ left: 12px; }
#lightbox-next{ right: 12px; }

#lightbox-prev:hover,
#lightbox-next:hover{
  background: rgba(21,25,37,0.9);
}

@media (max-width: 480px){
  #lightbox-prev,
  #lightbox-next{
    font-size: 0.95rem;
    padding: 8px 10px;
  }
}


/* ─────────────────────────────
   Game page side navigation
   ───────────────────────────── */

.game-nav{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
}

.game-nav a{
  position: absolute;
  bottom: 50%;
  transform: translateY(-50%);
  pointer-events: auto;

  font-size: 1.4rem;
  line-height: 1;
  padding: 10px 14px;

  color: var(--text);
  background: rgba(21,25,37,0.6);
  border: 1px solid var(--border);
  border-radius: 999px;

  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

#prev-game{
  left: 12px;
}

#next-game{
  right: 12px;
}

.game-nav a:hover{
  background: rgba(21,25,37,0.9);
  transform: translateY(-50%) scale(1.08);
}

@media (max-width: 480px){
  .game-nav a{
    bottom: 3%;
    font-size: 1rem;
    padding: 8px 10px;
  }
  .dl dt{
    font-weight: 900;
  }
}
