/* ========================================
   AZULA BADU — Secret Page & San Busaku
   ======================================== */

/* ── Wachtwoord Gate (oud systeem — behouden voor compatibiliteit) ── */
.secret-gate--hidden { display: none !important; }

/* ════════════════════════════════════════
   FIX #29: FLOW STEP INDICATOR
   Toont voortgang door het instapproces (scherm 2–4).
   Verborgen op de gate, zichtbaar zodra gebruiker geauthenticeerd is.
   ════════════════════════════════════════ */

.flow-steps {
  display: none; /* verborgen totdat JS het activeert */
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.flow-steps--visible {
  display: flex;
  animation: sbs-fadein 0.5s ease forwards;
}

.flow-steps__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-steps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(201,168,76,0.4);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.flow-steps__dot--active {
  background: var(--gold, #c9a84c);
  border-color: var(--gold, #c9a84c);
  transform: scale(1.25);
}

.flow-steps__dot--done {
  background: rgba(201,168,76,0.45);
  border-color: var(--gold, #c9a84c);
}

.flow-steps__label {
  font-family: var(--font-body, sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

@media (prefers-reduced-motion: reduce) {
  .flow-steps { animation: none; }
  .flow-steps__dot { transition: none; }
}

/* ════════════════════════════════════════
   SAN BUSAKU — SCHERM-SYSTEEM
   Elk scherm is standaard volledig verborgen.
   Alleen .sbs-screen--active wordt getoond.
   ════════════════════════════════════════ */

.sbs-screen {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  overflow-y: auto;
}

.sbs-screen--active {
  display: flex !important;
  animation: sbs-fadein 0.7s ease forwards;
}

@keyframes sbs-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════
   SCHERM 1 — WACHTWOORD GATE
   Cinematische ingang: groot, donker, dramatisch
   ════════════════════════════════════════ */

/* Achtergrond afbeelding */
.secret-gate__bg {
  position: absolute;
  inset: 0;
  background: var(--img-secret-gate-bg, url('../images/story/voodoo-hut.webp')) center/cover no-repeat;
  opacity: 0.25;
  filter: blur(2px) saturate(0.5);
  transform: scale(1.05);
}

/* Extra gradient overlay voor diepte */
#screen-gate::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(201,168,76,0.08) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Content wrapper */
.secret-gate__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 40px;
  max-width: 460px;
  width: 100%;
}

/* Tiki icoon — groter, gloeiend */
.secret-gate__icon {
  height: 160px;
  width: auto;
  margin: 0 auto 28px;
  display: block;
  filter: brightness(1.15) drop-shadow(0 0 18px rgba(179,146,74,0.3));
  animation: tikiFloat 4s ease-in-out infinite;
}

@keyframes tikiFloat {
  0%, 100% { transform: translateY(0); filter: sepia(1) saturate(0.6) brightness(1.3) drop-shadow(0 0 20px rgba(201,168,76,0.5)); }
  50%       { transform: translateY(-8px); filter: sepia(1) saturate(0.8) brightness(1.5) drop-shadow(0 0 32px rgba(201,168,76,0.8)); }
}

/* Gouden lijntje boven en onder de titel */
.secret-gate__content::before,
.secret-gate__content::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.6), transparent);
  margin: 0 auto;
}

.secret-gate__content::before { margin-bottom: 20px; }
.secret-gate__content::after  { margin-top: 24px; }

/* Titel */
.secret-gate__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 5vw, 38px);
  font-style: italic;
  color: #F5F1E8;
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* Ondertitel */
.secret-gate__subtitle {
  font-size: 14px;
  color: rgba(245,241,232,0.45);
  margin-bottom: 32px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Formulier */
.secret-gate__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.secret-gate__form[hidden] { display: none; }

.secret-gate__label {
  font-size: 12px;
  color: rgba(245,241,232,0.6);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Invoerveld — premium */
.secret-gate__input {
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.25);
  color: #F5F1E8;
  border-radius: 4px;
  padding: 14px 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
  outline: none;
}

.secret-gate__input:focus {
  border-color: rgba(201,168,76,0.6);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08), inset 0 0 20px rgba(201,168,76,0.04);
}

.secret-gate__input::placeholder {
  color: rgba(245,241,232,0.25);
}

/* Foutmelding */
.secret-gate__error {
  color: #e74c3c;
  font-size: 13px;
  min-height: 20px;
}

/* Gedeelde achtergrond voor andere schermen */
.sbs-bg {
  position: absolute;
  inset: 0;
  background: var(--img-secret-gate-bg, url('../images/story/voodoo-hut.webp')) center/cover no-repeat;
  opacity: 0.08;
  z-index: 0;
}

/* ════════════════════════════════════════
   SCHERM 2 — VIDEO INTRO
   ════════════════════════════════════════ */

.sbs-video-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  padding: 0 24px;
  z-index: 1;
}

.sbs-video-wrap video {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 80px rgba(201,168,76,0.12), 0 40px 80px rgba(0,0,0,0.6);
  border: 1px solid rgba(201,168,76,0.1);
}
.sbs-video-wrap video[hidden] { display: none; }
/* bediening zichtbaar (autoplay geweigerd): overslaan naar boven, niet over de balk */
.sbs-video-wrap video[controls] + .sbs-skip-btn { bottom: auto; top: 12px; }

.sbs-skip-btn {
  position: absolute;
  bottom: 20px;
  right: 44px;
  background: rgba(0,0,0,0.6);
  color: rgba(245,241,232,0.7);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 8px 20px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.sbs-skip-btn:hover {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.6);
  color: #C9A84C;
}

/* ════════════════════════════════════════
   SCHERM 3 + 4 — KAART CONTAINER
   (Registratie & Quiz)
   ════════════════════════════════════════ */

.sbs-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 24px auto;
  padding: 44px 40px;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.06),
    0 40px 80px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.04);
  max-height: 90vh;
  overflow-y: auto;
}

.sbs-card--wide {
  max-width: 640px;
}

/* Kaart gouden gloed bovenin */
.sbs-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.5), transparent);
}

.sbs-card__icon {
  height: 96px;
  width: auto;
  display: block;
  margin: 0 auto 20px;
  filter: brightness(1.15) drop-shadow(0 0 10px rgba(179,146,74,0.25));
}

.sbs-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4vw, 30px);
  font-style: italic;
  color: #C9A84C;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.sbs-card__subtitle {
  font-size: 13px;
  color: rgba(245,241,232,0.4);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.06em;
}

/* ── Registratie form secties ── */
.sbs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sbs-section {
  margin-bottom: 24px;
}

.sbs-section__label {
  font-size: 11px;
  color: rgba(201,168,76,0.5);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.btn--full { width: 100%; }

.sbs-waitlist-msg {
  text-align: center;
  padding: 32px 0 8px;
  color: rgba(201,168,76,0.85);
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
}

/* voorheen inline styles (csp); js toont via style.display */
#waitlist-msg, #voodoo-user-avatar, #voodoo-user-initials { display: none; }
#quiz-result { display: none; text-align: center; }

.sbs-section__error {
  color: #e74c3c;
  font-size: 13px;
  min-height: 20px;
  margin-top: 6px;
}

.sbs-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(245,241,232,0.7);
  cursor: pointer;
}
.sbs-consent input { margin-top: 3px; accent-color: #C9A84C; flex-shrink: 0; }
.sbs-consent a { color: #C9A84C; }
.sbs-card input[type="date"] { color-scheme: dark; }
#section-email[hidden] { display: none; }

/* Form inputs in sbs context */
.sbs-card .form-input,
.sbs-card input[type="text"],
.sbs-card input[type="date"],
.sbs-card input[type="email"],
.sbs-card input[type="tel"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #F5F1E8;
  border-radius: 6px;
  padding: 12px 16px;
  width: 100%;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.sbs-card .form-input:focus,
.sbs-card input:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.06);
}

.sbs-card .form-label {
  font-size: 12px;
  color: rgba(245,241,232,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

/* ════════════════════════════════════════
   VOODOO WELKOMST POPUP
   ════════════════════════════════════════ */

.voodoo-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.voodoo-popup--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.voodoo-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
}

.voodoo-popup__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 20px;
  padding: 48px 40px;
  background: #080808;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 80px rgba(201,168,76,0.08), 0 40px 80px rgba(0,0,0,0.8);
  animation: voodooAppear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.voodoo-popup__box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.6), transparent);
}

@keyframes voodooAppear {
  from { transform: scale(0.88) translateY(24px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Grote eigen avatar */
.voodoo-popup__user-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 3px solid rgba(201,168,76,0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 0 6px rgba(201,168,76,0.06), 0 0 60px rgba(201,168,76,0.2);
  animation: avatarGlow 3s ease infinite alternate;
}

@keyframes avatarGlow {
  from { box-shadow: 0 0 0 6px rgba(201,168,76,0.06), 0 0 40px rgba(201,168,76,0.15); }
  to   { box-shadow: 0 0 0 8px rgba(201,168,76,0.1),  0 0 70px rgba(201,168,76,0.3); }
}

.voodoo-popup__user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voodoo-popup__user-initials {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: rgba(201,168,76,0.7);
}

.voodoo-popup__name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-style: italic;
  color: #C9A84C;
  text-align: center;
  margin-bottom: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.voodoo-popup__message {
  font-size: 14px;
  color: rgba(245,241,232,0.4);
  line-height: 1.85;
  margin-bottom: 32px;
  text-align: center;
}

.voodoo-popup__btn {
  width: 100%;
}

/* ════════════════════════════════════════
   EGO QUIZ
   ════════════════════════════════════════ */

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.quiz-progress__bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(to right, rgba(201,168,76,0.6), #C9A84C);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

.quiz-progress__label {
  font-size: 11px;
  color: rgba(245,241,232,0.3);
  white-space: nowrap;
  letter-spacing: 0.08em;
}

.quiz-title {
  margin-bottom: 4px !important;
}

.quiz-question {
  font-size: 17px;
  color: #F5F1E8;
  line-height: 1.7;
  margin-bottom: 24px;
  min-height: 60px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  color: rgba(245,241,232,0.75);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.5;
}

.quiz-option-btn:hover {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.35);
  color: #F5F1E8;
  transform: translateX(4px);
}

.quiz-option-btn--selected {
  background: rgba(201,168,76,0.14);
  border-color: #C9A84C;
  color: #C9A84C;
}

.quiz-result__score {
  font-size: 18px;
  color: rgba(245,241,232,0.6);
  margin-bottom: 8px;
}

.quiz-result__score strong {
  color: #C9A84C;
  font-size: 36px;
}

.quiz-result__team {
  font-size: 16px;
  color: #F5F1E8;
  margin-bottom: 24px;
}

.quiz-result__team strong {
  color: #C9A84C;
}

.quiz-result__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(245,241,232,0.4);
  font-size: 13px;
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: #C9A84C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 768px) {
  .secret-gate__content {
    padding: 36px 24px;
  }

  .secret-gate__icon {
    height: 124px;
  }

  .sbs-card {
    padding: 32px 24px;
    margin: 16px;
    max-height: 88vh;
  }

  .sbs-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sbs-video-wrap {
    padding: 0;
  }

  .sbs-skip-btn {
    right: 16px;
  }

  .voodoo-popup__box {
    padding: 36px 24px;
  }
}
