:root {
  --wine: #4a1628;
  --wine-deep: #2d0e1a;
  --wine-dark: #1a0810;
  --wine-soft: #6b2039;
  --rose: #d4a5a5;
  --rose-soft: #e8c9c9;
  --rose-dust: #f5e1e1;
  --gold: #c9a96e;
  --gold-bright: #e4cfa0;
  --gold-soft: #f2e2b8;
  --gold-deep: #8a6f3f;
  --cream: #faf5ef;
  --ink: #1a0d14;

  --ease-silk: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-velvet: cubic-bezier(0.65, 0, 0.35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--wine-dark);
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body { position: relative; }

/* ============ STAGE ============ */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(107, 32, 57, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse at center, var(--wine-deep) 0%, var(--wine-dark) 70%, #000 100%);
  overflow: hidden;
  pointer-events: none;
}

.bokeh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

.bokeh-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), transparent 70%);
  filter: blur(10px);
  animation: wsc-float 9s ease-in-out infinite;
}

@keyframes wsc-float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  50% { transform: translate(20px, -30px) scale(1.2); opacity: 0.5; }
}

.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 110, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(212, 165, 165, 0.03) 1px, transparent 1px);
  background-size: 80px 80px, 100px 100px;
  pointer-events: none;
  z-index: 1;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  position: relative;
  z-index: 2;
}

/* ============ HERO ============ */
.hero {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 20px;
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.hero-mark::before, .hero-mark::after {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(48px, 11vw, 72px);
  line-height: 1;
  color: var(--cream);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(18px, 4.5vw, 22px);
  color: var(--gold-bright);
  margin-bottom: 22px;
  font-weight: 400;
}

.intro {
  font-size: 14.5px;
  color: var(--rose-soft);
  opacity: 0.85;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============ CARD ============ */
.card {
  background:
    linear-gradient(180deg, rgba(107, 32, 57, 0.18) 0%, rgba(45, 14, 26, 0.35) 100%);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(201, 169, 110, 0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 50px -25px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-bright) 50%, var(--gold) 70%, transparent);
  opacity: 0.5;
}

.step-num {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.step-num-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine-deep) 0%, var(--wine) 100%);
  border: 1px solid rgba(201, 169, 110, 0.4);
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(201, 169, 110, 0.15);
  flex-shrink: 0;
}

.step-num-circle--sm {
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ============ NAME INPUT (NR / NS) ============ */
.name-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  padding: 0.7rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  margin-top: 4px;
}

.name-input::placeholder {
  color: rgba(245,225,225,0.28);
}

.name-input:focus {
  border-color: rgba(201,169,110,0.55);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.08);
}

.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 5.5vw, 28px);
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 6px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.step-subtitle {
  font-size: 13.5px;
  color: var(--rose-soft);
  opacity: 0.7;
  margin-bottom: 20px;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
}

/* ============ PROMPT BOX ============ */
.prompt-box {
  background:
    linear-gradient(180deg, rgba(201, 169, 110, 0.10) 0%, rgba(201, 169, 110, 0.04) 100%);
  border-left: 2px solid var(--gold);
  padding: 14px 44px 14px 16px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--gold-soft);
  line-height: 1.45;
  position: relative;
  min-height: 52px;
}

.prompt-text {
  display: block;
  transition: opacity 0.2s;
}

.prompt-refresh {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.25);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-silk);
  font-size: 14px;
  color: var(--gold-bright);
}

.prompt-refresh:hover, .prompt-refresh:active {
  background: var(--gold);
  color: var(--wine-deep);
  transform: translateY(-50%) rotate(180deg);
}

/* ============ TEXTAREA ============ */
textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  border: 1px solid rgba(228, 207, 160, 0.20);
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.20);
  resize: vertical;
  transition: all 0.3s var(--ease-silk);
  line-height: 1.55;
}

textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.30);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

textarea::placeholder {
  color: var(--rose);
  font-style: italic;
  opacity: 0.55;
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--gold);
  opacity: 0.55;
  margin-top: 6px;
  letter-spacing: 0.06em;
  font-family: 'Manrope', sans-serif;
}

/* ============ PHOTO UPLOAD ============ */
.photo-upload {
  position: relative;
  border: 1.5px dashed rgba(201, 169, 110, 0.35);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s var(--ease-silk);
  background:
    linear-gradient(135deg, rgba(201, 169, 110, 0.06) 0%, rgba(74, 22, 40, 0.15) 100%);
  margin-bottom: 12px;
}

.photo-upload:hover {
  border-color: var(--gold);
  background:
    linear-gradient(135deg, rgba(201, 169, 110, 0.12) 0%, rgba(74, 22, 40, 0.25) 100%);
  box-shadow: 0 0 30px -10px rgba(201, 169, 110, 0.4);
}

.photo-upload.has-image {
  border-color: var(--gold);
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
  -webkit-appearance: none;
  font-size: 16px;
}

.photo-upload-placeholder {
  pointer-events: none;
}

.photo-upload.has-image .photo-upload-placeholder {
  display: none;
}

.photo-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--gold);
  opacity: 0.8;
}

.photo-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--cream);
  margin-bottom: 6px;
}

.photo-hint {
  font-size: 12px;
  color: var(--rose-soft);
  opacity: 0.6;
  letter-spacing: 0.02em;
}

.photo-preview {
  display: none;
  width: 100%;
  position: relative;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  overflow: hidden;
}

.photo-upload.has-image .photo-preview {
  display: block;
}

.photo-preview img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 3;
  background: rgba(26, 13, 20, 0.85);
  color: var(--gold-bright);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: all 0.3s;
}

.photo-remove:hover {
  background: var(--wine);
  transform: rotate(90deg);
}

/* ============ FINAL MESSAGE ============ */
.final-msg {
  background:
    linear-gradient(135deg, rgba(74, 22, 40, 0.55) 0%, rgba(45, 14, 26, 0.65) 100%);
  border-color: rgba(201, 169, 110, 0.35);
}

.final-msg::before { height: 3px; opacity: 0.85; }

.final-msg .step-num,
.final-msg .step-title { color: var(--gold-bright); }

.final-msg .step-num-circle {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--wine-deep);
  border-color: var(--gold-bright);
}

.final-msg .step-subtitle { color: var(--rose-soft); opacity: 0.85; }

.final-msg textarea {
  background: rgba(0, 0, 0, 0.30);
  border-color: rgba(228, 207, 160, 0.30);
}

.final-msg textarea:focus {
  border-color: var(--gold-bright);
  background: rgba(0, 0, 0, 0.40);
  box-shadow: 0 0 0 3px rgba(228, 207, 160, 0.18);
}

.final-msg .prompt-box {
  background: rgba(201, 169, 110, 0.18);
  color: var(--gold-bright);
}

/* ============ OPTIONS ============ */
.options-card {
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(201, 169, 110, 0.20);
  backdrop-filter: none;
}

.options-card::before { display: none; }

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
}

.option-row:last-child { border-bottom: none; }

.option-label {
  font-size: 14.5px;
  color: var(--cream);
  font-weight: 500;
}

.option-label small {
  display: block;
  font-size: 12px;
  opacity: 0.6;
  margin-top: 3px;
  font-weight: 400;
  color: var(--rose-soft);
  font-style: italic;
}

/* Toggle */
.toggle {
  position: relative;
  width: 48px; height: 26px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s var(--ease-silk);
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--rose-soft);
  border-radius: 50%;
  transition: all 0.3s var(--ease-silk);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.toggle.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(201, 169, 110, 0.4);
}

.toggle.active::after {
  background: var(--wine-deep);
  transform: translateX(22px);
}

/* ============ SUBMIT ============ */
.submit-btn {
  width: 100%;
  padding: 20px 28px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-soft) 100%);
  color: var(--wine-deep);
  border: none;
  border-radius: 100px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 28px;
  box-shadow:
    0 12px 32px rgba(201, 169, 110, 0.35),
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  transition: all 0.4s var(--ease-silk);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.8s var(--ease-velvet);
}

.submit-btn:hover, .submit-btn:active {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(201, 169, 110, 0.45),
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.submit-btn:hover::before, .submit-btn:active::before { left: 100%; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.submit-btn .icon { display: inline-block; margin-right: 10px; font-size: 16px; }

/* ============ RESULT MODAL ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: wsc-fadeIn 0.4s;
}

.modal-overlay.active { display: flex; }

@keyframes wsc-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background:
    radial-gradient(ellipse at top, rgba(107, 32, 57, 0.6) 0%, transparent 60%),
    linear-gradient(180deg, var(--wine-deep) 0%, var(--wine-dark) 100%);
  border: 1px solid rgba(201, 169, 110, 0.30);
  border-radius: 24px;
  padding: 44px 28px 32px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
  animation: wsc-modalRise 0.6s var(--ease-silk);
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright), var(--gold), transparent);
}

@keyframes wsc-modalRise {
  from { opacity: 0; transform: translateY(30px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--wine-deep);
  box-shadow:
    0 0 30px rgba(228, 207, 160, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.modal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  color: var(--cream);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.modal > p {
  color: var(--rose-soft);
  opacity: 0.85;
  font-size: 14.5px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.link-box {
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.link-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--gold-bright);
  font-family: 'Manrope', sans-serif;
  outline: none;
  min-width: 0;
}

.link-copy-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--wine-deep);
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.link-copy-btn:active { transform: scale(0.96); }

.share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.share-btn {
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.share-btn:active { transform: scale(0.96); }
.share-wa { background: #25D366; color: white; }
.share-native { background: #5a5a6e; color: white; }

/* ============ LOADER ============ */
.loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 8, 0.90);
  backdrop-filter: blur(10px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.loader-overlay.active { display: flex; }

.loader {
  width: 56px; height: 56px;
  border: 2px solid rgba(201, 169, 110, 0.15);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: wsc-spin 0.9s linear infinite;
  box-shadow: 0 0 30px rgba(201, 169, 110, 0.2);
}

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

.loader-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--gold-bright);
  font-size: 19px;
  letter-spacing: 0.02em;
}

/* ============ FOOTER ============ */
.footer-note {
  text-align: center;
  margin-top: 36px;
  font-size: 13px;
  color: var(--rose-soft);
  opacity: 0.6;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.6;
}

.footer-note a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px dotted var(--gold);
  font-style: normal;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 8px;
  transition: color 0.3s;
}

.footer-note a:hover { color: var(--gold-soft); }

/* ============ DECORATIVE ============ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0 18px;
  gap: 14px;
  opacity: 0.55;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  max-width: 90px;
}

.divider-ornament {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.4em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
