/* LANDING INTRO & PORTAL TRANSITION STYLES */

/* Outer Overlay Wrapper - High z-index to cover all 3D world elements */
#landing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #06080d;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

#landing-overlay.ended {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

/* Voxel World UI smooth fade-in */
.viewport,
.tracker-container,
.tracking-toggle-btn,
.scroll-tutorial,
.replay-intro-btn {
  transition: opacity 1s ease-out;
}

/* Scene Layers */
.scene-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 10002;
}

/* Film grain texture overlay */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 10015;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Flash effect layer during portal warp */
#portal-flash {
  position: fixed;
  inset: 0;
  z-index: 10010;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, #fffbeb 0%, #fbbf24 40%, #d97706 70%, #06080d 100%);
  transition: opacity 0.3s ease-out;
}

/* Ken Ratri signature copper-gold highlight */
.highlight-ken {
  display: inline-block;
  background: linear-gradient(135deg, #92400e 0%, #d97706 40%, #b45309 70%, #78350f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  filter: drop-shadow(0 0 20px rgba(217, 119, 6, 0.4));
}

.highlight-ken::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d97706, transparent);
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.6);
}

/* Starburst glow */
@keyframes starPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.9)); }
}

.star-glow {
  animation: starPulse 2.5s infinite ease-in-out;
}

/* Zodiac badge shimmer */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 25%, #f59e0b 50%, #fbbf24 75%, #d97706 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s infinite linear;
}

/* Skip Intro button (top right during intro) */
.btn-skip-intro {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 10020;
  background: rgba(30, 18, 11, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #f59e0b;
  padding: 9px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--ui-font, 'Outfit', sans-serif);
  letter-spacing: 0.03em;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-skip-intro:hover {
  background: rgba(120, 53, 15, 0.85);
  border-color: rgba(245, 158, 11, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-skip-intro:active {
  transform: translateY(1px);
}



/* Replay Intro button in Top Right corner of Voxel World (matching hint theme #E07A5F) */
.replay-intro-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 150;
  background: #E07A5F;
  color: #FFFFFF;
  border: 2px solid #B74F36;
  border-bottom: 5px solid #B74F36;
  border-radius: 14px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: var(--ui-font, 'Outfit', sans-serif);
  box-sizing: border-box;
}

.replay-intro-btn:hover {
  background: #F08A6F;
  color: #FFFFFF;
}

.replay-intro-btn:active {
  border-bottom-width: 2px;
  transform: translateY(3px);
}

/* MOBILE & TABLET RESPONSIVE ADAPTATIONS FOR INTRO & BUTTONS */
@media (max-width: 768px) {
  .btn-skip-intro,
  .replay-intro-btn {
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .virgo-watermark {
    bottom: 16px;
    left: 16px;
    font-size: 11px;
    letter-spacing: 0.15em;
  }

  /* Increase readability of name reveal on vertical phone screens */
  #nameTop, #nameBottom {
    font-size: clamp(20px, 6vw, 36px) !important;
  }
  #nameMiddle {
    font-size: clamp(32px, 9.5vw, 60px) !important;
  }
  #zodiacLabel {
    font-size: clamp(48px, 14vw, 90px) !important;
  }
}

@media (max-width: 480px) {
  .btn-skip-intro,
  .replay-intro-btn {
    top: 10px;
    right: 10px;
    padding: 7px 12px;
    font-size: 11px;
    border-radius: 12px;
  }
}

/* Glassmorphic Speech Bubble for 3D Ken Dialogue */
.speech-bubble {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10020;
  background: rgba(18, 22, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.25);
  border-radius: 18px;
  padding: 16px 24px;
  width: max-content;
  max-width: min(460px, 85vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.speech-bubble.visible {
  opacity: 1;
}

.speech-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 400;
  color: #F3ECE1;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

/* Touch Prompt Hint ("Sentuh layar untuk melanjutkan") */
.touch-prompt-hint {
  position: fixed;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10022;
  background: #E07A5F;
  border: 1px solid #B74F36;
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(224, 122, 95, 0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.touch-prompt-hint.visible {
  opacity: 1;
  animation: pulseTouchPrompt 2s infinite ease-in-out;
}

@keyframes pulseTouchPrompt {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-50%, -4px) scale(1.04); }
}
