/* Basic Windows 98 inspired look */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.win98-body {
  margin: 0;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  font-family: "MS Sans Serif", "Tahoma", sans-serif;
  box-sizing: border-box;
  overflow-x: hidden;
}

.win98-window {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  width: min(960px, 100%);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
}

.win98-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #800000, #fa3620);
  color: #fff;
  padding: 4px 6px;
  box-sizing: border-box;
}

.win98-title {
  font-weight: bold;
  font-size: 13px;
}

.win98-controls {
  display: flex;
  gap: 2px;
}

.win98-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  color: #000;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #7f7f7f inset;
  font-size: 10px;
}

.win98-menubar {
  background: #c0c0c0;
  border-bottom: 1px solid #7f7f7f;
  padding: 2px 4px;
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.win98-menu-item {
  padding: 2px 6px;
  cursor: pointer;
  text-decoration: none;
  color: #000;
}

.win98-menu-item-active {
  background: #e20703;
  color: #fff;
}

.win98-content {
  padding: 12px 16px 16px;
  background: #ffffff;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #7f7f7f;
  border-bottom: 2px solid #7f7f7f;
  box-sizing: border-box;
}

.site-footer {
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px solid #d0d0d0;
  text-align: center;
}

.footer-logo {
  display: block;
  margin: 0 auto 4px;
  max-width: 90px;
  height: auto;
}

.footer-copy {
  font-size: 11px;
}

.brand-heading {
  margin-top: 0;
  font-size: 20px;
}

.brand-text {
  margin-bottom: 16px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.win98-button {
  display: inline-block;
  padding: 4px 10px;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #7f7f7f inset;
  text-decoration: none;
  color: #000;
  font-size: 13px;
}

.win98-button:active {
  box-shadow: -1px -1px 0 #fff inset, 1px 1px 0 #7f7f7f inset;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.gallery-item {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #7f7f7f inset;
  padding: 4px;
  box-sizing: border-box;
}

.gallery-thumb {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  image-rendering: auto;
  background: #000;
}

.gallery-caption {
  font-size: 11px;
  padding-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-visible {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.lightbox-window {
  position: relative;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  max-width: min(960px, 100%);
  max-height: min(640px, 100% - 32px);
  display: flex;
  flex-direction: column;
}

.lightbox-titlebar {
  cursor: default;
}

.lightbox-content {
  background: #ffffff;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #7f7f7f;
  border-bottom: 2px solid #7f7f7f;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  background: #000;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  min-width: 24px;
  padding: 2px 4px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  background: #c22401;
  color: #ffffff;
  border-color: #000000;
  cursor: pointer;
}

.lightbox-nav[data-lightbox-prev] {
  left: 4px;
}

.lightbox-nav[data-lightbox-next] {
  right: 4px;
}

.lightbox-caption-bar {
  padding: 4px 8px 8px;
  font-size: 11px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  body.win98-body {
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  .win98-window {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-thumb {
    max-height: 180px;
  }
}

