/* gallery.css */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #000000;
  font-family: "Courier New", Courier, monospace;
  color: #ffe6e6;
}

a { color: #ff6666; }
a:visited { color: #ff6666; }

/* ── HEADER ── */
.site-header {
  border-style: outset;
  border-width: 10px;
  background-image: url("images/stars.gif");
  background-color: #111;
  padding: 20px 30px;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

.site-title {
  color: #7c3891;
  text-shadow: 4px 4px #000000;
  font-size: 2.8em;
  font-family: "Courier New", Courier, monospace;
  margin-bottom: 8px;
}

.site-sub {
  color: #ff6666;
  font-size: 0.9em;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

/* ── RETRO BUTTON ── */
.retro-btn {
  background: #000;
  color: #ffe6e6;
  border-style: outset;
  border-width: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  padding: 4px 10px;
  cursor: pointer;
  margin: 2px;
}
.retro-btn:hover {
  background: #7c3891;
  color: #fff;
}
.retro-btn:active {
  border-style: inset;
}

/* ── GALLERY MAIN ── */
.gallery-main {
  width: 90%;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ── DAY SECTION ── */
.day-section {
  border-style: outset;
  border-width: 8px;
  background-color: #0a0a0a;
  background-image: url("images/stars.gif");
  margin: 16px 0;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  cursor: pointer;
  background-color: rgba(0,0,0,0.75);
  border-bottom: 2px solid #333;
  user-select: none;
}
.day-header:hover {
  background-color: rgba(124,56,145,0.4);
}

.toggle-arrow {
  color: #ff6666;
  font-size: 0.8em;
  transition: transform 0.2s;
  display: inline-block;
}
.day-section.collapsed .toggle-arrow {
  transform: rotate(-90deg);
}

.day-title {
  color: #ffffff;
  font-size: 1.3em;
  text-shadow: 2px 2px #000;
  font-family: "Courier New", Courier, monospace;
  flex: 1;
}

.day-count {
  color: #ff6666;
  font-size: 0.8em;
  white-space: nowrap;
}

.day-section.collapsed .day-body {
  display: none;
}

/* ── WRITE-UP ── */
.day-writeup {
  font-size: 0.95em;
  line-height: 1.7;
  color: #ffe6e6;
  background: rgba(0,0,0,0.7);
  border-left: 4px solid #7c3891;
  padding: 12px 18px;
  margin: 12px 12px 0 12px;
}

/* ── PHOTO GRID ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px;
  padding: 10px;
}

.photo-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  border-style: inset;
  border-width: 2px;
  border-color: #333;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.8) brightness(0.85);
  transition: filter 0.2s, transform 0.2s;
}
.photo-item:hover img {
  filter: saturate(1.1) brightness(1.05);
  transform: scale(1.05);
}

.lazy-img { opacity: 0; transition: opacity 0.3s; }
.lazy-img.loaded { opacity: 1; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
}

.lb-topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 6px 0 10px;
  font-size: 0.8em;
  color: #ff6666;
  flex-wrap: wrap;
  justify-content: center;
}

#lb-img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-style: outset;
  border-width: 6px;
  border-color: #7c3891;
}

.lb-inner {
  max-width: 95vw;
  max-height: 95vh;
}

.lb-side-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  color: #ffe6e6;
  border-style: outset;
  border-width: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.8em;
  padding: 16px 12px;
  cursor: pointer;
  z-index: 10002;
}
.lb-side-btn:hover { background: #7c3891; }
.lb-side-btn:active { border-style: inset; }
.lb-prev-btn { left: 8px; }
.lb-next-btn { right: 8px; }

.lb-btn {
  background: #000;
  color: #ffe6e6;
  border-style: outset;
  border-width: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  padding: 5px 12px;
  cursor: pointer;
}
.lb-btn:hover { background: #7c3891; }
.lb-btn:active { border-style: inset; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #7c3891; }

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .site-title { font-size: 1.6em; }
}
