@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b1628;
  --card: rgba(15,30,55,0.8);
  --card2: rgba(20,40,70,0.6);
  --gold: #c8a44e;
  --gold-light: #e8cc7a;
  --gold-dim: rgba(200,164,78,0.15);
  --gold-glow: rgba(200,164,78,0.08);
  --text: #f5f0e4;
  --text2: rgba(245,240,228,0.6);
  --text3: rgba(245,240,228,0.3);
  --border: rgba(200,164,78,0.1);
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.4,0,0.2,1);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle pattern overlay */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.015;
  background-image:
    repeating-linear-gradient(45deg, var(--gold) 0px, transparent 1px, transparent 30px),
    repeating-linear-gradient(-45deg, var(--gold) 0px, transparent 1px, transparent 30px);
}

/* ============ LAYOUT ============ */
.app {
  position: relative; z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 20px;
}

/* ============ HEADER ============ */
.header {
  text-align: center;
  padding: 40px 0 20px;
}

.logo {
  font-family: 'Amiri', serif;
  font-size: 32px;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
}

.logo-sub {
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ============ PROGRESS BAR ============ */
.progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 20px 0 30px;
  padding: 0 10px;
}

.prog-step {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--border);
  transition: background var(--transition);
  position: relative;
}

.prog-step.done { background: var(--gold); }
.prog-step.active { background: linear-gradient(90deg, var(--gold), var(--gold-light)); box-shadow: 0 0 8px var(--gold-glow); }

.prog-label {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* ============ STEP CONTAINER ============ */
.step {
  display: none;
  animation: stepIn 0.5s ease both;
}

.step.active { display: block; }

@keyframes stepIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ============ FORM ELEMENTS ============ */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 600;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  transition: border-color 0.3s;
  outline: none;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.field input::placeholder, .field textarea::placeholder {
  color: var(--text3);
}

.field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(200,164,78,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field select option { background: var(--card); color: var(--text); }

/* Choice cards */
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.choices.three { grid-template-columns: 1fr 1fr 1fr; }

.choice {
  padding: 16px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.choice:hover { border-color: rgba(200,164,78,0.3); background: var(--card2); }

.choice.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 20px var(--gold-glow);
}

.choice-icon { font-size: 28px; margin-bottom: 6px; }
.choice-label { font-size: 13px; font-weight: 600; color: var(--text); }
.choice-desc { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* Photo upload */
.photo-upload {
  width: 100%;
  aspect-ratio: 1;
  max-width: 160px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  background: var(--card);
}

.photo-upload:hover { border-color: var(--gold); }
.photo-upload.has-photo { border-style: solid; border-color: var(--gold); }
.photo-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-upload .ph-icon { font-size: 28px; margin-bottom: 4px; }
.photo-upload .ph-text { font-size: 11px; color: var(--text3); }

.photo-upload-rect {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 14px;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  background: var(--card);
  margin-bottom: 18px;
}

.photo-upload-rect:hover { border-color: var(--gold); }
.photo-upload-rect.has-photo { border-style: solid; border-color: var(--gold); }
.photo-upload-rect img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Video recorder area */
.recorder-area {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #000;
  margin-bottom: 16px;
}

.recorder-area video {
  width: 100%; height: 100%; object-fit: cover;
}

.recorder-area .cam-mirror { transform: scaleX(-1); }

/* Decor preview overlays on recorder */
.rec-deco {
  position: absolute; top: 0; left: 0; width: 100%; height: 40%;
  pointer-events: none; z-index: 2; overflow: hidden; opacity: 0.5;
}
.rec-deco svg { width: 100%; height: 100%; }

/* Lottie decor color selector */
.decor-color-row { display: flex; gap: 10px; margin-bottom: 14px; }
.decor-color-opt {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 0; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: var(--card);
  font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.decor-color-opt.active { border-color: var(--gold); background: rgba(200,164,78,0.08); }
.decor-color-opt .swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
}
.decor-color-opt.none-opt { color: var(--text3); font-weight: 500; }

.decor-sliders { margin-top: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.decor-slider-row {
  display: flex; align-items: center; gap: 12px;
}
.decor-slider-row label {
  font-size: 13px; opacity: 0.7; min-width: 60px; white-space: nowrap;
}
.decor-slider-row input[type=range] {
  flex: 1; height: 4px; accent-color: var(--gold);
  -webkit-appearance: none; appearance: none;
  background: var(--border); border-radius: 2px; outline: none;
}
.decor-slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gold); cursor: pointer;
  box-shadow: 0 0 8px var(--gold-glow);
}
.decor-slider-val {
  font-size: 13px; font-weight: 600; color: var(--gold);
  min-width: 40px; text-align: right;
}

.rec-controls-bar {
  position: absolute; bottom: 14px; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; align-items: center; gap: 14px;
}
#playbackControlsBar .vid-redo-btn {
  padding: 10px 24px; border-radius: 100px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.4); background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px); color: #fff; cursor: pointer;
  transition: all 0.3s;
}
#playbackControlsBar .vid-redo-btn:hover { background: rgba(0,0,0,0.7); }

.vid-preview-bar {
  display: flex; justify-content: center; gap: 10px;
}
.vid-preview-bar button {
  padding: 10px 20px; border-radius: 100px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--card);
  color: var(--text2); cursor: pointer; transition: all 0.3s;
}
.vid-preview-bar button:hover {
  background: var(--gold); color: #1a1a1a; border-color: var(--gold);
}

.rec-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.rec-circle .inner {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #ff3b30;
  transition: all 0.3s;
}

.rec-circle.recording .inner {
  width: 20px; height: 20px;
  border-radius: 6px;
}

.rec-timer {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  display: none;
}

.rec-timer.show { display: block; }

.rec-flip {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.import-or {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin: 12px 0;
}

.import-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.import-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Music cards */
.music-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.music-card:hover { border-color: rgba(200,164,78,0.3); }
.music-card.selected { border-color: var(--gold); background: var(--gold-dim); }
.music-icon { font-size: 24px; flex-shrink: 0; }
.music-info { flex: 1; }
.music-name { font-size: 14px; font-weight: 600; }
.music-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.music-credit { font-size: 10px; color: var(--text3); opacity: 0.6; margin-top: 1px; font-style: italic; }
.music-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.music-badge.free { background: rgba(0,184,148,0.15); color: #00b894; }
.music-badge.premium { background: var(--gold-dim); color: var(--gold); }

.music-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.music-play:hover { background: var(--gold); color: #1a1200; }

@keyframes eqBar {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Doua cards */
.doua-card {
  padding: 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.doua-card:hover { border-color: rgba(200,164,78,0.3); }
.doua-card.selected { border-color: var(--gold); background: var(--gold-dim); }
.doua-arabic { font-family: 'Amiri', serif; font-size: 22px; color: var(--gold); direction: rtl; margin-bottom: 6px; }
.doua-translit { font-size: 12px; color: var(--text3); font-style: italic; margin-bottom: 4px; }
.doua-fr { font-size: 13px; color: var(--text2); }

/* ============ BUTTONS ============ */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-bottom: 30px;
}

.btn {
  flex: 1;
  padding: 15px 20px;
  border-radius: 14px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #1a1200;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text2);
}

.btn-secondary:hover { border-color: var(--gold); }

/* Optional toggle */
.optional-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.optional-toggle.on { border-color: var(--gold); background: var(--gold-dim); }

.toggle-switch {
  width: 42px; height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.3s;
}

.optional-toggle.on .toggle-switch { background: var(--gold); }

.toggle-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.3s;
}

.optional-toggle.on .toggle-dot { transform: translateX(18px); }

.toggle-text { font-size: 14px; font-weight: 600; }

.gift-options { display: none; }
.gift-options.show { display: block; }

/* ============ PREVIEW / RECIPIENT VIEW ============ */
.preview-phone {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 9/16;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.prev-scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px 24px;
  opacity: 0; transition: opacity 0.8s;
  pointer-events: none;
  text-align: center;
}

.prev-scene.on { opacity: 1; pointer-events: all; }

/* Style backgrounds */
.preview-phone.luxe { background: linear-gradient(170deg, #1a1400, #0d0b00, #1a1200); }
.preview-phone.festif { background: linear-gradient(170deg, #2d1b4e, #1a0d30, #2d1b4e); }
.preview-phone.moderne { background: #fafaf8; }

/* Preview typography overrides */
.preview-phone.festif .pv-c1 { color: #fd79a8 !important; }
.preview-phone.festif .pv-c2 { color: rgba(253,203,110,0.8) !important; }
.preview-phone.festif .pv-c3 { color: rgba(253,121,168,0.4) !important; }
.preview-phone.moderne .pv-c1 { color: #1a1a1a !important; }
.preview-phone.moderne .pv-c2 { color: #00b894 !important; }
.preview-phone.moderne .pv-c3 { color: rgba(0,0,0,0.3) !important; }

.pv-c1 { color: var(--gold); }
.pv-c2 { color: var(--text2); }
.pv-c3 { color: var(--text3); }

.pv-arabic { font-family: 'Amiri', serif; direction: rtl; }
.pv-title { font-family: 'Cormorant Garamond', serif; }

/* Recipient photo */
.pv-photo {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--gold-dim);
}

.pv-sender-photo {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 12px;
  border: 2px solid var(--gold-dim);
}

/* Open button */
.pv-open-btn {
  margin-top: 24px;
  padding: 14px 40px;
  border-radius: 100px;
  border: 1.5px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,164,78,0.2); }
  50% { box-shadow: 0 0 0 10px rgba(200,164,78,0); }
}

@keyframes handFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* P2 — envelope heartbeat + mini photo bubble */
.pv2-envelope-wrap {
  position: relative;
  cursor: pointer;
  display: inline-block;
}
.pv2-envelope {
  font-size: 110px;
  display: block;
  animation: envelopeBeat 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(200,164,78,0.3));
}
@keyframes envelopeBeat {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.12); }
  30%  { transform: scale(1); }
  45%  { transform: scale(1.08); }
  60%  { transform: scale(1); }
  100% { transform: scale(1); }
}
.pv2-mini-photo {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  animation: miniBubblePop .6s ease both .3s;
}
@keyframes miniBubblePop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes audioBar {
  0%,100% { height: 8px; }
  50% { height: 35px; }
}

/* Audio bubble with photo */
.pv-audio-bubble {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 3px solid var(--gold-dim);
  overflow: hidden;
  animation: audioPulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(200,164,78,0.4);
}
@keyframes audioPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(200,164,78,0.5); }
  50%  { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(200,164,78,0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(200,164,78,0); }
}

/* Thank you WhatsApp button */
.pv-thank-btn {
  margin-top: 28px;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  background: #25D366;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  animation: fadeUp .8s 1s ease both;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.pv-thank-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

/* P7 thank you recording views */
#pvThankChoiceView, #pvThankAudioView, #pvThankVideoView, #pvThankDoneView {
  flex-direction: column;
  align-items: center;
}
#pvThankAudioView .pv-thank-btn, #pvThankVideoView .pv-thank-btn {
  min-width: 120px;
}

/* P3 Continue button for text messages */
.pv-continue-btn {
  margin-top: 24px;
  padding: 10px 32px;
  border-radius: 100px;
  border: 1.5px solid var(--gold-dim);
  background: transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  animation: fadeUp .6s ease both;
  transition: all 0.3s;
}
.pv-continue-btn:hover {
  background: var(--gold);
  color: #1a1a1a;
  border-color: var(--gold);
}

/* Video in preview */
.pv-video-frame {
  width: 85%;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.pv-video-frame video { width: 100%; height: 100%; object-fit: cover; }

/* Hand animation */
.pv-hand {
  font-size: 80px;
  transition: all 1s cubic-bezier(0.34,1.56,0.64,1);
}

.pv-hand.open { transform: scale(1.3) rotate(10deg); }

/* Amount reveal */
.pv-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px;
  font-weight: 700;
  margin-top: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.pv-amount.show { opacity: 1; transform: scale(1); }

/* Confetti */
.pv-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pv-conf-piece { position: absolute; top: -10px; animation: confDrop linear forwards; }
@keyframes confDrop { 0%{transform:translateY(0) rotate(0);opacity:1} 100%{transform:translateY(800px) rotate(720deg);opacity:0} }

/* Card souvenir in preview */
.pv-card {
  width: 85%; 
  padding: 28px 20px;
  border-radius: 16px;
  border: 1px solid var(--gold-dim);
  background: var(--card);
  text-align: center;
}

.preview-phone.festif .pv-card { background: rgba(45,27,78,0.8); border-color: rgba(253,121,168,0.2); }
.preview-phone.moderne .pv-card { background: #fff; border-color: rgba(0,0,0,0.06); }

/* P1 layout — spread elements across full height */
.pv1-layout { justify-content: space-evenly !important; padding: 10% 20px !important; }

/* Golden glow pulse on Arabic title */
.pv-glow {
  text-shadow:
    0 0 20px rgba(200,164,78,0.4),
    0 0 60px rgba(200,164,78,0.15);
  animation: fadeUp .8s ease both, glowPulse 3s ease-in-out 1s infinite !important;
}
@keyframes glowPulse {
  0%,100% { text-shadow: 0 0 20px rgba(200,164,78,0.4), 0 0 60px rgba(200,164,78,0.15); }
  50% { text-shadow: 0 0 30px rgba(200,164,78,0.7), 0 0 80px rgba(200,164,78,0.3), 0 0 120px rgba(200,164,78,0.1); }
}

/* Shimmer sweep on gold text */
.pv-shimmer {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 40%, #fff 50%, var(--gold-light) 60%, var(--gold) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp .8s ease both, shimmerSweep 3s ease-in-out 1.5s infinite !important;
}
@keyframes shimmerSweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Theme overrides for shimmer colors */
.preview-phone.festif .pv-shimmer {
  background: linear-gradient(90deg, #fd79a8 0%, #fdcb6e 40%, #fff 50%, #fdcb6e 60%, #fd79a8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.preview-phone.moderne .pv-shimmer {
  background: linear-gradient(90deg, #00b894 0%, #55efc4 40%, #fff 50%, #55efc4 60%, #00b894 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.preview-phone.festif .pv-glow {
  text-shadow: 0 0 20px rgba(253,121,168,0.4), 0 0 60px rgba(253,121,168,0.15);
}
.preview-phone.moderne .pv-glow {
  text-shadow: 0 0 20px rgba(0,184,148,0.4), 0 0 60px rgba(0,184,148,0.15);
}

/* Doua screen */
.pv-doua-arabic {
  font-family: 'Amiri', serif;
  font-size: 34px;
  direction: rtl;
  line-height: 1.6;
}

.pv-doua-fr {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.6;
  margin-top: 16px;
}

.pv-doua-hands {
  font-size: 90px;
  margin-top: 28px;
  animation: douaGlow 3s ease-in-out infinite;
}

/* Doua hands glow — Luxe (gold) */
.preview-phone.luxe .pv-doua-hands {
  filter: drop-shadow(0 0 15px rgba(200,164,78,0.5)) drop-shadow(0 0 40px rgba(200,164,78,0.25));
}
@keyframes douaGlowLuxe {
  0%,100% { filter: drop-shadow(0 0 15px rgba(200,164,78,0.5)) drop-shadow(0 0 40px rgba(200,164,78,0.25)); }
  50%     { filter: drop-shadow(0 0 25px rgba(200,164,78,0.7)) drop-shadow(0 0 60px rgba(200,164,78,0.4)); }
}
.preview-phone.luxe .pv-doua-hands { animation-name: douaGlowLuxe; }

/* Doua hands glow — Ramadan (warm gold/yellow) */
.preview-phone.ramadan .pv-doua-hands {
  filter: drop-shadow(0 0 15px rgba(232,204,122,0.5)) drop-shadow(0 0 40px rgba(232,204,122,0.25));
}
@keyframes douaGlowRamadan {
  0%,100% { filter: drop-shadow(0 0 15px rgba(232,204,122,0.5)) drop-shadow(0 0 40px rgba(232,204,122,0.25)); }
  50%     { filter: drop-shadow(0 0 25px rgba(232,204,122,0.7)) drop-shadow(0 0 60px rgba(232,204,122,0.4)); }
}
.preview-phone.ramadan .pv-doua-hands { animation-name: douaGlowRamadan; }

/* Doua hands glow — Festif (pink/purple) */
.preview-phone.festif .pv-doua-hands {
  filter: drop-shadow(0 0 15px rgba(253,121,168,0.5)) drop-shadow(0 0 40px rgba(253,121,168,0.25));
}
@keyframes douaGlowFestif {
  0%,100% { filter: drop-shadow(0 0 15px rgba(253,121,168,0.5)) drop-shadow(0 0 40px rgba(253,121,168,0.25)); }
  50%     { filter: drop-shadow(0 0 25px rgba(253,121,168,0.7)) drop-shadow(0 0 60px rgba(253,121,168,0.4)); }
}
.preview-phone.festif .pv-doua-hands { animation-name: douaGlowFestif; }

/* Doua hands glow — Moderne (green) */
.preview-phone.moderne .pv-doua-hands {
  filter: drop-shadow(0 0 15px rgba(0,184,148,0.5)) drop-shadow(0 0 40px rgba(0,184,148,0.25));
}
@keyframes douaGlowModerne {
  0%,100% { filter: drop-shadow(0 0 15px rgba(0,184,148,0.5)) drop-shadow(0 0 40px rgba(0,184,148,0.25)); }
  50%     { filter: drop-shadow(0 0 25px rgba(0,184,148,0.7)) drop-shadow(0 0 60px rgba(0,184,148,0.4)); }
}
.preview-phone.moderne .pv-doua-hands { animation-name: douaGlowModerne; }

/* Gift mini-game */
.pv-gift-game {
  position: absolute;
  font-size: 80px;
  cursor: pointer;
  transition: left 0.4s cubic-bezier(0.34,1.56,0.64,1), top 0.4s cubic-bezier(0.34,1.56,0.64,1);
  user-select: none;
  -webkit-user-select: none;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

@keyframes giftFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes giftDodge {
  0% { transform: scale(1); }
  25% { transform: scale(1.3) rotate(-15deg); }
  50% { transform: scale(0.85) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes giftShake {
  0%, 100% { transform: rotate(0); }
  12% { transform: rotate(14deg); }
  25% { transform: rotate(-14deg); }
  37% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  62% { transform: rotate(6deg); }
  75% { transform: rotate(-6deg); }
}

@keyframes giftOpen {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.6) rotate(15deg); opacity: 0.9; }
  100% { transform: scale(2.5) rotate(40deg); opacity: 0; }
}

/* Game mode picker */
.game-mode-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.3s;
}
.game-mode-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.game-mode-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Maze game */
.maze-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.maze-arrow-btn:active {
  background: var(--gold-dim);
}

/* ============ CROP MODAL ============ */
.crop-modal{position:fixed;inset:0;z-index:999;background:rgba(0,0,0,0.85);display:flex;align-items:center;justify-content:center;padding:20px}
.crop-modal-inner{width:100%;max-width:360px;background:var(--card);border:1px solid var(--border);border-radius:20px;padding:20px;backdrop-filter:blur(20px)}
.crop-viewport{width:100%;overflow:hidden;position:relative;background:#000;border-radius:14px;cursor:grab;touch-action:none;margin-bottom:14px}
.crop-viewport:active{cursor:grabbing}
.crop-viewport.crop-round{aspect-ratio:1;max-width:260px;margin:0 auto 14px}
.crop-viewport.crop-rect{aspect-ratio:4/3}
.crop-viewport img{position:absolute;user-select:none;-webkit-user-drag:none;will-change:transform}
.crop-guide-circle{position:absolute;inset:8%;border-radius:50%;box-shadow:0 0 0 9999px rgba(0,0,0,0.5);border:2px solid var(--gold);pointer-events:none;z-index:2}
.crop-guide-rect{position:absolute;inset:0;border:2px solid var(--gold);border-radius:14px;pointer-events:none;z-index:2;box-shadow:0 0 20px var(--gold-glow)}
.crop-zoom-row{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.crop-range{flex:1;-webkit-appearance:none;appearance:none;height:4px;border-radius:2px;background:var(--border);outline:none}
.crop-range::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:var(--gold);cursor:pointer;box-shadow:0 0 8px var(--gold-glow)}
.crop-btns{display:flex;gap:8px;justify-content:center}

/* ============ VIDEO PREVIEW (in-place playback) ============ */
#vidPlayback { position: absolute; top: 0; left: 0; z-index: 1; }

/* ============ HIDDEN FILE INPUTS ============ */
input[type="file"] { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 400px) {
  .choices.three { grid-template-columns: 1fr; }
  .step-title { font-size: 22px; }
}
