
/* === Global Styles === */
body {
  background-image: url("/bg.gif");
  background-color: #efde82;
  margin: 0;
  padding: 0;
  font-family: Times-New-Roman, serif;
}

h1 {
  text-align: center;
  margin: 20px 0;
  font-size: 2em;
  color: black;
}

a {
  color: #cf248f;
  display: inline-block;
}

a:visited {
  color: #cf248f;
}

a:hover,
a:visited:hover {
  color: #36a966;
  text-decoration: underline;
}

/* === Masonry Scrapbook Layout === */
.scrapbook {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 10px;       /* small row height for dense placement */
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 600px) {
  .scrapbook {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Base styles for all images */
.scrapbook img {
  width: 100%;
  border-radius: 5px;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
  transform: rotate(var(--angle));
  cursor: pointer;
  position: relative;          /* allows z-index */
  display: inline-block;
  z-index: 1;
  transition: transform 0.6s, z-index 0s;
  grid-row-end: span var(--row-span); /* dynamic row span for masonry */
}

/* Hover rotation only on devices that support hover (desktop/laptop) */
@media (hover: hover) and (pointer: fine) {
  .scrapbook img:hover {
    transform: scale(1.1) rotate(calc(var(--angle) + var(--hover-tilt)));
    z-index: 30; /* always on top */
  }
}



/* === Modal Styles === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background-color: #c9bd98;
    background-image:
    linear-gradient(rgba(231, 217, 152, 0.7), rgba(231, 217, 152, 0.5)),
    url("/modal_bg.gif");
  box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
  padding: 20px;
  max-width: 90%;
  border-style: double;
  border-width: 5px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  margin: 20px;
  gap: 20px;
}

#modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5em;
  cursor: pointer;
}

#modal-image {
  max-width: 200px;
  width: 100%;
  border-radius: 5px;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
}

#modal-text {
  flex: 1;
  min-width: 150px;
}

.modal-tag {
  height: 28px;
  margin: 2px;
}

.modal-tag:hover {
  transform: translateY(-1px);
}


/* === Responsive === */
@media (max-width: 600px) {
  .modal-content {
    flex-direction: column;
    align-items: center;
  }

  #modal-text {
    text-align: center;
  }
}

/* === Header & Filters === */
.site-header {
  text-align: center;
  padding: 20px 10px 10px;
  padding-bottom: 0px;
}

.header-image {
  text-align: center; /* centers image */
  max-width: 100%;    /* ensures it doesn’t exceed container */
}

.header-image img {
  width: 100%;        /* scales with container */
  max-width: 800px;   /* caps size on large screens */
  height: auto;       /* preserves aspect ratio */
  display: block;     /* removes extra space below image */
  margin: 0 auto;     /* centers the image */
}

.header-ui {
  max-width: 800px;
  margin: 10px auto 0;
  margin-top: 0px;
  padding: 20px;
  padding-top: 0px;
  background-color: #d0b696;
  /* background-image: url("/modal_bg.gif"); turned off for noww!!!!!! */
  border: 8px ridge #cf248f;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.filter-group {
  margin-top: 10px;
}

.filter-group h3 {
  margin: 5px 0;
  font-size: 0.9em;
  letter-spacing: 1px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.filter-btn {
  cursor: pointer;
  display: inline-block;
  height: 32px; /* adjust if needed */
  transition: transform 0.1s ease;
}

.filter-btn:hover {
  transform: translateY(-1px);
}

.filter-btn.active {
  transform: translateY(1px);
  filter: brightness(0.8);
}

/* hidden state for filtering */
.scrapbook img.hidden {
  display: none;
}

/* === Loader === */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-content {
  text-align: center;
  width: 200px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #333;
  margin-top: 10px;
}

#progress {
  height: 100%;
  width: 0%;
  background: #54b680;
  transition: width 0.2s;
}

.scrapbook-container {
  max-width: 800px;        /* controls overall width */
  margin: 40px auto;       /* centers + adds space above/below */
  padding: 20px;
  
  background: #d2b48c;   /* subtle background (optional) */
  border: 8px ridge #cf248f;  /* your border */  
  box-shadow: 0 10px 20px rgba(0,0,0,0.2); /* optional depth */
}

#search {
  background: #ffffff;
  border: 2px solid #cf248f;
  border-radius: 5px;
     height: 20px;
     width: 80%;
}

@media (max-width: 600px) {
  .scrapbook-container {
    margin: 20px 14px;  /* top/bottom = 20px, left/right = 12px */
    padding: 3px;
  }
  
  .header-image img {
    max-width: 95%;
  }
}

/* === EVENTS === */
.events-container {
  max-width: 800px;
  margin: 40px auto;
  margin-top: 0;
  padding: 20px;
  background-color: #d0b696;
  border: 8px ridge #cf248f;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.events-container h1,
.events-container h2,
.events-container p {
  text-align: center;
}

.event {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 14px;
}

.event-item {
  text-align: center;
  position: relative;
}

.event-item img {
  width: 55%;
  border-radius: 5px;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
}

.event-time {
  margin: 10px 0 5px;
  padding-top: 10px;
  font-weight: bold;
}

.event-desc {
  font-size: 0.9em;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .event {
    grid-template-columns: 1fr;
  }

  .events-container {
    margin: 12px;
    margin-top: 0;
    margin-bottom: 126px;

  }
}

/* === SCROLLER === */
.games-scroll-wrapper {
  max-width: 800px;
  margin: 30px auto;
  overflow: hidden;
  position: relative;
}

.games-scroll-wrapper::before,
.games-scroll-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.games-scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #d0b696, transparent);
}

.games-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #d0b696, transparent);
}

.games-scroll {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll-left 40s linear infinite;
}

.games-scroll img {
  height: 120px;
  border-radius: 5px;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
  flex-shrink: 0;
  margin: 5px;
  margin-bottom: 18px;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}