/* =====================================================================
   EnthusiastenWerk — game detail pages (cube-racer-2, screw-drivers, …)
   Layered on top of style.css; reuses the same design tokens.
   Prefix: .gp-  (game page)
   ===================================================================== */

/* Back link ---------------------------------------------------------- */
.gp-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin: calc(var(--nav-h) + 30px) 0 4px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.gp-back:hover { color: var(--gold); }
.gp-back svg { width: 16px; height: 16px; }

/* Top prev / next bar ------------------------------------------------ */
/* Grid with equal side columns → prev flush-left, next flush-right,
   "All games" perfectly centered regardless of the side label widths. */
.gp-topnav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  /* Only set top/bottom so the container's own `margin: 0 auto` keeps the bar
     centered on the content column (aligned with the hero/gallery below). */
  margin-top: calc(var(--nav-h) + 24px);
  margin-bottom: 4px;
}
.gp-topnav .gp-back { margin: 0; justify-self: center; }
.gp-topnav-link {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.gp-topnav-link:hover { color: var(--gold); }
.gp-topnav-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.gp-topnav-prev { justify-self: start; }
.gp-topnav-next { justify-self: end; justify-content: flex-end; text-align: right; }
.gp-topnav-name { display: none; }
@media (min-width: 600px) {
  .gp-topnav-name { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Cinematic hero ----------------------------------------------------- */
.gp-hero { position: relative; padding: 20px 0 0; overflow: hidden; }
.gp-hero-glow {
  position: absolute; top: -18%; right: -8%;
  width: 620px; height: 620px; max-width: 92vw;
  background: radial-gradient(circle, rgba(244,192,32,.14) 0%, rgba(244,192,32,0) 62%);
  filter: blur(12px); pointer-events: none;
  animation: ewGlow 10s ease-in-out infinite;
}

.gp-hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-media);
  box-shadow: 0 46px 130px -46px rgba(0, 0, 0, 0.92);
}
.gp-hero-art img { width: 100%; height: 100%; object-fit: cover; }
/* Square / app-icon art: keep it whole and centered over a themed panel */
.gp-hero-art--contain { background: radial-gradient(120% 120% at 50% 0%, #26210f 0%, #14120c 72%); }
.gp-hero-art--contain img { object-fit: contain; padding: 5% 0; }
.gp-hero-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,12,13,.12) 0%, rgba(12,12,13,.35) 52%, rgba(12,12,13,.94) 100%);
}
.gp-badges {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 8px;
}
/* The round play button reuses .trailer-play from style.css */

.gp-hero-inner {
  position: relative; z-index: 4;
  margin-top: -58px;
  display: flex; flex-direction: column; gap: 16px;
}
.gp-hero-inner h1 { font-size: clamp(40px, 8vw, 82px); line-height: 0.92; }
.gp-tagline {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
}
.gp-hero-inner .btn-row { margin-top: 6px; }

/* Overview: story + fact sheet -------------------------------------- */
.gp-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.gp-main { display: flex; flex-direction: column; gap: 20px; }
.gp-main .eyebrow { margin-bottom: 4px; }
.gp-main p { font-size: 16px; line-height: 1.75; color: var(--text-muted); }
.gp-main p.lead { color: var(--text); }

.gp-subhead {
  margin-top: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--text);
}
.gp-features { list-style: none; display: grid; grid-template-columns: 1fr; gap: 14px; }
.gp-features li {
  position: relative; padding-left: 26px;
  font-size: 15px; line-height: 1.55; color: var(--text-muted);
}
.gp-features li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 8px; height: 8px; background: var(--gold);
  transform: rotate(45deg);
}

/* Fact sheet card */
.gp-aside {
  padding: 8px 26px 26px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}
.gp-fact {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.gp-fact:last-of-type { border-bottom: none; }
.gp-fact-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
}
.gp-fact-value { font-size: 15px; color: var(--text); }
.gp-fact-ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; color: var(--gold); }
.gp-aside .btn { width: 100%; justify-content: center; margin-top: 22px; }
/* Restricted-availability note + store listing links in the fact sheet */
.gp-aside-note {
  margin-top: 20px; padding: 14px 16px;
  background: rgba(134,207,224,.06);
  border: 1px solid rgba(134,207,224,.22); border-radius: 10px;
  font-size: 13.5px; line-height: 1.5; color: var(--text-muted);
}
.gp-aside-note strong { color: #9FD8E8; font-weight: 600; }
.gp-stores {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.gp-stores-label { color: var(--text-faint); }
.gp-stores a { color: var(--text-muted); text-decoration: none; border-bottom: 1px solid transparent; }
.gp-stores a:hover { color: var(--text); border-bottom-color: var(--gold-border); }

/* Publisher / funding partner logos --------------------------------- */
.gp-partners-note {
  margin-top: 28px; font-size: 14px; line-height: 1.6; color: var(--text-muted);
}
.gp-partners-note strong { color: var(--text); font-weight: 600; }
.gp-partners {
  margin-top: 16px;
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.gp-partner {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 24px;
  background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: 14px;
}
.gp-partner-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
}
.gp-partner-logo {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; padding: 20px 24px;
  background: #fff; border-radius: 10px;
}
.gp-partner-logo img { max-height: 60px; width: auto; max-width: 100%; display: block; }
@media (min-width: 600px) {
  .gp-partners { grid-template-columns: 1fr 1fr; }
}

/* Gallery ------------------------------------------------------------ */
.gp-media { border-top: 1px solid var(--line); }
.gp-gallery { display: grid; grid-template-columns: 1fr; gap: 18px; }
.gp-shot {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--bg-media);
}
.gp-shot img { width: 100%; height: 100%; object-fit: cover; }
.gp-shot--wide { grid-column: 1 / -1; }
.gp-shot--contain { background: radial-gradient(120% 120% at 50% 0%, #26210f 0%, #14120c 72%); }
.gp-shot--contain img { object-fit: contain; padding: 3%; }
.gp-shot--empty {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #201f1d 0%, #131211 70%);
}
.gp-shot--empty span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
}

/* "Watch the trailer" feature block --------------------------------- */
.gp-trailer { border-top: 1px solid var(--line); }
.gp-trailer-card {
  position: relative; aspect-ratio: 16 / 9; max-height: 60vh;
  margin-top: 8px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--bg-media);
  cursor: pointer;
}
.gp-trailer-card img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.gp-trailer-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 50%, rgba(12,12,13,.2), rgba(12,12,13,.72));
}
.gp-trailer-card .trailer-play { z-index: 2; }
.gp-trailer-label {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted); pointer-events: none;
}

/* Prev / next game pager -------------------------------------------- */
.gp-pager-section { border-top: 1px solid var(--line); }
.gp-pager { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 4px; }
.gp-pager-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--line-strong);
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease, box-shadow .3s ease;
}
.gp-pager-card:hover {
  border-color: var(--gold-border); transform: translateY(-3px); color: var(--text);
  box-shadow: 0 20px 50px -28px rgba(244, 192, 32, 0.34);
}
.gp-pager-next { flex-direction: row-reverse; text-align: right; }
.gp-pager-thumb {
  width: 104px; height: 60px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: var(--bg-media);
}
.gp-pager-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gp-pager-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gp-pager-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
}
.gp-pager-next .gp-pager-label { justify-content: flex-end; }
.gp-pager-label svg { width: 15px; height: 15px; }
.gp-pager-name {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Gallery: clickable images ----------------------------------------- */
.gp-gallery .gp-shot:not(.gp-shot--empty) { cursor: zoom-in; }

/* Full-screen image lightbox (built by main.js) --------------------- */
.img-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.img-lightbox.open { display: flex; }
.img-lb-frame {
  position: relative; margin: 0;
  max-width: min(1200px, 100%); max-height: 86vh;
  display: flex; flex-direction: column; align-items: center;
}
.img-lb-frame img {
  max-width: 100%; max-height: 80vh; width: auto; height: auto;
  border-radius: 8px; display: block;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9);
}
.img-lb-caption {
  margin-top: 12px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text-muted);
}
.img-lb-close {
  position: absolute; top: 16px; right: 20px; z-index: 1001;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.img-lb-close:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.img-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1001;
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.img-lb-nav:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.img-lb-prev { left: 20px; }
.img-lb-next { right: 20px; }
@media (max-width: 599px) {
  .img-lb-nav { width: 40px; height: 40px; font-size: 24px; }
  .img-lb-prev { left: 8px; }
  .img-lb-next { right: 8px; }
}

/* Responsive --------------------------------------------------------- */
@media (min-width: 600px) {
  .gp-hero-inner { margin-top: -70px; }
  .gp-gallery  { grid-template-columns: repeat(2, 1fr); }
  .gp-features { grid-template-columns: repeat(2, 1fr); }
  .gp-pager    { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (min-width: 1024px) {
  .gp-hero-inner { margin-top: -88px; }
  .gp-grid { grid-template-columns: 1.55fr 0.95fr; gap: 64px; }
  .gp-gallery { grid-template-columns: repeat(3, 1fr); }
}
