/* underwood1913 font */
@font-face {
  font-family: 'Underwood1913';
  src: url('https://harrowick.neocities.org/Lore/Candles/Underwood1913.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* background */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  background: url("https://harrowick.neocities.org/Gallery/gallerypagebackground.png") no-repeat center center fixed;
  background-size: cover;
  overflow: hidden;
}

/* back button */
.home-btn {
  position: fixed;
  cursor: pointer;
  z-index: 5;
  filter: brightness(0.8) contrast(0.9);
  transition: filter 0.3s ease;
}

.home-btn:hover {
  filter: brightness(1) contrast(1);
}

/* page title */
.page-title {
  position: absolute;
  top: 0px;
  left: 35%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 800px;
  height: auto;
  pointer-events: none;
}


.character-backdrop {
  position: fixed;
  right: 2%;
  top: 45%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  width: 550px;
  height: 100vh;
}


.character-render {
  position: fixed;
  right: -10%;
  top: 60%;
  transform: translateY(-50%);
  height: 78vh;
  width: auto;
  z-index: 2;
  pointer-events: none;
}

/* main content container */
.content-container {
  position: absolute;
  left: 9%;
  top: 52%;
  transform: translateY(-50%);
  width: 52%;
  max-width: 975px;
  height: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.content-box {
  position: relative;
  width: 110%;
  max-width: 1050px;
  height: 936px;
  background-image: url('https://harrowick.neocities.org/Lore/Candles/LoreContainerAnim.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 70px;
  box-sizing: border-box;
}

/* header */
.content-header {
  text-align: center;
  font-family: 'Underwood1913', monospace;
  font-size: 35px;
  font-weight: normal;
  color: rgb(221, 206, 191);
  text-decoration: underline 0.02em;
  margin-bottom: 10px;
  letter-spacing: 2px;
  padding-top: 3px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}


.gallery-year {
  font-family: 'Underwood1913', monospace;
  font-size: 28px;
  font-weight: normal;
  color: rgb(221, 206, 191);
  letter-spacing: 2px;
  text-align: center;
  margin: 20px 0 10px;
}



/* scrollable area */
.scroll-gradient {
  height: 600px;
  overflow-y: scroll;
  padding-right: 40px;
  padding-left: 40px;
  padding-top: 10px;
  font-family: 'Underwood1913', monospace;
  font-size: 20px;
  line-height: 1.5;
  color: rgb(221, 206, 191);
  position: relative;
  text-shadow: 1px 1px 2px rgba(0,0,0,5);
}

.scroll-gradient::after {
  content: '';
  display: block;
  height: 700px;
}

/* scrollbar */
.scroll-gradient::-webkit-scrollbar {
  width: 15px;
}

.scroll-gradient::-webkit-scrollbar-track {
  background-image: url('https://harrowick.neocities.org/Lore/Candles/scrollbartrack.png');
  background-size: contain;
  background-repeat: repeat-y;
  background-position: center;
}

.scroll-gradient::-webkit-scrollbar-thumb {
  background-image: url('https://harrowick.neocities.org/Lore/Candles/scrollbarthumb.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
}

/* scroll gradient masks */
.scroll-gradient.scrolled-top {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
}

.scroll-gradient.scrolled-middle {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
}

.scroll-gradient.scrolled-bottom {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%);
}

/* gallery grid — 3 columns */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 0 0 20px 0;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

.gallery-caption {
  font-family: 'Underwood1913', monospace;
  font-size: 16px;
  color: rgb(221, 206, 191);
  line-height: 1.4;
}

/* lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}