html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background: #000;
  overflow: hidden;
}
#container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  overflow: hidden;
}
/* Responsive media styling */
.media {
  width: 100vw;
  height: 100vh;
  background: #000;
  display: none;
  object-fit: contain;
}
.media.visible {
  display: block;
}
img.media, iframe.media {
  max-width: 100vw;
  max-height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  transform: none;
  background: #000;
  border: none;
}
/* Overlay Text Styling */
#overlayText {
  position: absolute;
  left: 50%;
  bottom: 14%; /* Raised to avoid overlapping the button */
  transform: translateX(-50%);
  width: 60vw;
  min-width: 200px;
  min-height: 2.5em;
  text-align: center;
  color: white;
  font-size: 1.8vw;
  opacity: 0;
  background: rgba(40,40,40,0.65);
  border-radius: 18px;
  padding: 18px 20px;
  transition: opacity 1.5s;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  z-index: 20;
  box-sizing: border-box;
}

/* Next Button Styling with Separate Fading Background & Text */
#nextBtn {
  display: block;
  position: absolute;
  bottom: 3%;
  right: 3%;
  border: none;
  border-radius: 10px;
  padding: 18px 32px;
  font-size: 1.5vw;
  cursor: pointer;
  z-index: 30;
  background: none;
  overflow: hidden;
}

#nextBtn .btn-bg {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(0,0,0,0.8);
  transition: opacity 0.7s, background 0.3s;
  z-index: 0;
  pointer-events: none;
}

#nextBtn .btn-txt {
  position: relative;
  z-index: 1;
  color: #A9BA9D;
  transition: color 0.7s;
}

/* Faded state: fade out bg, change text color */
#nextBtn.faded .btn-bg {
  opacity: 0;
}
#nextBtn.faded .btn-txt {
  color: #b8ba9d;
}
#container:hover #nextBtn .btn-bg {
  opacity: 1 !important;
}
#container:hover #nextBtn .btn-txt {
  color: #A9BA9D !important;
}
#nextBtn:hover .btn-bg {
  background: #333;
}

/* --- MOBILE OVERRIDES --- */
@media (max-width: 700px) {
  #container {
    width: 100vw;
    height: 100vh;
  }
  .media, img.media, iframe.media {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
  }
  #overlayText {
    font-size: 3vw;
    width: 90vw;
    bottom: 18%;
    padding: 14px 10px;
  }
  #nextBtn {
    display: block !important;
    font-size: 4vw;
    padding: 14px 22px;
    bottom: 5%;
    right: 5%;
  }
}
