body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background-image: url("../assets/beach-tiles.jpg");
  background-repeat: repeat;
  font-family: "Quicksand", sans-serif;
  color: white;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.full-screen {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

#scene-jungle {
  height: 100vh;
  background-color: #1b5e20;
}

/* modal system */

#modalTitle {
    font-size: 2.5rem;
}

#modalContent {
    font-size: 1.375rem;
    font-weight: 350;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  background: #fff;
  color: #333;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  padding: 40px;
  box-sizing: border-box;
  overflow-y: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* animation logic */
.modal-panel.left-side {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

/* .modal-panel.right-side {
    right: 0;
    left: auto;
    transform: translateX(100%);
} */

.modal-overlay.active .modal-panel {
  transform: translateX(0);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: bold;
}

/* Mobile View */
@media (max-width: 768px) {
  .modal-panel {
    width: 100%;
  }

  #modalContent {
    font-size: 18px;
    font-weight: 400;
  }
}

/* PRELOADER STYLES */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0277bd; /* Matches your Intro Blue */
  z-index: 99999; /* Must be on top of everything */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out; /* Smooth fade out */
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

.loading-text {
  font-family: "Courier New", Courier, monospace;
  color: white;
  font-weight: bold;
  letter-spacing: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* HARDWARE ACCELERATION FIX */
/* Add this to your boat class in intro.css too! */
.boat-asset,
.intro-scale-wrapper {
  /* This stops the "Black Background" flicker */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
