:root {
  --bg-color: rgb(255, 252, 240);
  --text-color: rgb(16, 15, 15);
  --secondary-text: rgb(111, 110, 105);
  --arrow-color: rgba(16, 15, 15, 0.3);
  --arrow-hover: rgba(16, 15, 15, 0.6);
}

[data-theme="dark"] {
  --bg-color: rgb(16, 15, 15);
  --text-color: rgb(206, 205, 195);
  --secondary-text: rgb(135, 133, 128);
  --arrow-color: rgba(206, 205, 195, 0.3);
  --arrow-hover: rgba(206, 205, 195, 0.7);
}

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

body {
  font-family: "Andale Mono", "Noto Sans", "Lucida Console", "Lucida Sans Typewriter", "Monaco", "Courier New", monospace;
  font-size: 11px;
  line-height: 18px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

.site-title {
  position: fixed;
  left: 10px;
  top: 5px;
  font-size: 1.6em;
  font-weight: 500;
  margin: 0;
  padding: 5px 5px 5px 0;
  letter-spacing: 0.5px;
  color: var(--text-color);
  transition: color 0.3s ease;
  z-index: 45;
  cursor: pointer;
  pointer-events: auto;
}

.site-title:hover {
  opacity: 0.5;
}

.sidebar-hover-zone {
  position: fixed;
  left: 0;
  top: 0;
  width: 30px;
  height: 100vh;
  z-index: 100;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 45px;
  width: 150px;
  height: calc(100vh - 45px);
  padding: 5px 5px 5px 10px;
  overflow-y: auto;
  z-index: 50;
  pointer-events: none; /* Don't block clicks when drawer is hidden */
}

.sidebar.expanded {
  pointer-events: auto; /* Enable clicks when drawer is visible */
}

.credit-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 11px;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
  z-index: 100;
  letter-spacing: 0.5px;
}

.credit-link:hover {
  color: var(--secondary-text);
}

.info-link {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 11px;
  color: var(--text-color);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease;
  z-index: 100;
  padding: 0;
}

.info-link:hover {
  opacity: 0.5;
}

.info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.info-overlay.visible {
  display: flex;
}

.info-content {
  text-align: center;
  max-width: 600px;
  padding: 40px;
}

.info-content p {
  font-size: 11px;
  line-height: 18px;
  color: var(--text-color);
  margin-bottom: 20px;
}

.info-website-link {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.info-website-link:hover {
  opacity: 0.5;
}

.info-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease;
  padding: 0;
}

.info-close:hover {
  opacity: 0.5;
}

.mobile-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(16, 15, 15);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.mobile-warning.visible {
  display: flex;
}

.mobile-warning-content {
  text-align: center;
  max-width: 300px;
  padding: 20px;
}

.mobile-warning-content p {
  font-size: 11px;
  line-height: 18px;
  color: rgb(206, 205, 195);
}

.dates-toggle {
  background: none;
  border: none;
  padding: 5px 0 5px 5px;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-color);
  cursor: pointer;
  text-align: left;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
}

.dates-toggle:hover {
  opacity: 0.5;
}

.date-nav {
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.sidebar.expanded .date-nav {
  max-height: 2000px;
  opacity: 1;
  overflow-y: auto;
}

.date-link {
  display: block;
  padding: 6px 0 0 5px;
  font-size: 11px;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.date-link:hover {
  color: var(--secondary-text);
}

.date-link.active {
  color: red;
  font-weight: 500;
  font-size: 14px;
}

.photo-container {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 20px 20px 20px;
}

.photo-container:hover {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><text x="8" y="24" font-size="24" fill="black">&lt;</text></svg>') 16 16, auto;
}

.photo-container.cursor-right:hover {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><text x="8" y="24" font-size="24" fill="black">&gt;</text></svg>') 16 16, auto;
}

.photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#photo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-caption {
  margin-top: 15px;
  font-size: 11px;
  color: var(--secondary-text);
  text-align: center;
  max-width: 600px;
  line-height: 18px;
}


.nav-arrow {
  display: none;
}

@media (max-width: 800px) {
  body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .site-title {
    position: static;
    font-size: 1.2em;
    padding: 10px;
    text-align: left;
    order: 1;
  }

  .photo-container {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    padding: 10px;
    margin: 0;
    width: 100%;
    order: 2;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 10px;
    overflow-y: visible;
    order: 3;
  }

  .date-nav {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .date-link {
    padding: 6px 0 0 0;
    font-size: 11px;
    display: block;
  }

  .photo-wrapper {
    max-width: 100%;
    width: 100%;
    align-items: center;
  }

  #photo {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  .photo-caption {
    margin-top: 10px;
    font-size: 11px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
  }

  .credit-link {
    position: fixed;
    bottom: 10px;
    right: 10px;
  }
}
