:root {
  --midnight: #0a041e;
  --burgundy: #3b0011;
  --violet: #220033;
  --gold: #f0d597;
  --gold-bright: #ffd97d;
  --rose: #e86f8c;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(240, 213, 151, 0.24);
  --text: #fdf8f2;
  --muted: #cbbdd4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: radial-gradient(circle at top, var(--violet) 0%, var(--burgundy) 48%, var(--midnight) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 4, 30, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Luxury Champagne & Gold Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:active {
  transform: scale(0.97);
}

.btn-champagne,
.btn-champagne-sm {
  background: linear-gradient(135deg, #f3deb3 0%, #d4a656 50%, #f5e2ba 100%);
  color: #1c0b18;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(240, 213, 151, 0.32);
}

.btn-champagne {
  padding: 13px 22px;
  font-size: 0.96rem;
}

.btn-champagne-sm {
  padding: 9px 15px;
  font-size: 0.84rem;
}

.btn-gold,
.btn-gold-sm {
  background: linear-gradient(135deg, #f0d597, #c8963e);
  color: #14081e;
  font-weight: 700;
  border-radius: 999px;
}

.btn-gold {
  padding: 14px 26px;
  font-size: 1rem;
}

.btn-gold-sm {
  padding: 8px 15px;
  font-size: 0.84rem;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.88rem;
}

.btn-back {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.full-width {
  width: 100%;
}

/* Views */
.view {
  display: none;
  position: relative;
  z-index: 1;
}

.view.active {
  display: block;
}

/* Hero */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 42px 20px 26px;
  text-align: center;
}

.pill-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(240, 213, 151, 0.12);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.85rem, 5vw, 2.9rem);
  line-height: 1.22;
  margin-bottom: 12px;
}

.gold-text {
  color: var(--gold);
}

.hero-sub {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 540px;
  margin: 0 auto 22px;
}

/* Catalog */
.catalog-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px 70px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 22px;
}

@media (min-width: 768px) {
  .category-tabs {
    justify-content: center;
  }
}

.tab-btn {
  white-space: nowrap;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.tab-btn.active {
  background: var(--gold);
  color: #16091d;
  font-weight: 700;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}

.exp-card {
  background: rgba(16, 8, 34, 0.75);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.exp-banner {
  height: 124px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.9rem;
  margin-bottom: 14px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.exp-scenes-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 4, 30, 0.75);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--gold);
}

.exp-card h3 {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.exp-card p {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 16px;
  line-height: 1.45;
}

.exp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exp-price {
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 1.08rem;
}

/* EXACT 3-STEP LUXURY FORM */
.form-shell {
  max-width: 560px;
  margin: 20px auto 60px;
  padding: 22px 18px;
  background: rgba(16, 8, 34, 0.85);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
}

.form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-super {
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--gold);
}

.form-heading-group h2 {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
}

.stepper-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.step-pill {
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: var(--muted);
}

.step-pill.active {
  background: rgba(240, 213, 151, 0.18);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}

.form-stage {
  display: none;
}

.form-stage.active {
  display: block;
}

.field-box {
  margin-bottom: 14px;
}

.field-box label {
  display: block;
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(240, 213, 151, 0.28);
  background: rgba(10, 4, 30, 0.65);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

/* Upload Slots matching Storyboard */
.single-upload-slot {
  border: 1.5px dashed rgba(240, 213, 151, 0.45);
  border-radius: 14px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.plus-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(240, 213, 151, 0.2);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.single-upload-slot img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
}

.gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mini-slot-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(240, 213, 151, 0.22);
  border-radius: 12px;
  padding: 8px;
}

.mini-photo-box {
  height: 82px;
  border: 1px dashed rgba(240, 213, 151, 0.4);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 6px;
}

.mini-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-cap-input {
  padding: 7px 9px;
  font-size: 0.78rem;
  border-radius: 8px;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--gold);
  border-radius: 50%;
  transition: 0.25s;
}

.switch input:checked + .slider {
  background: rgba(240, 213, 151, 0.38);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.stage-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Stage 3 Review Card */
.review-preview-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}

.review-banner {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.review-meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 10px 0 14px;
  line-height: 1.5;
}

.checkout-box {
  background: rgba(240, 213, 151, 0.08);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.secure-tag {
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.verified-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Date chips for Proposal experience */
.date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.8rem;
}

.date-chip.selected {
  background: var(--gold);
  color: #16091d;
  font-weight: 700;
}

/* FULLSCREEN SCENE PLAYER */
#playerView.active {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at center, #2a0a3d 0%, #190416 55%, #070312 100%);
  display: flex;
  flex-direction: column;
}

.player-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.scene-dots {
  display: flex;
  gap: 5px;
}

.scene-dot {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.scene-dot.active {
  background: var(--gold);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-watermark {
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.68rem;
  padding: 3px 7px;
  border-radius: 6px;
}

.btn-hud {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.scenes-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px 96px;
  overflow-y: auto;
}

.scene-card {
  width: 100%;
  max-width: 400px;
  background: rgba(16, 7, 32, 0.78);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.script-gold {
  font-family: "Dancing Script", cursive;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.cinzel-title {
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
  color: var(--gold-bright);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.scene-text {
  color: #f2e8f5;
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 18px;
  white-space: pre-line;
}

/* Interactive Storyboard Widgets */
.countdown-digits {
  font-family: "Cinzel", serif;
  font-size: 2.4rem;
  color: var(--gold);
  letter-spacing: 3px;
  margin: 14px 0;
}

.candles-5 {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 2.2rem;
}

.candle-item {
  cursor: pointer;
  transition: transform 0.2s, opacity 0.25s;
}

.candle-item.out {
  opacity: 0.35;
  transform: scale(0.85);
}

/* Interactive Jigsaw Puzzle Grid (2x2 Tap to Assemble) */
.puzzle-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: 230px;
  height: 230px;
  margin: 14px auto;
  border-radius: 18px;
  padding: 6px;
  border: 2px solid var(--gold);
  background: rgba(240, 213, 151, 0.08);
}

.puzzle-tile {
  border-radius: 10px;
  background-size: 200% 200%;
  cursor: pointer;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: brightness(0.45) blur(2px);
  transform: rotate(12deg) scale(0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.puzzle-tile.solved {
  filter: none;
  transform: rotate(0deg) scale(1);
}

/* Wax Seal Envelope & Parchment Letter */
.envelope-box {
  background: linear-gradient(135deg, #2b183d, #190d26);
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 28px 16px;
  margin: 14px 0;
  cursor: pointer;
}

.wax-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, #d4a656, #8f631d);
  color: #1c0b18;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(240, 213, 151, 0.5);
}

.parchment-scroll {
  background: linear-gradient(180deg, #f5e6c8 0%, #e6cfa3 100%);
  color: #2b1810;
  border-radius: 14px;
  padding: 20px 16px;
  font-family: "Dancing Script", cursive;
  font-size: 1.35rem;
  line-height: 1.45;
  margin: 12px 0 16px;
  box-shadow: inset 0 0 24px rgba(120, 80, 30, 0.25);
  text-align: left;
}

/* Polaroid Gallery */
.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.polaroid-card {
  background: #fdf8f0;
  color: #1f1218;
  padding: 7px 7px 10px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.polaroid-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.polaroid-cap {
  font-family: "Dancing Script", cursive;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Scratch Card */
.scratch-card {
  position: relative;
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3deb3, #d4a656);
  color: #1c0b18;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 12px;
  margin: 14px 0;
  overflow: hidden;
  cursor: pointer;
}

.scratch-foil {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, #4b382a, #4b382a 10px, #634b38 10px, #634b38 20px);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.scratch-foil.cleared {
  opacity: 0;
  pointer-events: none;
}

/* Roadmap & Counters */
.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.counter-cell {
  background: rgba(240, 213, 151, 0.1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
}

.counter-num {
  font-family: "Cinzel", serif;
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 700;
}

.counter-lbl {
  font-size: 0.72rem;
  color: var(--muted);
}

.roadmap-list {
  text-align: left;
  margin: 12px 0 16px;
  border-left: 2px solid var(--gold);
  padding-left: 14px;
}

.roadmap-item {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.finale-name {
  font-family: "Cinzel", serif;
  font-size: 2.3rem;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(240, 213, 151, 0.7);
  margin: 12px 0;
}

/* Unlock Dock */
.unlock-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(12, 5, 28, 0.95);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.unlock-info {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

.unlock-info span {
  color: var(--muted);
  font-size: 0.73rem;
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #170a2e;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 20px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-badge {
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.modal-sub {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.share-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.success-check {
  color: #4ade80;
  font-weight: 700;
  margin-bottom: 8px;
}

.link-copy-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-whatsapp {
  display: block;
  text-align: center;
  background: #25d366;
  color: #062110;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
}

.status-msg {
  margin-top: 10px;
  font-size: 0.84rem;
  color: #4ade80;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(22, 10, 44, 0.96);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}