/* ==========================================================================
   Dreamspell Creatiekaarten – Frontend Styling
   Palet: donker steen #0f0c1a · goud #c9a84c · jade #3d7a5e · perkament #e8d5b0
   ========================================================================== */

/* ── Reset & container ─────────────────────────────────────────────────── */
.ck-wrap {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #0f0c1a;
  color: #e8d5b0;
  font-family: Georgia, 'Times New Roman', serif;
  overflow: hidden;
}

.ck-wrap *, .ck-wrap *::before, .ck-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Stappen ────────────────────────────────────────────────────────────── */
.ck-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ck-step--active,
.ck-step:not([hidden]) {
  opacity: 1;
  pointer-events: all;
  position: relative;
  min-height: 100vh;
}

/* ── Sterren canvas ─────────────────────────────────────────────────────── */
.ck-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Nevelwolken ────────────────────────────────────────────────────────── */
.ck-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.10;
  z-index: 0;
  pointer-events: none;
  animation: ck-drift 20s ease-in-out infinite alternate;
}
.ck-nebula--a {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6b2d0e, transparent);
  top: -150px; left: -150px;
}
.ck-nebula--b {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #1a4a2e, transparent);
  bottom: -120px; right: -100px;
  animation-direction: alternate-reverse;
  animation-duration: 26s;
}

@keyframes ck-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* ── Stap 1: Content ────────────────────────────────────────────────────── */
.ck-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  max-width: 560px;
  width: 100%;
  margin: auto;
}

.ck-temple-icon svg {
  width: 72px;
  height: 54px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
}

.ck-main-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #c9a84c;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
}

.ck-subtitle {
  font-size: 1rem;
  color: #b8a888;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ── Code form ──────────────────────────────────────────────────────────── */
.ck-code-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

.ck-label {
  font-size: 0.85rem;
  color: #c9a84c;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  align-self: flex-start;
}

.ck-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 6px;
  color: #e8d5b0;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ck-input:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 12px rgba(201,168,76,0.25);
}
.ck-input::placeholder { color: rgba(232,213,176,0.3); }

/* ── Knoppen ────────────────────────────────────────────────────────────── */
.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 6px;
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.ck-btn:active { transform: scale(0.97); }

.ck-btn--gold {
  background: linear-gradient(135deg, #c9a84c, #a07828);
  color: #1a1208;
  font-weight: bold;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}
.ck-btn--gold:hover { box-shadow: 0 6px 28px rgba(201,168,76,0.55); transform: translateY(-2px); }

.ck-btn--outline {
  background: transparent;
  color: #c9a84c;
  border: 1px solid rgba(201,168,76,0.5);
}
.ck-btn--outline:hover { border-color: #c9a84c; box-shadow: 0 0 14px rgba(201,168,76,0.2); }

/* ── Error & Loading ────────────────────────────────────────────────────── */
.ck-error-msg {
  margin-top: 12px;
  color: #e07070;
  font-size: 0.9rem;
  background: rgba(224,112,112,0.1);
  border: 1px solid rgba(224,112,112,0.3);
  border-radius: 4px;
  padding: 10px 16px;
  width: 100%;
  text-align: center;
}

.ck-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}
.ck-spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(201,168,76,0.2);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: ck-spin 0.8s linear infinite;
}
@keyframes ck-spin { to { transform: rotate(360deg); } }

/* ── Stap 3: Maya ritueel ────────────────────────────────────────────────── */
.ck-ritual-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
}

.ck-golden-border {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(201,168,76,0.1), inset 0 0 20px rgba(201,168,76,0.05);
}

.ck-ritual-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  max-width: 540px;
  width: 100%;
  gap: 0;
}

.ck-temple-large svg {
  width: 140px;
  height: 105px;
  filter: drop-shadow(0 0 16px rgba(201,168,76,0.4));
  margin-bottom: 32px;
}

.ck-ritual-text {
  margin-bottom: 44px;
}
.ck-ritual-text p {
  font-size: 1.1rem;
  color: #d4be90;
  line-height: 2;
  opacity: 0;
}

/* Seal button ─────────────────────────────────────────────────────────── */
.ck-btn--seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 20px 16px;
  background: radial-gradient(circle at center, rgba(61,122,94,0.25), rgba(15,12,26,0.8));
  border: 2px solid rgba(201,168,76,0.6);
  border-radius: 50%;
  width: 110px;
  height: 110px;
  color: #c9a84c;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(201,168,76,0.2), inset 0 0 16px rgba(61,122,94,0.15);
  transition: box-shadow 0.3s;
  opacity: 0;
}
.ck-seal-glyph svg { width: 42px; height: 42px; }
.ck-seal-label { font-size: 0.75rem; letter-spacing: 0.15em; }

/* ── Kaartreveal ────────────────────────────────────────────────────────── */
.ck-card-reveal-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  width: 100%;
  min-height: 100vh;
  justify-content: center;
  gap: 24px;
}

.ck-card-label {
  font-size: 0.85rem;
  color: #c9a84c;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ck-card-scene {
  perspective: 1200px;
  width: 320px;
  height: 440px;
}

.ck-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: none;
}

.ck-card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.ck-card-back {
  background: linear-gradient(160deg, #1e1228 0%, #0f0c1a 100%);
  border: 1px solid rgba(201,168,76,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 20px rgba(201,168,76,0.1);
}

.ck-card-back-pattern svg { width: 100px; height: 140px; opacity: 0.7; }

.ck-card-front {
  background: linear-gradient(160deg, #1c1628 0%, #0d1a14 60%, #0f0c1a 100%);
  border: 1px solid rgba(61,122,94,0.5);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 20px rgba(61,122,94,0.15);
}

.ck-card-front-inner {
  flex: 1;
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.ck-card-title {
  font-size: clamp(0.75rem, 3vw, 1.1rem);
  color: #c9a84c;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
}

.ck-card-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5), transparent);
  margin: 2px 0;
}

.ck-field { display: flex; flex-direction: column; gap: 5px; }
.ck-field-label {
  font-size: 0.7rem;
  color: #3d7a5e;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ck-field p, .ck-sum-field p {
  font-size: 0.88rem;
  color: #d4be90;
  line-height: 1.55;
}

.ck-card-front-footer {
  height: 14px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
}

.ck-card-action {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Stap 7: Samenvatting ───────────────────────────────────────────────── */
.ck-summary-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 48px;
  width: 100%;
  gap: 28px;
}

/* ── Terugkijk-melding ──────────────────────────────────────────────────── */
.ck-replay-notice {
  width: 100%;
  max-width: 860px;
  padding: 11px 20px;
  background: rgba(61,122,94,0.12);
  border: 1px solid rgba(61,122,94,0.35);
  border-radius: 6px;
  color: #7ec9a0;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-align: center;
}

.ck-summary-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #c9a84c;
  letter-spacing: 0.08em;
  text-align: center;
}

.ck-cards-pair {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 860px;
}

.ck-summary-card {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  background: linear-gradient(160deg, #1c1628 0%, #0d1a14 100%);
  border: 1px solid rgba(61,122,94,0.4);
  border-radius: 10px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(40px);
}

.ck-summary-num {
  font-size: 2rem;
  color: rgba(201,168,76,0.25);
  font-style: italic;
  line-height: 1;
  text-align: center;
}

.ck-sum-title {
  font-size: clamp(0.8rem, 2.5vw, 1.15rem);
  color: #c9a84c;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
}

.ck-sum-field { display: flex; flex-direction: column; gap: 5px; }

.ck-closing-text {
  text-align: center;
  font-size: 0.95rem;
  color: #b8a888;
  line-height: 1.8;
  max-width: 600px;
}

.ck-final-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .ck-card-scene { width: 280px; height: 390px; }
  .ck-temple-large svg { width: 100px; height: 75px; }
  .ck-golden-border { inset: 10px; }
  .ck-ritual-content { padding: 40px 16px; }
  .ck-cards-pair { flex-direction: column; align-items: center; }
  .ck-summary-card { min-width: unset; width: 100%; max-width: 100%; }
  .ck-final-actions { flex-direction: column; width: 100%; max-width: 360px; }
  .ck-btn { width: 100%; }
}
