/* ============================================================
   intro.css - Fullscreen Video Onboarding & Intro Walkthrough
   Full support for Mobile iOS (Safe Area) & Desktop Web
   ============================================================ */

#gh-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#gh-intro-overlay.gh-intro-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Video Player Element */
.gh-intro-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

#gh-intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  display: block;
}

/* Top bar with Branding & Skip button */
.gh-intro-top-bar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: max(16px, env(safe-area-inset-left, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.gh-intro-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* NÚT BỎ QUA NHỎ Ở TRÊN BÊN PHẢI (THEO ĐÚNG YÊU CẦU CỦA BẠN) */
.gh-intro-skip-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.gh-intro-skip-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  transform: translateY(-1px) scale(1.02);
}

.gh-intro-skip-btn:active {
  transform: scale(0.95);
  background: rgba(220, 38, 38, 0.95);
}

.gh-intro-skip-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bottom Bar: Sound Toggle & Play/Replay Controls */
.gh-intro-bottom-bar {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom, 18px));
  left: max(16px, env(safe-area-inset-left, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.gh-intro-sound-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gh-intro-sound-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.gh-intro-sound-btn:active {
  transform: scale(0.96);
}

.gh-intro-sound-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tap to Unmute Overlay Hint */
.gh-intro-unmute-hint {
  position: absolute;
  bottom: calc(max(18px, env(safe-area-inset-bottom, 18px)) + 52px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: gh-pulse-hint 2s infinite ease-in-out;
  transition: opacity 0.3s;
}

@keyframes gh-pulse-hint {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* Thin Progress Bar at the very bottom */
.gh-intro-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 35;
}

.gh-intro-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  transition: width 0.1s linear;
}
