/* ==========================================================
   PAGES — About Us, Contact, Our Games, strona gry, lightbox
   ========================================================== */

.window__body { container-type: inline-size; }

/* ---------- Dokument tekstowy (About / Contact) ---------- */
.doc {
  flex: 1;
  background: #fff;
  box-shadow: var(--bevel-field);
  padding: 20px 24px;
  overflow: auto;
  line-height: 1.6;
  font-size: 14px;
}
.doc__title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.doc p { margin: 0 0 12px; max-width: 62ch; }
.doc h3 {
  margin: 24px 0 10px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
}
.doc ul { margin: 0 0 12px; padding-left: 22px; max-width: 62ch; }
.doc a { color: #0000ee; }
.doc a:visited { color: #551a8b; }
.doc__lead {
  font-weight: 700;
  padding: 8px 10px;
  background: #ffffe1;
  border: 1px solid #000;
}
.doc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.doc__status { color: #006400; font-size: 13px; }
.doc__address { padding-left: 12px; border-left: 3px solid var(--face); }
.doc__updated { margin-top: 24px !important; font-size: 12px; color: var(--shadow); }

/* ---------- Eksplorator (Our Games) ---------- */
.explorer { flex: 1; display: flex; flex-direction: column; gap: 3px; min-height: 0; }

.explorer__address { display: flex; align-items: center; gap: 6px; padding: 2px; }
.explorer__path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}
.explorer__path img { width: 16px; height: 16px; }

.explorer__view {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
}

.folder {
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  color: #000;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.folder__icon { width: 80px; height: auto; image-rendering: pixelated; }
.folder__label { padding: 1px 3px; font-weight: 700; line-height: 1.3; }
.folder__label small { display: block; font-size: 11px; font-weight: 400; }
.folder:hover .folder__label,
.folder:focus-visible .folder__label {
  background: var(--highlight);
  color: #fff;
  outline: 1px dotted #fff;
}
.folder:hover .folder__icon,
.folder:focus-visible .folder__icon { filter: brightness(0.8) sepia(1) hue-rotate(190deg) saturate(3); }
.folder:focus { outline: none; }

.statusbar {
  display: flex;
  gap: 3px;
  font-size: 12px;
}
.statusbar > * { flex: 1; padding: 2px 6px; box-shadow: var(--bevel-thin-in); }

/* ---------- Strona gry ---------- */
.window__body--dark {
  background: #000;
  color: #eee;
  box-shadow: var(--bevel-field);
}

.game { padding: 20px clamp(14px, 4cqi, 32px) 32px; }

.game__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 18px;
}
.game__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(24px, 6cqi, 48px);
  line-height: 1.1;
  color: #fff;
}
.game__badge {
  font-family: var(--font-mono);
  font-size: 20px;
  padding: 2px 8px;
  border: 2px solid var(--brand-pink);
  color: var(--brand-pink);
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

/* Galeria 5 grafik */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.gallery__item:first-child { grid-column: span 2; }
@container (min-width: 560px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery__item:first-child { grid-column: span 2; grid-row: span 2; }
}

.gallery__item {
  padding: 0;
  border: 2px solid #444;
  background: #111;
  cursor: zoom-in;
  aspect-ratio: 5 / 3;
  overflow: hidden;
}
@container (min-width: 560px) {
  .gallery__item:first-child { aspect-ratio: auto; }
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.15s; }
.gallery__item:hover,
.gallery__item:focus-visible { border-color: var(--brand-pink); outline: none; }
.gallery__item:hover img { transform: scale(1.04); }

.game__section { margin-bottom: 24px; max-width: 70ch; }
.game__label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-pink);
}
.game__section p { margin: 0 0 10px; line-height: 1.6; font-size: 14px; }
.game__release { font-family: var(--font-title); font-size: 16px !important; color: #fff; }

.platform {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.platform__name {
  padding: 12px 16px;
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1;
  color: #fff;
  text-shadow: 3px 3px 0 var(--brand-pink);
  background: #1b1b1b;
  border: 2px solid #333;
}
.platform p { margin: 0 !important; font-size: 15px !important; }

.game__actions { margin-top: 8px; }
.btn--big {
  display: inline-block;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  text-decoration: none;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  animation: fade 120ms ease-out;
}
@keyframes fade { from { opacity: 0; } }

.lightbox__window {
  position: relative;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: min(1100px, 100%);
  max-height: 100%;
  min-width: 0;
}
.lightbox__stage {
  margin-top: 3px;
  background: #000;
  box-shadow: var(--bevel-field);
  padding: 2px;
  display: grid;
  place-items: center;
  min-height: 0;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
}
/* małe pixel-artowe grafiki powiększamy całkowitą krotnością */
.lightbox__img.pixelated { min-width: min(800px, 100%); object-fit: contain; }

.lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 4px;
}
.lightbox__nav .btn { min-width: 44px; }
