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

html, body {
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
  background-color: #fff;
  width: 100%;
  height: 100%;
}

:root {
  --section-gap: 8px;
}

.hidden {
  display: none !important;
}

#main-wrapper {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  max-width: 700px;
  margin: 0 auto;
  gap: var(--section-gap);
  padding: 0;
  position: relative;
}

#splash-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#splash-content {
  line-height: 1.2em;
  border: 3px solid hotpink;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  padding: 0.5em;
  width: 90%;
  max-width: 700px;
}

#progress-bar-container {
  width: 80%;
  height: 2em;
  background: #fff;
  border: 3px solid hotpink;
  margin: 1em auto;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  background: hotpink;
  width: 0%;
  transition: width 0.3s ease;
}

#enter-btn {
  font-family: inherit;
  font-size: 1em;
  color: gray;
  border: 3px solid hotpink;
  background: white;
  padding: 0.5em 1em;
  cursor: not-allowed;
}

#enter-btn.ready {
  box-shadow: 3px 3px 0 hotpink;
  cursor: pointer;
  color: hotpink;
}

#enter-btn.ready:hover {
  color: black;
}

#enter-btn.ready:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

#gallery-container {
  background: url("images/bg.png");
  display: grid;
  grid-auto-flow: column;
  height: calc(var(--vh, 1vh) * 70);
  grid-auto-columns: calc((var(--vh, 1vh) * 70) / 4);
  grid-template-rows: repeat(4, 1fr);
  z-index: 1;
  gap: 0;
  padding: 0;
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  border: 3px solid hotpink;
  box-sizing: border-box;
}

#gallery-container img {
  width: 100%;
  height: 100%;
  display: block;
}

#fullscreen-text {
  padding: 1em;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  color: black;
  background-color: white;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  text-align: left;
  border: 3px solid hotpink;
  box-shadow: 3px 3px hotpink;
}

#fullscreen-text.hidden {
  display: none;
}

#fullscreen-image.hidden {
  display: none;
}

.thumbnail {
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  background-color: #eee;
  filter: saturate(20%);
  transition: filter 0.5s ease;
  scroll-snap-align: start;
}

.thumbnail:hover {
  filter: saturate(100%);
}

#swipe-hint {
  position: absolute;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-family: 'Press Start 2P', monospace;
  color: hotpink;
  padding: 6px 10px 6px 14px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 2px 2px 0 hotpink;
  opacity: 0;
  transition: right 2s ease, opacity 1s ease;
  right: -220px;
}

#swipe-hint.visible {
  right: 5px;
  opacity: 1;
}

#fullscreen-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 70);
  background: url("images/bg.png");
  border: 3px solid hotpink;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  pointer-events: auto;
  z-index: 100;
  margin: 0;
  padding: 0;
  opacity: 1;
  transition: opacity 2s ease, transform 1s ease;
  box-sizing: border-box;
}

#fullscreen-view.hidden {
  opacity: 0;
  pointer-events: none;
}

#fullscreen-view img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border: 3px solid hotpink;
}

#fullscreen-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 25px;
  z-index: 101;
}

#fullscreen-controls button {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  padding: 6px 12px;
  background-color: white;
  border: 3px solid hotpink;
  box-shadow: 3px 3px 0 hotpink;
  color: hotpink;
  cursor: pointer;
}

#toggle-alt-button.hidden {
  display: none;
}

#fullscreen-controls button:hover {
  color: black;
}

#fullscreen-controls button:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 hotpink;
}

#welcome-box {
  box-sizing: border-box;
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: black;
  border: 3px solid hotpink;
  background-color: white;
  flex: 0 0 calc(15% - var(--section-gap));
  max-height: calc(15% - var(--section-gap));
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

#welcome-text {
  line-height: 1.2em;
  text-align: right;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  max-height: 100%;
  padding-right: 0.5em;
}

#welcome-icon {
  border-left: 3px solid hotpink;
  padding-left: 3px;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex-shrink: 0;
}

#welcome-box::-webkit-scrollbar {
  width: 6px;
}

#welcome-box::-webkit-scrollbar-thumb {
  background-color: hotpink;
}

#image-alt-text {
  line-height: 1.2em;
  font-size: 0.8rem;
  color: hotpink;
  text-align: center;
  margin-top: 10px;
  font-family: 'Press Start 2P', monospace;
  padding: 0 1rem;
}

#toggle-alt-link {
  display: block;
  margin-top: 0.5em;
  text-decoration: underline;
  cursor: pointer;
  transition: opacity 0.3s ease;
  opacity: 1;
}

#toggle-alt-link.hidden {
  opacity: 0;
  pointer-events: none;
}

#link-grid {
  padding: 2px;
  box-sizing: border-box;
  flex: 0 0 calc(15% - var(--section-gap));
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

#link-grid a {
  display: block;
  width: 100%;
  padding: 12px 0;
  color: hotpink;
  text-decoration: none;
  border: 3px solid hotpink;
  background-color: white;
  box-shadow: 3px 3px 0 hotpink;
  font-family: 'Press Start 2P', monospace;
}

#link-grid a:hover {
  color: black;
}

#link-grid a:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}








