/* ===== Reset & Layout ===== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: pan-y;
  overscroll-behavior: none;
}

* { box-sizing: border-box; }

.mobile-wrapper {
  position: relative;
  height: 100vh;
  aspect-ratio: 9 / 16;
  max-height: 100%;
  max-width: calc(100vh * (9 / 16));
  border-radius: 20px;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.mobile-wrapper::-webkit-scrollbar { display: none; }

.page {
  width: 100%;
  height: 100%;
  position: relative;
  scroll-snap-align: start;
}

.nav-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 2px solid #000; /* ini bikin lingkaran hitam keliatan */
}

video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

/* ===== Overlay base ===== */
#storyIcon,
.location-button-img,
.copy-btn,
.bottom-nav {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: opacity 0.35s ease, transform 0.25s ease, left 0.12s ease, top 0.12s ease;
  pointer-events: auto;
}

.hidden { opacity: 0; pointer-events: none; }

/* ===== Story Icon ===== */
#storyIcon {
  width: clamp(80px, 40%, 180px);
  cursor: pointer;
  opacity: 0;
}
#storyIcon.story-show {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInBounce 0.8s ease forwards;
}

/* ===== Location Button ===== */
.location-button-img {
  width: clamp(60px, 18%, 120px);
  cursor: pointer;
  opacity: 0;
}
.location-button-img.location-show {
  opacity: 1;
  animation: fadeInBounce 0.8s ease forwards;
}

/* ===== Copy Buttons ===== */
.copy-btn {
  width: clamp(50px, 16%, 100px);
  height: auto;
  cursor: pointer;
  opacity: 0;
}
.copy-btn.copy-show {
  opacity: 1;
  animation: fadeInBounce 0.8s ease forwards;
}

/* ===== Navbar (default mobile) ===== */
.bottom-nav {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 6px 12px;
  border-radius: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);

  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.28s ease, transform 0.22s ease;
}

.nav-btn {
  width: clamp(40px, 8vw, 64px);
  height: clamp(40px, 8vw, 64px);
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.55); transform: scale(1.05); }
.nav-btn img { width: 70%; height: auto; transition: transform 0.2s ease; }
.nav-btn:active img { transform: scale(0.92); }

/* ===== Animasi ===== */
@keyframes fadeInBounce {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  80%  { transform: translate(-50%, -50%) scale(0.98); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === Desktop (konsisten ukuran fix px) === */
@media screen and (min-width: 1024px) {
  #storyIcon { width: 200px; bottom: 1%; }
  .location-button-img { width: 100px; }
  .bottom-nav { gap: 20px; padding: 10px 20px; }
  .nav-btn { width: 64px; height: 64px; }
  .copy-btn { width: 100px; }
}

/* === FIX khusus NEST HUB (1024x600) === */
@media screen and (width: 1024px) and (height: 600px) {
  #storyIcon { width: 100px; bottom: 1%; }
  .location-button-img { width: 100px; }
  .bottom-nav { gap: 16px; padding: 8px 16px; }
  .nav-btn { width: 40px; height: 40px; }
  .copy-btn { width: 75px; }
  #copyBtn1 { top: 29%; }
  #copyBtn2 { bottom: 22%; }
}

/* ===== Global Loader ===== */
#globalLoader {
  position: fixed;
  inset: 0;
  background: #000 url("assets/videos/pleasewait.gif") center center no-repeat;
  background-size: contain;
  z-index: 9999;
  display: none;
}
#globalLoader.active { display: block; }
