/* ================================================= */
/*                    MEDIA PAGE                    */
/* ================================================= */

/* BASE PAGE */
.media-page {
  background: url("images/media-page.jpg");
  background-repeat: repeat;
  font-family: Georgia, serif;
}

.page {
  width: 92%;
  margin: 0 auto;
  padding: 20px 0;
}

/* ================================================= */
/*                     LAYOUT                       */
/* ================================================= */

.media-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.media-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ================================================= */
/*                 SCRABBLE HEADERS                 */
/* ================================================= */

.scrabble {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  justify-content: center;
}

.scrabble span {
  background-image: url("images/wood.jpeg");
  background-size: cover;
  border: 2px solid #895B38;
  padding: 8px 10px;
  font-weight: bold;
  color: #302113;
  box-shadow: 2px 2px 0 #4b2f18;
}

.scrabble span:nth-child(even) {
  transform: rotate(-2deg);
}

.center {
  justify-content: center;
}

.center span {
  font-size: 28px;
}

h2.scrabble span {
  font-size: 20px;
}

.section-gap {
  margin-top: 50px;
}

/* ================================================= */
/*                 SCROLL STRIPS                    */
/* ================================================= */

.scroll-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 180px;
  max-width: 800px;
  margin-bottom: 40px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px;
  border: 7px solid #895B38;
  border-radius: 20px;
  background: url("images/music-paper.png") center / cover no-repeat;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

.scroll-item {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.scroll-item img {
  display: block;
  height: 140px;
  border-radius: 6px;
  cursor: pointer;
}

/* ================================================= */
/*               FILM STRIP SIDEBAR                  */
/* ================================================= */

.film-strip {
  width: 250px;
  padding: 12px 8px;
  background: url("images/movie-strip.png");
  border-radius: 6px;
  border: 6px solid #895B38;
  box-shadow: 4px 4px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.film-hole {
  width: 100%;
  height: 20px;
  background: repeating-linear-gradient(to right, #895B38 0 10px, transparent 10px 20px);
}

.film-item {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.film-strip img {
  width: 180px;
  border: 4px solid #895B38;
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

/* ================================================= */
/*                BACK LINK BUTTON                  */
/* ================================================= */

.back-link {
  position: fixed;
  top: 12px;
  left: 12px;
  font-family: Georgia, serif;
  font-size: 14px;
  color: #302113;
  text-decoration: none;
  background: url("images/wood.jpeg");
  background-size: cover;
  padding: 6px 10px;
  border: 2px solid #885b38;
  box-shadow: 2px 2px 0 #4b2f18;
}

.back-link:hover {
  text-decoration: underline;
}

/* ================================================= */
/*           SCRABBLE TILE POP (OASIS)               */
/* ================================================= */

.oasis {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.oasis:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 0 #4b2f18, 0 0 10px rgba(255, 220, 160, 0.8);
  filter: brightness(1.15);
  z-index: 2;
}

/* ================================================= */
/*                    JADE KEY                      */
/* ================================================= */

.hint1-key {
  width: 90px;
  height: auto;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: brightness(0.9) sepia(0.2);
}

.hint1-key:hover {
  transform: scale(1.2);
  filter: brightness(1) sepia(0.3);
}

/* ================================================= */
/*                 HINT POP-UP                      */
/* ================================================= */

#hint1-clue {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f5e8e0;
  color: #4b2f18;
  padding: 20px 30px;
  border: 3px solid #885b38;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  font-family: Georgia, serif;
  font-size: 18px;
  text-align: center;
  z-index: 9999;
  pointer-events: auto;
}

/* ================================================= */
/*                    SPARKLES                      */
/* ================================================= */

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle-explode 600ms ease-out forwards;
  z-index: 9999;
}

@keyframes sparkle-explode {
  0% { transform: scale(0) translate(0,0); opacity:1; }
  100% { transform: scale(1.5) translate(var(--dx), var(--dy)); opacity:0; }
}

/* ================================================= */
/*                  BOOK MODALS                     */
/* ================================================= */

.book-modal {
  display: none;
  position: fixed;
  top:0; left:0; width:100%; height:100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}

.book-modal .modal-content {
  background-color: #f5e8e0;
  color: #4b2f18;
  margin: 10% auto;
  padding: 20px;
  width: 70%;
  border-radius: 10px;
  font-family: Georgia, serif;
  max-height: 70%;
  overflow-y: auto;
}

.book-modal .close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* ================================================= */
/*              HOVER INTERACTIONS                  */
/* ================================================= */

/* Pop out on hover */
.scroll-item:hover,
.film-item:hover {
  transform: scale(1.07);
  z-index: 5;
}

/* Dark overlay */
.scroll-item::after,
.film-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.scroll-item:hover::after,
.film-item:hover::after {
  opacity: 1;
}

/* Title text */
.hover-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 8px;
}

.scroll-item:hover .hover-title,
.film-item:hover .hover-title {
  opacity: 1;
}

/* Optional glow */
.scroll-item:hover,
.film-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ================================================= */
/*                 MOBILE LAYOUT                    */
/* ================================================= */

@media (max-width: 768px) {
  .media-layout {
    flex-direction: column;
    align-items: center;
  }

  .film-strip {
    flex-direction: row;
    width: auto;
    padding: 10px;
    margin-top: 30px;
    border:6px solid #1a1a1a;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  }

  .film-strip img {
    width: 90px;
  }

  .film-hole {
    display: none;
  }
}
