/* Page container */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  padding: 2rem;
}

/* Desktop window wrapper - grey chrome */
.desktopWindow {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  max-width: 920px;
  width: 100%;
}

/* Title bar - Mac OS 8 / Netscape style */
.titleBar {
  background: linear-gradient(90deg, #808080 0%, #c0c0c0 2%, #c0c0c0 98%, #808080 100%);
  padding: 2px 3px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #808080;
  height: 20px;
}

.windowButtonLeft {
  width: 14px;
  height: 14px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  margin-right: 6px;
  flex-shrink: 0;
}

.windowTitle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: 'Chicago', 'Charcoal', 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #c0c0c0 0px,
    #c0c0c0 1px,
    #808080 1px,
    #808080 2px,
    #c0c0c0 2px,
    #c0c0c0 3px,
    #ffffff 3px,
    #ffffff 4px
  );
  padding: 0 4px;
}

.windowTitleText {
  background: #c0c0c0;
  padding: 0 6px;
  white-space: nowrap;
}

.windowButtonsRight {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  margin-left: 6px;
}

.windowButtonRight {
  width: 14px;
  height: 14px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

/* Grey toolbar area above URL bar - larger buffer like original */
.toolbarArea {
  background: #c0c0c0;
  height: 28px;
  border-bottom: 1px solid #808080;
}

/* Browser window - inside desktop chrome */
.browser {
  background: #c0c0c0;
}

/* URL Bar with centered input and buffers */
.urlBar {
  background: #c0c0c0;
  padding: 4px 40px;
  display: flex;
  align-items: center;
}

.urlInput {
  flex: 1;
  background: white;
  border: 2px inset #808080;
  padding: 2px 4px;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  color: #000;
}

/* Search Frame - Black background */
.searchFrame {
  background: #000000;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
}

.searchForm {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordLabel {
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.searchInput {
  width: 250px;
  background: #ffffff;
  border: 2px inset #808080;
  padding: 3px 6px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.composeBtn {
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 4px;
  padding: 4px 16px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: normal;
  color: #000000;
  cursor: pointer;
}

.composeBtn:hover {
  background: #f0f0f0;
}

.composeBtn:active {
  background: #e0e0e0;
}

/* Grey divider line between search and images */
.dividerLine {
  height: 6px;
  background: #c0c0c0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
}

/* Bottom status bar - Netscape style */
.statusBar {
  background: #c0c0c0;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px;
  border-top: 1px solid #ffffff;
}

.statusBarLeft {
  display: flex;
  gap: 2px;
}

.statusBarButton {
  width: 14px;
  height: 14px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
}

.statusBarCenter {
  flex: 1;
  height: 14px;
  background: #c0c0c0;
  border: 1px inset #808080;
  margin: 0 4px;
}

.statusBarRight {
  display: flex;
}

/* Results Frame with macOS scrollbar */
.resultsFrame {
  background: #000000;
  max-height: 540px; /* ~6 images tall */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* macOS-style scrollbar */
.resultsFrame::-webkit-scrollbar {
  width: 14px;
  background: transparent;
}

.resultsFrame::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-left: 1px solid #d0d0d0;
}

.resultsFrame::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 7px;
  border: 3px solid #f0f0f0;
  min-height: 40px;
}

.resultsFrame::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Firefox scrollbar */
.resultsFrame {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) #f0f0f0;
}

.noResults {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #000000;
  letter-spacing: 0.3em;
}

/* Image Grid - like original: rows of 17, images bleed off edge */
.imageGrid {
  background: #000000;
  position: relative;
  line-height: 0; /* Remove gaps between image rows */
  font-size: 0;   /* Remove inline-block gaps */
}

.imageRow {
  white-space: nowrap; /* Prevent wrapping within row */
  display: block;
}

.gridImage {
  height: 100px; /* Fixed height like original */
  width: auto;   /* Variable width - natural aspect ratio */
  display: inline-block;
  vertical-align: top;
  cursor: pointer;
  transition: opacity 0.15s;
}

.gridImage:hover {
  opacity: 0.85;
}

/* Floating Text Overlay - fade in/out, click-through */
.floatingTextContainer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none; /* Allow clicks through */
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.floatingText {
  max-width: 80%;
  max-height: 80%;
  text-align: center;
  animation: floatInOut 4s ease-in-out forwards;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem 3rem;
  border-radius: 4px;
}

@keyframes floatInOut {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.floatingTextContent {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  white-space: pre-wrap;
  letter-spacing: 0.08em;
}

.floatingTextAuthor {
  margin-top: 1.5rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.floatingTextAuthor em {
  font-style: italic;
}

.highlight {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  padding: 0 4px;
  border-radius: 2px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid #222;
  margin-top: 2rem;
}

.year {
  font-size: 5rem;
  font-weight: 100;
  color: #222;
  letter-spacing: 0.3em;
  margin-bottom: 0.25rem;
}

.title {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: 0.5em;
  margin-bottom: 0.25rem;
  color: #ededed;
}

.subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
}

.description {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.8;
  color: #888;
  font-size: 0.95rem;
}

.links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.links a {
  padding: 0.75rem 1.5rem;
  border: 1px solid #333;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 200;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.links a:hover {
  color: #fff;
  border-color: #fff;
}

/* Responsive */
@media (max-width: 950px) {
  .page {
    padding: 1rem;
  }

  .desktopWindow {
    border-radius: 6px;
  }

  .gridImage {
    height: 80px;
  }

  .resultsFrame {
    max-height: 400px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 0.5rem;
  }

  .desktopWindow {
    border-radius: 0;
  }

  .titleBar {
    padding: 2px 3px;
  }

  .windowTitleText {
    font-size: 10px;
  }

  .gridImage {
    height: 60px;
  }

  .resultsFrame {
    max-height: 320px;
  }

  .floatingTextContent {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
  }

  .floatingText {
    padding: 1.5rem 2rem;
  }

  .year {
    font-size: 3rem;
  }

  .title {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
  }

  .links {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .links a {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    padding: 0.5rem 1rem;
  }
}

/* Native controls preserve the original composition while supporting a keyboard. */
.imageButton { display: inline-block; vertical-align: top; border: 0; padding: 0; background: transparent; cursor: pointer; }
.imageButton:focus-visible { outline-offset: -3px; }
.wanderButton { background: transparent; border: 0; color: #222; font: 10px Arial, sans-serif; cursor: pointer; padding: 0 4px; }
.urlInput, .searchInput { min-width: 0; }
.searchForm { max-width: 100%; }
.searchInput { flex: 1; }
.wordLabel, .composeBtn { flex-shrink: 0; }
@media (max-width: 600px) {
  .searchForm { gap: 6px; }
  .searchInput { width: 140px; }
  .composeBtn { padding: 4px 8px; }
  .urlBar { padding: 4px 12px; }
  .floatingText { max-width: 100%; padding: 1rem; }
}
