/* ---------------- RESET & LAYOUT ---------------- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
  display: flex;
  height: 100vh;
  overflow: hidden; /* allows internal scrolling */
}

/* ---------------- SIDEBAR ---------------- */
#sidebar {
  width: 220px;
  background: #fff;
  border-right: 2px solid #000;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-weight: bold;
  font-size: 14px;
  color: #888; 
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sidebar-subtitle {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 16px;
}

/* ---------------- SEARCH ---------------- */
#search-container {
  margin-bottom: 20px;
}

#search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 2px solid #000;
  outline: none;
  font-weight: bold;
  box-sizing: border-box;
}

#search:focus {
  border-color: #555;
}

/* ---------------- CATEGORIES ---------------- */
#categories button {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
}

#categories button:hover {
  color: #555;
}

#categories button.active {
  background: #000;
  color: #fff;
  padding-left: 4px;
}

/* ---------------- MAIN GALLERY ---------------- */
#main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Desktop gallery images */
@media (min-width: 769px) {
  #gallery img {
    height: 360px;
    width: auto;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.25s ease;
  }
}

/* Gallery container */
#gallery {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 24px;
  overflow-y: auto;
  align-content: flex-start;
  box-sizing: border-box;
}

#gallery img:hover {
  transform: scale(1.05);
  transition: transform 0.25s ease;
}

/* ---------------- FULLSCREEN OVERLAY ---------------- */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fullscreen-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  transition: transform 0.35s ease;
  will-change: transform;
}

/* ---------------- FLOATING CATEGORY LABEL ---------------- */
#floating-category {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 20px;
  color: #fff;
  background: rgba(0,0,0,0.65);
  padding: 6px 14px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

/* ---------------- MOBILE RESPONSIVE ---------------- */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #000;
    padding: 12px;
    overflow-x: auto;
    overflow-y: visible;
    flex-direction: column;
  }

  #categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  #categories button {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    margin-bottom: 0;
  }

  #search-container {
    margin-bottom: 10px;
  }

  #main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #gallery {
    padding: 12px;
    gap: 12px;
    overflow-y: auto;
    height: calc(100vh - 120px);
  }

  #gallery img {
  width: 100%;
  height: auto;
  max-height: 70vh; /* keeps them from getting absurdly tall */
}

}
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
  align-content: start;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.gallery-img:hover {
  transform: scale(1.05);
}


.fullscreen-overlay {
  background: #111;
  overflow: hidden;
}


.zoom-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #111;
}

.zoom-pixel {
  position: absolute;
  display: block;
  border-radius: 0;
  filter: blur(18px) saturate(1.8);
  mix-blend-mode: screen;
  animation: zoomPixelCloud 12s ease-in-out infinite alternate;
}

@keyframes zoomPixelCloud {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  50% {
    transform: translate(80px, -50px) scale(1.4) rotate(12deg);
  }

  100% {
    transform: translate(-60px, 70px) scale(0.9) rotate(-8deg);
  }
}

.zoom-wrap {
  background: #fff;
  padding: 10px;
  max-width: 86vw;
  max-height: 82vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-wrap img {
  max-width: calc(86vw - 20px);
  max-height: calc(82vh - 20px);
  object-fit: contain;
  box-shadow: none;
}

.zoom-info {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.zoom-title,
.zoom-year {
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  padding: 8px 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
}

.zoom-year {
  font-size: 12px;
  opacity: 0.9;
}
.overlay-link {
  position: static;
  transform: none;
  pointer-events: auto;

  background: #000;
  color: #fff;
  border: 3px solid #fff;

  padding: 10px 16px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: 14px;

  transition: all .2s ease;
}

.overlay-link:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}
/* ---------------- RAINBOW PIXEL FAIRY DUST ---------------- */

.fairy-pixel {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 100000;
  transform: rotate(45deg);
  animation: fairyPixelFade 900ms ease-out forwards;
  box-shadow: 0 0 8px currentColor, 0 0 18px currentColor;
}

@keyframes fairyPixelFade {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1.2) rotate(45deg);
  }

  60% {
    opacity: 0.85;
    transform: translate(var(--drift-x), var(--drift-y)) scale(0.8) rotate(120deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--drift-x) * 1.6), calc(var(--drift-y) * 1.6)) scale(0) rotate(220deg);
  }
}

/* ---------------- WINDOWS XP BUTTON ---------------- */

.xp-button {
  display: inline-block;
  margin: 12px 0 18px 0;
  padding: 6px 18px;

  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  text-align: center;

  background: linear-gradient(#f4f4f4, #dcdcdc);

  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #666666;
  border-bottom: 2px solid #666666;

  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #bcbcbc;

  user-select: none;
}

.xp-button:hover {
  background: linear-gradient(#ffffff, #e9e9e9);
}

.xp-button:active {
  border-top: 2px solid #666666;
  border-left: 2px solid #666666;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;

  box-shadow:
    inset -1px -1px 0 #ffffff,
    inset 1px 1px 0 #9a9a9a;

  transform: translate(1px,1px);
}
#artistCVButton.xp-button {
  display: inline-block !important;
  width: fit-content !important;
  max-width: fit-content !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  #artistCVButton.xp-button {
    display: inline-block !important;
    width: fit-content !important;
    max-width: fit-content !important;
    min-width: 0 !important;
    align-self: flex-start !important;
  }
}

/* ---------------- STAR COUNTER ---------------- */

#star-counter {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20000;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 14px;
  font-family: Arial, sans-serif;
  box-shadow: 4px 4px 0 #000;
  pointer-events: auto;
  user-select: none;
}

#star-counter.star-bump {
  animation: starBump 0.35s ease;
}

@keyframes starBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.2) rotate(-4deg); }
  100% { transform: scale(1); }
}

.star-float {
  position: fixed;
  z-index: 30000;
  pointer-events: none;
  font-weight: 900;
  font-size: 18px;
  animation: starFloat 900ms ease-out forwards;
}

@keyframes starFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-42px) scale(1.4) rotate(12deg);
  }
}

/* ---------------- STAR PRIZE MODAL ---------------- */

#star-prize {
  position: fixed;
  inset: 0;
  z-index: 40000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
}

#star-prize.active {
  display: flex;
}

.star-prize-box {
  background: #fff;
  color: #000;
  border: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  padding: 24px;
  max-width: 340px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.star-prize-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.star-prize-text {
  font-size: 14px;
  margin-bottom: 18px;
}

.star-prize-box a {
  display: inline-block;
  background: #000;
  color: #fff;
  border: 3px solid #000;
  padding: 10px 16px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.star-prize-box a:hover {
  background: #fff;
  color: #000;
}

@media (max-width: 768px) {
  #star-counter {
    top: 10px;
    right: 10px;
    font-size: 13px;
    padding: 6px 10px;
  }
}
