/* ==========================================================
   1. DARK BACKGROUND & TYPOGRAPHY
   ========================================================== */
@font-face {
  font-family: MusicOriginal;
  src: url('/GloridaRegular-pgOKa.ttf') format('truetype');
  font-display: swap;
}
:root {
  --ink: #F0F0F0;
  --pink: #ff2e9a;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 10px;
  color: var(--ink);
  background: radial-gradient(ellipse at 10% 0%, #ffffff15, transparent 45%), radial-gradient(ellipse at 95% 90%, #96969615, transparent 50%), #050505;
  background-attachment: fixed;
  min-height: 100vh;
  font-family: MusicOriginal, Arial, sans-serif;
  cursor: url('/assets/Normal Select.cur'), auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button, a {
  touch-action: manipulation;
}
button:disabled {
  opacity: .3;
  cursor: default;
}
:focus-visible {
  outline: 2px solid #ff2e9a;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 12px;
  background: #252525;
  z-index: 20;
}
.skip-link:focus {
  top: 10px;
}
.archive-shell {
  width: 100%;
  margin: auto;
}
/* ==========================================================
   2. QUIET HEADER & GAME FILTERS
   ========================================================== */
.archive-header {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: 0 auto 12px;
  padding: 8px 16px;
  border: 1px solid #ffffff30;
  border-radius: 36px;
  background: linear-gradient(135deg, #393939c9, #141414bd 52%, #303030bf);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: inset 0 1px 0 #ffffff30, inset 0 -1px 0 #ffffff0d, 0 3px 14px #0005;
}
h1 {
  margin: 0;
  font-size: 22px;
  font-weight: normal;
  letter-spacing: -1px;
  line-height: 1.2;
}
h1 span {
  color: var(--pink);
  margin-left: 8px;
  font: normal .6em Arial, sans-serif;
  vertical-align: middle;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 3;
  grid-row: 1;
}
.home-link {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #b0b0b0;
  font-size: 11px;
  white-space: nowrap;
}
.home-link:hover {
  color: #ff9fce;
}
.category-tabs {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  justify-content: center;
  gap: 4px;
  margin: 0;
}
.category-tabs button {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: transparent;
  color: #e0e0e0;
  font-size: 12px;
  white-space: nowrap;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.category-tabs button[aria-pressed='true'] {
  border-color: #ff2e9a80;
  background: linear-gradient(140deg, #ffffff15, #ff2e9a30);
  box-shadow: inset 0 1px 1px #ffffff30, 0 2px 6px #0002;
  color: #ff9fce;
}
.category-tabs button:hover {
  color: #ff9fce;
}
/* ==========================================================
   3. PHOTOGRAPHS — no frame numbers or decorative panels
   ========================================================== */
.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.photo-frame {
  margin: 0;
  flex: 0 0 auto;
  min-width: 0;
}
.photo-button {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #1e1e1e;
  cursor: zoom-in;
}
.photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: #a0a0a0;
  font: 11px Arial, sans-serif;
}
.photo-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #0002;
  border-radius: 4px;
  pointer-events: none;
}
.photo-button:hover::after, .photo-button:focus-visible::after {
  border: 2px solid var(--pink);
}
.photo-frame figcaption {
  padding-top: 7px;
  color: #b0b0b0;
  font-size: 11px;
  line-height: 1.5;
}
.archive-footer {
  padding-top: 25px;
  text-align: center;
  color: #b0b0b0;
  font-size: 10px;
}
/* ==========================================================
   4. SIMPLE GLASS LIGHTBOX — the gallery remains visible beneath
   ========================================================== */
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  overflow: auto;
  cursor: zoom-out;
}
.viewer[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}
.viewer::backdrop {
  background: #00000099;
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}
body:has(.viewer[open]) {
  overflow: hidden;
}
.lightbox-frame {
  position: relative;
  max-width: 94vw;
  padding: 7px;
  border: 1px solid #ffffff40;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff30, #29292999 50%, #ffffff22);
  box-shadow: inset 0 1px 0 #ffffff60, inset 0 -1px 1px #ff2e9a44, 0 18px 70px #17152055;
}
#viewer-photo {
  display: block;
  max-width: calc(94vw - 16px);
  max-height: 86dvh;
  width: auto;
  height: auto;
  border-radius: 9px;
  object-fit: contain;
}
#close-viewer {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffffcf;
  border-radius: 50%;
  background: #242424df;
  color: #ffadd5;
  font: 25px/1 Arial, sans-serif;
  box-shadow: inset 0 1px 0 white, 0 3px 12px #17152022;
}
#close-viewer:hover {
  background: #60384c;
}
#viewer-message {
  max-width: 260px;
  margin: 0;
  padding: 16px;
  color: #f0f0f0;
  background: #252525;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}
/* ==========================================================
   5. MOBILE — full-width photos & readable game titles
   ========================================================== */
@media (max-width: 1100px) {
  .archive-header {
    grid-template-columns: 1fr auto;
    gap: 5px 16px;
    padding: 10px 14px;
    border-radius: 26px;
  }
  .header-controls {
    grid-column: 2;
  }
  .category-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  body {
    padding: 6px;
  }
  .archive-header {
    top: 6px;
    width: calc(100% - 8px);
    max-width: 430px;
    margin-bottom: 10px;
    padding: 8px 12px;
    gap: 3px 12px;
  }
  h1 {
    font-size: 18px;
  }
  .header-controls {
    gap: 12px;
  }
  .home-link {
    font-size: 10px;
  }
  .category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }
  .category-tabs button {
    padding: 6px 2px;
    font-size: 12px;
  }
  .photo-grid, .photo-row {
    gap: 6px;
  }
}
/* Solid fallback keeps the controls legible without backdrop blur. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .archive-header {
    background: #202020;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .viewer::backdrop {
    background: #050505ee;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .archive-header {
    background: #202020;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .category-tabs button {
    transition: none;
  }
}
/* ==========================================================
   6. COLLECTION TITLE & ABOUT PANEL
   ========================================================== */
.collection-heading {
  padding: 4px 4px 12px;
}
.collection-heading h2 {
  margin: 0;
  color: #a0a0a0;
  font-size: 12px;
  font-weight: normal;
}
.about-dialog {
  width: min(440px, 92vw);
  padding: 30px;
  border: 1px solid #ffffff40;
  border-radius: 22px;
  background: #181818ed;
  color: #f0f0f0;
  box-shadow: inset 0 1px 0 #ffffff40, 0 20px 60px #0009;
  line-height: 1.7;
  font-size: 13px;
}
.about-dialog::backdrop {
  background: #0008;
  backdrop-filter: blur(12px);
}
.about-dialog h2 {
  font-weight: normal;
  color: #ff9fce;
}
#close-about {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #ff9fce;
  font-size: 26px;
}
body:has(.about-dialog[open]) {
  overflow: hidden;
}
