/* ─────────────────────────────────────────────────────────────
   PHOTO ARCHIVE — style.css
───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a08;
  --white:     #ffffff;
  --offwhite:  #e8e4d9;
  --dim:       #555;
  --polar-bg:  #f0ece3;
  --photo-bg:  #1a1a17;
  --green:     #3aff6c;
  --green-dim: #1e7a35;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--offwhite);
  font-family: 'Space Mono', monospace;
  min-height: 100vh;
}

/* ─── PAGE SYSTEM ───────────────────────────────────────── */
#app { position: relative; min-height: 100vh; }

.page {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.35s ease;
}
.page.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── NAV BAR — consistent white across ALL pages ──────── */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}

.nav-btn {
  background: none;
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}
.nav-btn:hover  { opacity: 0.5; }
.nav-btn.playing { opacity: 0.5; }

/* ─── HOME PAGE ─────────────────────────────────────────── */
#page-home {
  justify-content: center;
  align-items: center;
  background: var(--bg);
}

.home-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── SELECT PLAYER — Araki CRT blue, scales with viewport ─ */
.btn-play {
  padding: 16px 12px;
  font-family: 'Nunito', 'Arial Rounded MT Bold', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 9vw, 72px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  color: #b8d0ff;
  background: transparent;
  white-space: nowrap;
  display: block;

  text-shadow:
    0 0 4px  #ffffff,
    0 0 10px #9bbeff,
    0 0 20px #6699ff,
    0 0 40px #3366ee,
    0 0 70px #1144cc,
    0 0 100px #0033aa;

  animation: araki-flicker 4s infinite;
  transition: text-shadow 0.2s;
}

.btn-play:hover {
  text-shadow:
    0 0 6px  #ffffff,
    0 0 14px #ccdeff,
    0 0 28px #88aaff,
    0 0 55px #5577ff,
    0 0 90px #2255ee,
    0 0 130px #0044cc;
}

@keyframes araki-flicker {
  0%,89%,91%,95%,100% { opacity: 1; }
  90%  { opacity: 0.86; }
  93%  { opacity: 0.92; }
}

/* gap between SELECT PLAYER and the two bottom buttons */
.home-secondary-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
  width: clamp(200px, 40vw, 300px);
}

/* ── ARCHIVE + INFO — Strand Releasing: Impact fills the box */
.btn-secondary {
  width: 100%;
  padding: 13px 16px;
  font-family: Impact, 'Arial Narrow', Arial, sans-serif;
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  background: #000000;
  color: #ffffff;
  border: none;
  display: block;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover { background: #ffffff; color: #000000; }

/* ─── PLAYER PAGE ───────────────────────────────────────── */
#page-player {
  justify-content: center;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 88px;
  position: relative;
  background: var(--bg);
}

.player-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
}

#main-photo {
  max-width: min(520px, 88vw);
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#main-photo img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.player-bottom {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
}

.arrow-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 42px;
  cursor: pointer;
  padding: 10px 24px;
  transition: opacity 0.15s, transform 0.1s;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}
.arrow-btn:hover:not(:disabled) {
  opacity: 0.7;
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.9));
}
.arrow-btn:disabled { opacity: 0.12; cursor: default; }

/* ─── ARCHIVE PAGE ──────────────────────────────────────── */
#page-archive {
  background: var(--bg);
  padding-top: 72px;
  padding-bottom: 40px;
}

/* 4 columns — polaroid aspect ratio, full image visible */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 16px;
}

.archive-item {
  cursor: pointer;
  display: block;
  aspect-ratio: 5 / 6;
  background: var(--photo-bg);
  overflow: hidden;
  transition: opacity 0.18s, transform 0.18s;
  position: relative;
}
.archive-item:hover { opacity: 0.82; transform: scale(1.02); z-index: 2; }

.archive-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  pointer-events: none;
}

/* ─── LIGHTBOX ──────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,4,3,0.97);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; animation: fadeIn 0.2s ease; }

.lightbox-inner {
  position: relative;
  max-width: 80vmin;
  max-height: 90vh;
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 24px 90px rgba(0,0,0,0.9);
}

.lightbox-close {
  position: absolute;
  top: -28px; right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.2em;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  padding: 0;
}
.lightbox-close:hover { opacity: 0.6; }

/* ─── INFO / TERMINAL PAGE ──────────────────────────────── */
#page-info    { background: #050505; }
.page-terminal { position: relative; }

.terminal-body {
  padding: 100px 32px 60px;
  max-width: 560px;
}

.terminal-prompt {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.04em;
  line-height: 1.8;
}
.terminal-prompt .dim { color: var(--green-dim); }

.terminal-output {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--green);
  line-height: 1.9;
  margin-top: 12px;
  padding-left: 2px;
}

.terminal-link {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green-dim);
  transition: color 0.2s, border-color 0.2s;
}
.terminal-link:hover { color: #8affa8; border-color: var(--green); }

.cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
  margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 540px) {
  .archive-grid  { grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 10px; }
  .terminal-body { padding: 88px 20px 48px; }
}