@import 'https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/core@5/index.css';

/* =====================
   GLOBAL RESET
===================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #c3ad60;
  overflow: hidden;
}

#viewer {
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
}


#loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8); /* overlay transparan */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#loading-spinner img {
  width: 100px; /* sesuaikan ukuran GIF */
  height: 100px;
}

/* =====================
   OVERLAY UTAMA
===================== */
#overlay {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-radius: 12px;
  padding: 14px 18px;
  max-width: 260px;
  width: 80%;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
  opacity: 0;
  animation: overlayFadeIn 0.6s forwards;
}

#overlay img {
  width: 180px;
  max-width: 90%;
  margin-bottom: 6px;
}

#overlay p {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* =====================
   FOOTER NAVIGATION
===================== */
.footer-nav {
  position: fixed;
  bottom: 70px; /* Naik sedikit dari bawah */
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 10px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  opacity: 0;
  animation: footerFadeInUp 0.8s forwards;
  transition: transform 0.3s ease, background 0.3s ease;
}

.footer-nav:hover {
  transform: translateX(-50%) translateY(0) scale(1.05);
}

.footer-nav .logo-box img {
  height: 28px;
  display: block;
}

.footer-nav .nav-links {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav .nav-links li button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.footer-nav .nav-links li button:hover {
  background: rgba(255, 193, 7, 0.85);
  color: #fafafa;
  transform: scale(1.12);
}

@keyframes footerFadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(40px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =====================
   LOADING SPINNER
===================== */
#loading-spinner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(0,0,0,0.6);
  padding: 14px 28px;
  border-radius: 12px;
  z-index: 1000;
  font-size: 1rem;
  text-align: center;
}

#loading-spinner::after {
  content: '';
  display: block;
  border: 3px solid #fff;
  border-top: 3px solid #ffc107;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
  margin: 0 auto 6px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================
   TRANSITION OVERLAY
===================== */
#transition-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: black;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 999;
}

.psv-marker {
  z-index: 500 !important;
}

/* =====================
   RESPONSIVE DESIGN
===================== */

/* Tablet (481px - 991px) */
@media screen and (max-width: 991px) {
  #overlay {
    top: 9%;
    max-width: 280px;
    font-size: 0.9rem;
  }

  .footer-nav {
    bottom: 60px; /* sedikit naik di tablet */
    padding: 8px 18px;
  }

  .footer-nav .nav-links li button {
    padding: 6px 14px;
    font-size: 0.85rem;
  }
}

/* Mobile (≤480px) */
@media screen and (max-width: 480px) {
  html, body {
    overflow: hidden;
  }

  #overlay {
    top: 13%;
    width: 85%;
    max-width: 240px;
    padding: 10px 14px;
    border-radius: 10px;
  }

  #overlay img {
    width: 140px;
  }

  #overlay p {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .footer-nav {
    bottom: 50px; /* naik juga di HP */
    padding: 8px 14px;
    gap: 8px;
    border-radius: 40px;
  }

  .footer-nav .logo-box img {
    height: 24px;
  }

  .footer-nav .nav-links {
    gap: 8px;
  }

  .footer-nav .nav-links li button {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .footer-nav:hover {
    transform: translateX(-50%) translateY(0);
  }
}
