/* ========================================
   CUSTOM ENHANCEMENTS FOR MARZIPANO TOUR
   ======================================== */

/* Splash Screen */
#splashScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fadeOut 2s ease-in-out 1.5s forwards;
}

/* ========================================
   PAGE HEADER TITLE (CENTERED TOP)
   ======================================== */

#pageHeader {
  position: fixed;
  top: 80px;  /* Moved down from 20px */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 15px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  pointer-events: none;
}

#pageHeader:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

#pageTitle {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

#pageSubtitle {
  margin: 5px 0 0 0;
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #pageHeader {
    top: 60px;  /* Adjusted for mobile */
    padding: 12px 25px;
    max-width: 90%;
  }
  
  #pageTitle {
    font-size: 20px;
  }
  
  #pageSubtitle {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  #pageHeader {
    top: 50px;
    padding: 10px 20px;
  }
  
  #pageTitle {
    font-size: 18px;
  }
  
  #pageSubtitle {
    font-size: 10px;
  }
}

/* ========================================
   SPLASH SCREEN (CONTINUED)
   ======================================== */

#splashLogo {
  max-width: 300px;
  width: 80%;
  height: auto;
  opacity: 1;  /* Start visible instead of 0 */
  animation: logoFadeIn 1.5s ease-in-out forwards;
  display: block;  /* Ensure it displays */
  margin: 0 auto;  /* Center it */
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Logo Overlay - Bottom Right */
#logoOverlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

#logoOverlay a {
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#logoOverlay:hover {
  opacity: 1;
}

#logoOverlay a:hover {
  transform: scale(1.05);
}

#logoOverlay img {
  width: 120px;
  height: auto;
  display: block;
}

/* Control Buttons Base Style */
.control-button {
  position: relative;  /* Changed from fixed - flexbox will position them */
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 50px;
  height: 50px;
  min-width: 50px;  /* Ensure consistent size */
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.control-button:active {
  transform: scale(0.95);
}

/* Music Toggle Button - Now in Control Panel */
#musicToggle .music-icon {
  display: none;
}

#musicToggle .music-icon.playing {
  display: inline;
}

#musicToggle.paused .music-icon.playing {
  display: none;
}

#musicToggle.paused .music-icon.paused {
  display: inline;
}

/* Info Button - Color only (alignment handled by panel) */
#infoToggle {
  background: rgba(52, 152, 219, 0.9) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  /* Force remove any positioning */
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 !important;
}

#infoToggle:hover {
  background: rgba(52, 152, 219, 1) !important;
}

/* Info Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

/* Hide scene list when any modal is open */
.modal.show ~ #sceneList,
body.modal-open #sceneList {
  display: none !important;
}

/* Alternative: Always hide scene list */
#sceneList {
  display: none !important;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  margin-top: 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
}

.modal-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.modal-content ul {
  color: #555;
  line-height: 1.8;
  margin-left: 20px;
  margin-bottom: 15px;
}

.modal-content li {
  margin-bottom: 8px;
}

.modal-content strong {
  color: #333;
  font-weight: 600;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #999;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.close-button:hover,
.close-button:focus {
  color: #333;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  #logoOverlay {
    bottom: 15px;
    right: 15px;
  }
  
  #logoOverlay img {
    width: 80px;
  }
  
  .control-button {
    width: 45px;
    height: 45px;
    font-size: 20px;
    padding: 10px;
  }
  
  #musicToggle {
    left: 15px;
    bottom: 15px;
  }
  
  #infoToggle {
    right: 15px;
    bottom: 110px;
  }
  
  .modal-content {
    padding: 20px;
    width: 95%;
  }
  
  .modal-content h2 {
    font-size: 20px;
  }
  
  #splashLogo {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  #logoOverlay img {
    width: 60px;
  }
  
  .control-button {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  #infoToggle {
    bottom: 90px;
  }
  
  .modal-content {
    padding: 15px;
  }
  
  .modal-content h2 {
    font-size: 18px;
  }
  
  #splashLogo {
    max-width: 150px;
  }
}
