/* === splash.css — Splash Screen & Mode Selection === */

/* 2. SPLASH SCREEN (HIỆU ỨNG NHỊP THỞ DI SẢN) */
.custom-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* Màu nền sáng */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  transition:
    opacity 1.5s ease,
    visibility 1.5s;
  overflow: hidden;
}

/* Lớp nền hình ảnh có Animation */
.splash-bg-animated {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  /* background-image được set bởi JS từ data.json splashConfig.bg */
  background-size: cover;
  background-position: center;
  z-index: -2;
  animation: splashKenBurns 30s ease-in-out infinite alternate;
}

@keyframes splashKenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.1) translate(-2%, 1%);
  }
  100% {
    transform: scale(1.05) translate(1%, -1%);
  }
}

/* Lớp phủ Gradient sâu hơn */
.custom-start-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: -1;
}

.custom-start-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-title {
  color: white;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 7vw, 64px);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 32px;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: clamp(2px, 0.5vw, 4px);
  z-index: 10;
  line-height: 1.15;
  padding: 0 16px;
}

.splash-title span.yellow {
  color: var(--primary-gold);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.start-tour-btn {
  padding: clamp(14px, 2.5vw, 22px) clamp(36px, 7vw, 80px);
  font-size: clamp(13px, 2.2vw, 22px);
  font-family: var(--font-main);
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #da251d 0%, #ff4500 100%);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(218, 37, 29, 0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: clamp(2px, 0.4vw, 4px);
  z-index: 10;
  animation: btnGlowPulse 2s infinite;
  white-space: nowrap;
  max-width: 90vw;
}

@keyframes btnGlowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(218, 37, 29, 0.7);
  }
  70% {
    box-shadow: 0 0 0 25px rgba(218, 37, 29, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(218, 37, 29, 0);
  }
}

.start-tour-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ff4500 0%, #da251d 100%);
  border-color: #ffd700;
}


/* ============================================================
   SPLASH MODE SELECTION SCREEN
   Màn hình chọn chế độ tham quan (Tour Tự Động / Khám Phá)
   ============================================================ */

/* ── KEYFRAMES CHUNG ─────────────────────────────────────── */
@keyframes splashStepOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-28px) scale(0.97); }
}
@keyframes splashStepIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modeCardAppear {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── KEYFRAMES AI (Tour Tự Động) ─────────────────────────── */
@keyframes aiScan {
  0%   { transform: translateY(-100%); opacity: 0.5; }
  100% { transform: translateY(400%);  opacity: 0; }
}
@keyframes aiGlow {
  0%,100% { box-shadow: 0 0 18px rgba(0,212,255,0.25), 0 0 40px rgba(0,212,255,0.08); }
  50%      { box-shadow: 0 0 28px rgba(0,212,255,0.45), 0 0 60px rgba(0,212,255,0.15); }
}
@keyframes aiPulseRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes circuitDash {
  to { stroke-dashoffset: 0; }
}

/* ── KEYFRAMES CLASSIC (Khám Phá Tự Do) ─────────────────── */
@keyframes classicGlow {
  0%,100% { box-shadow: 0 0 20px rgba(205,160,50,0.3), 0 0 50px rgba(205,160,50,0.1); }
  50%      { box-shadow: 0 0 32px rgba(205,160,50,0.5), 0 0 70px rgba(205,160,50,0.18); }
}
@keyframes flickerIn {
  0%   { opacity: 0; }
  20%  { opacity: 0.9; }
  40%  { opacity: 0.6; }
  60%  { opacity: 1; }
  80%  { opacity: 0.85; }
  100% { opacity: 1; }
}
@keyframes shimmerGold {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── STEP WRAPPER ────────────────────────────────────────── */
.splash-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}
.splash-mode-step { gap: 16px; }

/* ── TIÊU ĐỀ ─────────────────────────────────────────────── */
.splash-mode-title {
  font-family: var(--font-main);
  font-size: clamp(17px, 2.8vw, 24px);
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(90deg,#fff 0%,#fff 30%,#FFD700 50%,#fff 70%,#fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerGold 4s linear infinite;
}
.splash-mode-subtitle {
  font-family: var(--font-main);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1.5px;
  text-align: center;
  margin: 0;
}

/* ── CARD CONTAINER ──────────────────────────────────────── */
.splash-mode-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 700px;
  padding: 0 12px;
}

/* ════════════════════════════════════════════════════════════
   CARD BASE — mặc định: nền đậm đủ để đọc, không trong suốt
   ════════════════════════════════════════════════════════════ */
.splash-mode-card {
  flex: 1;
  min-width: 220px;
  max-width: 290px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 22px 26px;
  border-radius: 20px;
  /* Nền tối vừa đủ — đọc được, không quá trong suốt */
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 14, 28, 0.72);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
  animation: modeCardAppear 0.55s ease both;
}
.splash-mode-card:nth-child(1) { animation-delay: 0.05s; }
.splash-mode-card:nth-child(2) { animation-delay: 0.18s; }

/* Pseudo elements — dùng riêng cho từng card ID */
.splash-mode-card::before,
.splash-mode-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}


/* ════════════════════════════════════════════════════════════
   CARD #1 — TOUR TỰ ĐỘNG  ·  HOVER: VÀNG KIM
   ════════════════════════════════════════════════════════════ */

/* Nền gradient AI (radial glow từ trên + góc phải) */
#modeCardAuto::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -5%,  rgba(255, 215, 0, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 105% 105%, rgba(255, 140, 0, 0.12) 0%, transparent 55%);
}

/* Scan line AI — dải sáng quét từ trên xuống */
#modeCardAuto::after {
  top: -40%; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 215, 0, 0.3) 15%,
    rgba(255, 215, 0, 0.95) 50%,
    rgba(255, 215, 0, 0.3) 85%,
    transparent 100%);
}

#modeCardAuto:hover::before { opacity: 1; }
#modeCardAuto:hover::after  { opacity: 1; }



#modeCardAuto:hover {
  border-color: rgba(255, 215, 0, 0.7);
  background: rgba(20, 14, 0, 0.85);
  transform: translateY(-10px) scale(1.03);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 215, 0, 0.25),
    0 0 40px rgba(255, 215, 0, 0.12),
    inset 0 1px 0 rgba(255, 215, 0, 0.12);
}

/* Icon vòng tròn — cyan glow */
#modeCardAuto:hover .splash-mode-card-icon {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 28px rgba(255, 215, 0, 0.28), inset 0 0 16px rgba(255, 215, 0, 0.06);
}
#modeCardAuto:hover .splash-mode-card-icon svg * {
  stroke: #FFD700 !important;
  fill: rgba(255, 215, 0, 0.12) !important;
}

/* Title — cyan, letter-spacing rộng, glow */
#modeCardAuto:hover .splash-mode-card-title {
  color: #FFD700;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.6), 0 0 48px rgba(255, 215, 0, 0.2);
  letter-spacing: 3.5px;
}

/* Desc — xanh nhạt */
#modeCardAuto:hover .splash-mode-card-desc {
  color: rgba(255, 240, 180, 0.88);
}

/* Badge — cyan neon */
#modeCardAuto:hover .splash-mode-card-badge {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.22);
  letter-spacing: 2.5px;
}

/* Grid overlay — lưới kỹ thuật số mờ khi hover */
#modeCardAuto:hover .splash-mode-card-grid {
  opacity: 1;
}
.splash-mode-card-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,215,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,215,0,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  border-radius: 20px;
}


/* ════════════════════════════════════════════════════════════
   CARD #2 — KHÁM PHÁ TỰ DO  ·  HOVER: VÀNG KIM
   ════════════════════════════════════════════════════════════ */

/* Nền warm sepia — vàng từ trên, nâu từ dưới */
#modeCardFree::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(255, 215, 0, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse at 0%  100%, rgba(255, 140, 0, 0.12)  0%, transparent 52%);
}

/* Đường kẻ vàng ornate ở đỉnh card */
#modeCardFree::after {
  top: 0; left: 12%; right: 12%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200, 151, 58, 0.3) 15%,
    rgba(200, 151, 58, 0.95) 40%,
    #FFD700 50%,
    rgba(200, 151, 58, 0.95) 60%,
    rgba(200, 151, 58, 0.3) 85%,
    transparent 100%);
}

#modeCardFree:hover::before { opacity: 1; }
#modeCardFree:hover::after  { opacity: 1; }

#modeCardFree:hover {
  border-color: rgba(255, 215, 0, 0.7);
  background: rgba(20, 14, 0, 0.85);
  transform: translateY(-10px) scale(1.03);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 215, 0, 0.25),
    0 0 36px rgba(255, 215, 0, 0.14),
    inset 0 1px 0 rgba(255, 215, 0, 0.12);
}

/* Icon — warm gold glow */
#modeCardFree:hover .splash-mode-card-icon {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 26px rgba(255, 215, 0, 0.28), inset 0 0 14px rgba(255, 215, 0, 0.06);
}
#modeCardFree:hover .splash-mode-card-icon svg * {
  stroke: #FFD700 !important;
  fill: rgba(255, 215, 0, 0.12) !important;
}

/* Title — vàng nâu ấm */
#modeCardFree:hover .splash-mode-card-title {
  color: #FFD700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.55), 0 0 40px rgba(255, 215, 0, 0.2);
  letter-spacing: 2.8px;
}

/* Desc — kem ấm */
#modeCardFree:hover .splash-mode-card-desc {
  color: rgba(255, 240, 180, 0.88);
}

/* Badge — đồng cổ điển */
#modeCardFree:hover .splash-mode-card-badge,
#modeCardFree:hover .splash-mode-card-badge--blue {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
  letter-spacing: 2px;
}

/* Texture giấy cũ — vân ngang mờ */
#modeCardFree:hover .splash-mode-card-texture {
  opacity: 1;
}
.splash-mode-card-texture {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 215, 0, 0.025) 3px,
    rgba(255, 215, 0, 0.025) 4px
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  border-radius: 20px;
}


/* ════════════════════════════════════════════════════════════
   ELEMENTS CHUNG — icon, title, desc, badge, back btn
   ════════════════════════════════════════════════════════════ */

.splash-mode-card--selected {
  transform: translateY(-10px) scale(1.04) !important;
}

.splash-mode-card-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
  position: relative;
  z-index: 1;
}

.splash-mode-card-title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  color: #FFD700;
  letter-spacing: 2.5px;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  position: relative;
  z-index: 1;
  transition: color 0.35s, text-shadow 0.35s, letter-spacing 0.35s;
}

.splash-mode-card-desc {
  font-family: var(--font-main);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  line-height: 1.65;
  margin: 0;
  position: relative;
  z-index: 1;
  transition: color 0.35s;
}

.splash-mode-card-badge {
  font-family: var(--font-main);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 30px;
  padding: 5px 14px;
  margin-top: 2px;
  position: relative;
  z-index: 1;
  transition: color 0.35s, background 0.35s, border-color 0.35s, box-shadow 0.35s, letter-spacing 0.35s;
}
.splash-mode-card-badge--blue {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.splash-mode-back-btn {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 8px 22px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  margin-top: 4px;
}
.splash-mode-back-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

/* ── RESPONSIVE MOBILE (<= 520px) ───────────────────────── */

@media (max-width: 520px) {

.splash-mode-cards {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
  }
  .splash-mode-card {
    min-width: unset;
    width: 100%;
    max-width: 88vw;
    padding: 20px 16px 18px;
  }
  .splash-mode-card-icon { width: 60px; height: 60px; }
  .splash-mode-card-title { font-size: 12px; letter-spacing: 2px; }
  .splash-mode-card-desc  { font-size: 10.5px; }
  .splash-mode-mode-title { letter-spacing: 2px; }
  .splash-mode-back-btn   { font-size: 10px; padding: 7px 18px; }

}