    /* Reset and basic styles */
    body,
    html {
      margin: 0;
      padding: 0;
      overflow: hidden;
      width: 100%;
      height: 100%;
      background-color: black;
      font-family: var(--font-family);
      text-rendering: optimizeLegibility;
    }


    #app {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    /* Base video: always full width, vertically centered, behind everything */
    #base-video {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 100%;
      height: auto;
      z-index: 1;
      display: none;
    }

    /* Overlay video: placed on top of the base video */
    #video-overlay {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 100%;
      height: auto;
      z-index: 21;
      display: none;
      opacity: 0;
    }

    @keyframes buttonEntryAnimation {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes buttonExitAnimation {
      from {
        opacity: 1;
        transform: translateY(0);
      }
      to {
        opacity: 0;
        transform: translateY(20px);
      }
    }


    /* If the window's aspect ratio is less than 16:9 (tall/narrow) */
@media (max-aspect-ratio: 16/9) {
  #scene-container,
  .popup-page-wrapper {
    width: 100%;
    height: auto;
  }
}

/* If the window's aspect ratio is greater than 16:9 (wide/short) */
@media (min-aspect-ratio: 16/9) {
  #scene-container,
  .popup-page-wrapper {
    width: auto;
    height: 100%;
  }
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  }

  @keyframes rotation {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
  } 

  #loading-spinner {
    position: fixed;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }



  #screensaver-video {
    position: absolute;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Increased z-index to be higher than popups */
    opacity: 0;
    display: none;
    transition: opacity 1s ease-in-out;
  }
  