@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

@font-face {
  font-family: 'IranNastaliq';
  src: url('../fonts/IranNastaliq-Web.woff2') format('woff2'),
    url('../fonts/IranNastaliq-Web.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* ============================================================
   WedLink — Invitation Themes and Layouts (Premium Version)
   ============================================================ */

/* ─── Themes (CSS Variables) ─────────────────────────────────── */

:root {
  /* Default: Modern Minimal */
  --inv-bg: #faf8f5;
  --inv-bg-rgb: 250, 248, 245;
  --inv-text: #2c2a29;
  --inv-accent: #111111;
  --inv-accent-light: rgba(0, 0, 0, 0.04);
  --inv-font-primary: 'Inter', sans-serif;
  --inv-font-script: 'Playfair Display', serif;
  --inv-border: rgba(0, 0, 0, 0.08);
}

body.theme-dark-luxury {
  --inv-bg: #09090e;
  --inv-bg-rgb: 9, 9, 14;
  --inv-text: #f5e9da;
  --inv-accent: #d4af37;
  /* Gold */
  --inv-accent-light: rgba(212, 175, 55, 0.1);
  --inv-font-primary: 'Inter', sans-serif;
  --inv-font-script: 'Great Vibes', cursive;
  --inv-border: rgba(212, 175, 55, 0.2);
}

body.theme-dark-luxury .inv-names-front,
body.theme-dark-luxury .inv-names-back {
  background: linear-gradient(135deg, #d4af37, #f3e5ab, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.theme-light-floral {
  --inv-bg: #fdfaf6;
  --inv-bg-rgb: 253, 250, 246;
  --inv-text: #504840;
  --inv-accent: #c9956c;
  /* Rose Gold */
  --inv-accent-light: rgba(201, 149, 108, 0.08);
  --inv-font-primary: 'Inter', sans-serif;
  --inv-font-script: 'Great Vibes', cursive;
  --inv-border: rgba(201, 149, 108, 0.25);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(201, 149, 108, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(201, 149, 108, 0.03) 0%, transparent 30%);
}

body.theme-royal-elegance {
  --inv-bg: #1d0309;
  /* Deep Burgundy */
  --inv-bg-rgb: 29, 3, 9;
  --inv-text: #fdf5e6;
  --inv-accent: #e5b365;
  /* Royal Gold */
  --inv-accent-light: rgba(229, 179, 101, 0.12);
  --inv-font-primary: 'Playfair Display', serif;
  --inv-font-script: 'Great Vibes', cursive;
  --inv-border: rgba(229, 179, 101, 0.25);
}

body.theme-royal-elegance .inv-names-front,
body.theme-royal-elegance .inv-names-back {
  background: linear-gradient(135deg, #e5b365, #ffe5be, #e5b365);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
  background-size: 200% auto;
}

body.theme-starlight-glamour {
  --inv-bg: #040407;
  /* Dark Obsidian */
  --inv-bg-rgb: 4, 4, 7;
  --inv-text: #e2e8f0;
  --inv-accent: #cbd5e1;
  /* Platinum Silver */
  --inv-accent-light: rgba(255, 255, 255, 0.05);
  --inv-font-primary: 'Inter', sans-serif;
  --inv-font-script: 'Playfair Display', serif;
  --inv-border: rgba(255, 255, 255, 0.1);
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.theme-starlight-glamour .inv-names-front,
body.theme-starlight-glamour .inv-names-back {
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

body.theme-enchanted-forest {
  --inv-bg: #05140b;
  /* Moss Emerald */
  --inv-bg-rgb: 5, 20, 11;
  --inv-text: #e8f5ec;
  --inv-accent: #86c49e;
  /* Sage */
  --inv-accent-light: rgba(134, 196, 158, 0.1);
  --inv-font-primary: 'Playfair Display', serif;
  --inv-font-script: 'Great Vibes', cursive;
  --inv-border: rgba(134, 196, 158, 0.2);
}

body.theme-enchanted-forest::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(134, 196, 158, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(229, 179, 101, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Base Application ───────────────────────────────────────── */
body.invite-page {
  background-color: var(--inv-bg);
  color: var(--inv-text);
  font-family: var(--inv-font-primary);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

/* SVG Icon Inside Invitations */
.svg-icon {
  width: 1.25em;
  height: 1.25em;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
}

/* ─── Shared Components ──────────────────────────────────────── */
.inv-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Unused image/content wrapper styles removed */

.inv-eyebrow {
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--inv-accent);
  margin-bottom: 24px;
  font-weight: 500;
  opacity: 0.9;
}

.ornament-divider {
  width: 180px;
  height: 30px;
  color: var(--inv-accent);
  margin: 0 auto 32px;
  opacity: 0.6;
}

body.theme-modern-minimal .ornament-divider {
  display: none;
}

/* ─── Invitation Details ──────────────────────────────────────── */
.inv-details {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.inv-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 17.5px;
  transition: transform 0.2s ease;
}

.inv-detail-item:hover {
  transform: translateX(3px);
}

[dir="rtl"] .inv-detail-item:hover {
  transform: translateX(-3px);
}

.inv-icon {
  color: var(--inv-accent);
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.inv-message {
  font-family: Georgia, serif;
  font-style: italic;
  max-width: 520px;
  margin: 0 auto;
  color: var(--inv-text);
  opacity: 0.85;
  line-height: 1.5;
  font-size: clamp(13.5px, 1.15vw, 16px);
  padding: 0;
  white-space: pre-wrap;
}

/* ─── Countdown Timer ────────────────────────────────────────── */
.inv-countdown {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 2px auto;
  width: 100%;
  max-width: 360px;
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--inv-accent-light);
  border: 1px solid var(--inv-border);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 58px;
  flex: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cd-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 55%);
  pointer-events: none;
}

.cd-box:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cd-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--inv-accent);
  margin-bottom: 2px;
  line-height: 1.1;
}

.cd-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--inv-text);
  opacity: 0.7;
  font-weight: 600;
}


/* ─── 3D Card Layout ─────────────────────────────────────────── */

body.layout-3d-card {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body.layout-3d-card .inv-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--inv-bg);
  overflow: hidden;
  position: relative;
}

.invite-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.card-perspective {
  perspective: 1600px;
  width: 440px;
  max-width: 95vw;
  height: clamp(560px, 80vh, 620px);
  position: relative;
  animation: cardFloat 7s ease-in-out infinite;
}

.card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.card-3d.flipped {
  transform: rotateY(180deg);
}

.card-side {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.14),
    0 32px 80px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--inv-border);
  overflow: hidden;
  background-color: var(--inv-bg);
  box-sizing: border-box;
}

/* Grain texture overlay */
.card-side::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border-radius: 20px;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Light sheen sweep */
.card-side::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  border-radius: 20px;
  background: linear-gradient(115deg,
      transparent 20%,
      rgba(255, 255, 255, 0.06) 44%,
      rgba(255, 255, 255, 0.13) 50%,
      rgba(255, 255, 255, 0.06) 56%,
      transparent 80%);
  animation: cardSheen 9s ease-in-out infinite;
  animation-delay: 1.5s;
}

.card-front {
  z-index: 2;
  transform: rotateY(0deg);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.card-back {
  transform: rotateY(180deg);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.card-front-bg-blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  filter: blur(18px);
  opacity: 0.18;
  pointer-events: none;
  border-radius: 20px;
  transform: scale(1.05);
  z-index: 0;
}

.card-front-decor,
.card-back-decor {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--inv-border);
  border-radius: 12px;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.7;
  background: radial-gradient(ellipse at 50% 0%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 65%);
}

.wreath-svg,
.wreath-svg-back {
  position: absolute;
  width: 85%;
  height: 85%;
  color: var(--inv-accent);
  opacity: 0.12;
}

.card-front-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: 20px;
}

.save-the-date {
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--inv-accent);
  font-weight: 600;
  margin: 0;
  opacity: 0.85;
}

.card-front-photo-frame {
  width: 220px;
  height: 300px;
  border-radius: 110px 110px 20px 20px;
  overflow: hidden;
  margin: 0;
  border: 1.5px solid var(--inv-accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
  background-color: var(--inv-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: framePulse 4s ease-in-out infinite;
}

.card-front-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-front-placeholder {
  color: var(--inv-accent);
  opacity: 0.35;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front-placeholder .svg-icon {
  width: 56px;
  height: 56px;
}

.inv-names-front {
  font-family: var(--inv-font-script);
  font-size: clamp(38px, 6.5vw, 54px);
  font-weight: 300;
  color: var(--inv-text);
  margin: 0;
  line-height: 1.15;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 90%;
}

.inv-divider-front {
  width: 44px;
  height: 1px;
  background-color: var(--inv-accent);
  opacity: 0.3;
  margin: 0;
}

.inv-date-front {
  font-size: 15px;
  font-weight: 550;
  letter-spacing: 0.05em;
  color: var(--inv-text);
}

.card-back-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: clamp(10px, 1.8vh, 35px);
  box-sizing: border-box;
  padding: 12px 0;
  overflow: hidden;
}

.inv-names-back {
  font-family: var(--inv-font-script);
  font-size: clamp(38px, 6.8vw, 54px);
  font-weight: 300;
  color: var(--inv-text);
  margin: 0;
  padding: 0;
  line-height: 1.15;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 90%;
  flex-shrink: 0;
}

.inv-family-back {
  font-family: var(--inv-font-primary);
  font-size: clamp(10.5px, 2.5vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--inv-accent);
  opacity: 0.7;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  font-weight: 500;
  flex-shrink: 0;
}

.card-back-content .inv-eyebrow {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.card-back-content .ornament-divider {
  margin: 0;
  padding: 0;
  max-width: 140px;
  flex-shrink: 0;
}

.card-back-content .inv-details {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  flex-shrink: 0;
}

.card-back-content .inv-message {
  margin: 0;
  padding: 0;
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.5;
  width: 100%;
  max-width: 96%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 0 1 auto;
  height: auto;
  white-space: pre-wrap;
}

.card-back-content .inv-message p {
  margin: 0;
  padding: 0;
}

.card-back-content .inv-countdown {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 340px;
  gap: 8px;
  flex-shrink: 0;
}

.card-back-content .cd-box {
  padding: 8px 10px;
  min-width: 52px;
  border-radius: 12px;
}

.card-back-content .cd-val {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.card-back-content .cd-lbl {
  font-size: 10px;
  opacity: 0.75;
}

.invite-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  flex-wrap: wrap;
}

.btn-flip,
.btn-location,
.invite-actions .lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  min-width: 100px;
  border-radius: 30px;
  font-family: var(--inv-font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transition: all var(--transition, 0.3s ease);
  margin-top: 0 !important;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-flip {
  background: var(--inv-accent);
  color: var(--inv-bg);
  border: 1px solid var(--inv-accent);
}

.btn-flip:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.btn-flip .svg-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.6s ease;
}

.btn-flip:hover .svg-icon {
  transform: rotate(180deg);
}

.btn-location,
.invite-actions .lang-switcher-btn {
  background: rgba(var(--inv-bg-rgb), 0.85);
  color: var(--inv-text);
  border: 1px solid var(--inv-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-location:hover,
.invite-actions .lang-switcher-btn:hover {
  transform: translateY(-2px);
  border-color: var(--inv-accent);
  background: var(--inv-accent-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.btn-location .svg-icon,
.invite-actions .lang-switcher-btn .svg-icon {
  width: 16px;
  height: 16px;
  color: var(--inv-accent);
}

/* 📍 Location & Map Modal Styles (Preloaded in Background) */
.inv-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inv-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.inv-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.inv-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: var(--inv-bg);
  color: var(--inv-text);
  border: 1px solid var(--inv-border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 88vh;
  overflow-y: auto;
}

.inv-modal.active .inv-modal-card {
  transform: translateY(0) scale(1);
}

.inv-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--inv-text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.inv-modal-close:hover {
  opacity: 1;
}

[dir="rtl"] .inv-modal-close {
  right: auto;
  left: 18px;
}

.inv-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.inv-modal-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--inv-accent-light);
  border: 1px solid var(--inv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--inv-accent);
}

.inv-modal-icon-wrapper .svg-icon {
  width: 24px;
  height: 24px;
}

.inv-modal-title {
  font-family: var(--inv-font-script);
  font-size: 26px;
  margin: 0;
  color: var(--inv-accent);
}

[dir="rtl"] .inv-modal-title {
  font-family: 'Vazirmatn', sans-serif !important;
  font-size: 22px;
  font-weight: 700;
}

.inv-modal-address {
  font-size: 15.5px;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
  max-width: 90%;
  word-wrap: break-word;
}

.inv-modal-map {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--inv-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  margin-top: 4px;
}

.inv-modal-map img,
.inv-modal-map iframe {
  width: 100%;
  height: 250px;
  max-height: 260px;
  object-fit: cover;
  display: block;
  border: 0;
}

.inv-modal-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  min-width: 110px;
  background: var(--inv-accent);
  color: var(--inv-bg);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition, 0.3s ease);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-nav:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

/* All other layouts removed. The application only uses the 3D Envelope & Flip Card layout. */

@media (max-width: 600px) {
  body.layout-3d-card .inv-container {
    padding: 10px 8px;
  }

  .card-perspective {
    width: min(440px, 92vw);
    height: clamp(540px, 142vw, 600px);
  }

  .card-front,
  .card-back {
    padding: 20px 16px;
  }

  .card-front-photo-frame {
    width: 175px;
    height: 235px;
    border-radius: 90px 90px 16px 16px;
  }

  .card-back-content {
    padding: 10px 0;
    gap: clamp(7px, 1.5vh, 13px);
  }

  .music-toggle-btn {
    top: 10px !important;
    right: 10px !important;
    padding: 6px 12px !important;
    font-size: 10px !important;
    gap: 6px !important;
    border-radius: 20px !important;
  }

  [dir="rtl"] .music-toggle-btn {
    right: auto !important;
    left: 10px !important;
  }
}

/* 🌐 Language Switcher Button Style (Floating Glassmorphism) */
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--inv-bg-rgb), 0.7);
  border: 1px solid var(--inv-border);
  padding: 10px 22px;
  border-radius: 30px;
  color: var(--inv-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all var(--transition);
  margin-top: 24px;
  z-index: 10;
  cursor: pointer;
}

.lang-switcher-btn:hover {
  transform: translateY(-2px);
  border-color: var(--inv-accent);
  background: var(--inv-accent-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.lang-switcher-btn .lang-icon {
  font-size: 16px;
}

/* RTL Styles for Persian translation */
[dir="rtl"] {
  font-family: 'Vazirmatn', 'Tahoma', 'sans-serif' !important;
  letter-spacing: normal !important;
}

[dir="rtl"] .inv-eyebrow {
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 500 !important;
}

[dir="rtl"] .inv-names-front,
[dir="rtl"] .inv-names-back {
  font-family: 'IranNastaliq', 'Vazirmatn', sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}

[dir="rtl"] .inv-names-front {
  font-size: clamp(48px, 11vw, 68px) !important;
  line-height: 1.4 !important;
}

[dir="rtl"] .inv-names-back {
  font-size: clamp(28px, 5.5vw, 42px) !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

/* Safari (Mac & iOS): Use clean Vazirmatn font for couple names */
.is-safari [dir="rtl"] .inv-names-front,
.is-safari [dir="rtl"] .inv-names-back {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.is-safari [dir="rtl"] .inv-names-front {
  font-size: clamp(32px, 8vw, 48px) !important;
  line-height: 1.3 !important;
}

.is-safari [dir="rtl"] .inv-names-back {
  font-size: clamp(28px, 5.5vw, 42px) !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

[dir="rtl"] .inv-family-back {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-size: clamp(12px, 2.5vw, 14.5px) !important;
  margin: 0 !important;
  padding: 0 !important;
}

[dir="rtl"] .inv-detail-item {
  flex-direction: row;
  gap: 10px;
}

[dir="rtl"] .cd-lbl {
  letter-spacing: normal;
  font-weight: 500;
}

[dir="rtl"] .lang-switcher-btn {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
}

[dir="rtl"] .inv-message {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
  font-style: normal !important;
  font-size: clamp(13px, 1.15vw, 15px) !important;
  line-height: 1.5 !important;
  font-weight: 450 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 1 auto !important;
  height: auto !important;
  white-space: pre-wrap !important;
}

[dir="rtl"] .inv-message p {
  margin: -10px !important;
  padding: 0 !important;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inv-animate {
  opacity: 0;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.d-1 {
  animation-delay: 0.15s;
}

.d-2 {
  animation-delay: 0.3s;
}

.d-3 {
  animation-delay: 0.45s;
}

.d-4 {
  animation-delay: 0.6s;
}

.d-5 {
  animation-delay: 0.75s;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* 🎵 Floating Background Music Player */
.music-toggle-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--inv-bg-rgb), 0.7);
  border: 1px solid var(--inv-border);
  padding: 8px 16px;
  border-radius: 30px;
  color: var(--inv-text);
  font-family: var(--inv-font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all var(--transition);
}

.music-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: var(--inv-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Sound Wave Bars Animation */
.music-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 16px;
  height: 14px;
}

.music-waves span {
  display: block;
  width: 2px;
  background-color: var(--inv-accent);
  border-radius: 1px;
  height: 4px;
  transition: height 0.2s ease;
}

.music-toggle-btn.playing .music-waves span {
  animation: wave 1.2s ease-in-out infinite alternate;
}

.music-toggle-btn.playing .music-waves span:nth-child(1) {
  height: 14px;
  animation-delay: -1.2s;
}

.music-toggle-btn.playing .music-waves span:nth-child(2) {
  height: 10px;
  animation-delay: -0.9s;
}

.music-toggle-btn.playing .music-waves span:nth-child(3) {
  height: 12px;
  animation-delay: -0.6s;
}

.music-toggle-btn.playing .music-waves span:nth-child(4) {
  height: 8px;
  animation-delay: -0.3s;
}

@keyframes wave {
  0% {
    transform: scaleY(0.2);
  }

  100% {
    transform: scaleY(1);
  }
}

[dir="rtl"] .music-toggle-btn {
  right: auto;
  left: 24px;
  font-family: 'Vazirmatn', sans-serif !important;
  letter-spacing: normal;
}

/* 🎵 Music Prompt Modal Styling */
.music-prompt-card {
  max-width: 380px !important;
  text-align: center;
  padding: 32px 24px 28px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.music-prompt-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--inv-accent-light);
  color: var(--inv-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.music-prompt-icon .svg-icon {
  width: 28px;
  height: 28px;
}

.music-prompt-title {
  font-family: var(--inv-font-primary);
  font-size: 20px;
  font-weight: 700;
  color: var(--inv-text);
  margin: 0 0 10px 0;
}

.music-prompt-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--inv-text);
  opacity: 0.85;
  margin: 0 0 24px 0;
}

.music-prompt-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn-prompt-yes,
.btn-prompt-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 30px;
  font-family: var(--inv-font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition, 0.3s ease);
  flex: 1;
}

.btn-prompt-yes {
  background: var(--inv-accent);
  color: var(--inv-bg);
  border: 1px solid var(--inv-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-prompt-yes:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.btn-prompt-no {
  background: transparent;
  color: var(--inv-text);
  border: 1px solid var(--inv-border);
  opacity: 0.8;
}

.btn-prompt-no:hover {
  transform: translateY(-2px);
  opacity: 1;
  border-color: var(--inv-accent);
  background: var(--inv-accent-light);
}

[dir="rtl"] .music-prompt-title,
[dir="rtl"] .music-prompt-desc,
[dir="rtl"] .btn-prompt-yes,
[dir="rtl"] .btn-prompt-no {
  font-family: 'Vazirmatn', sans-serif !important;
}

/* ═══════════════════════════════════════════════════════════════
   ✨ PREMIUM — Texture · Ambient Light · Motion
   ═══════════════════════════════════════════════════════════════ */

/* ── Animated Background Orbs ────────────────────────────────── */
body.layout-3d-card .inv-container::before,
body.layout-3d-card .inv-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
}

body.layout-3d-card .inv-container::before {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--inv-orb1, rgba(140, 120, 90, 0.13)) 0%, transparent 70%);
  top: -20%;
  left: -20%;
  animation: orbFloat1 14s ease-in-out infinite;
}

body.layout-3d-card .inv-container::after {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--inv-orb2, rgba(140, 120, 90, 0.08)) 0%, transparent 70%);
  bottom: -15%;
  right: -15%;
  animation: orbFloat2 19s ease-in-out infinite;
}

@keyframes orbFloat1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -28px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 35px) scale(0.93);
  }
}

@keyframes orbFloat2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  40% {
    transform: translate(-30px, 20px) scale(1.07);
  }

  72% {
    transform: translate(26px, -38px) scale(0.9);
  }
}

/* Per-theme orb colors */
body.theme-dark-luxury {
  --inv-orb1: rgba(212, 175, 55, 0.18);
  --inv-orb2: rgba(212, 175, 55, 0.09);
}

body.theme-royal-elegance {
  --inv-orb1: rgba(229, 179, 101, 0.2);
  --inv-orb2: rgba(160, 40, 70, 0.12);
}

body.theme-starlight-glamour {
  --inv-orb1: rgba(203, 213, 225, 0.14);
  --inv-orb2: rgba(148, 163, 184, 0.08);
}

body.theme-enchanted-forest {
  --inv-orb1: rgba(134, 196, 158, 0.18);
  --inv-orb2: rgba(86, 160, 110, 0.1);
}

body.theme-light-floral {
  --inv-orb1: rgba(201, 149, 108, 0.15);
  --inv-orb2: rgba(230, 180, 140, 0.1);
}

/* ── Card Float Idle ─────────────────────────────────────────── */
@keyframes cardFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* ── Card Light Sheen Sweep ──────────────────────────────────── */
@keyframes cardSheen {
  0% {
    transform: translateX(-160%) skewX(-12deg);
    opacity: 0;
  }

  4% {
    opacity: 1;
  }

  28% {
    transform: translateX(160%) skewX(-12deg);
    opacity: 0;
  }

  100% {
    transform: translateX(160%) skewX(-12deg);
    opacity: 0;
  }
}

/* ── Theme-specific Card Glow Shadows ────────────────────────── */
body.theme-dark-luxury .card-side {
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.42),
    0 0 70px rgba(212, 175, 55, 0.2),
    0 0 0 1px rgba(212, 175, 55, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

body.theme-royal-elegance .card-side {
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.48),
    0 0 80px rgba(229, 179, 101, 0.22),
    0 0 0 1px rgba(229, 179, 101, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

body.theme-starlight-glamour .card-side {
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.52),
    0 0 80px rgba(203, 213, 225, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-enchanted-forest .card-side {
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.44),
    0 0 75px rgba(134, 196, 158, 0.18),
    0 0 0 1px rgba(134, 196, 158, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-light-floral .card-side {
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.1),
    0 0 55px rgba(201, 149, 108, 0.15),
    0 0 0 1px rgba(201, 149, 108, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* ── Photo Frame Pulse Glow ──────────────────────────────────── */
@keyframes framePulse {

  0%,
  100% {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07);
  }

  50% {
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.13);
  }
}

body.theme-dark-luxury .card-front-photo-frame {
  animation: framePulseLux 4s ease-in-out infinite;
}

@keyframes framePulseLux {

  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), 0 0 0 1.5px rgba(212, 175, 55, 0.5);
  }

  50% {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28), 0 0 30px rgba(212, 175, 55, 0.28), 0 0 0 1.5px rgba(212, 175, 55, 0.85);
  }
}

body.theme-royal-elegance .card-front-photo-frame {
  animation: framePulseRoyal 4s ease-in-out infinite;
}

@keyframes framePulseRoyal {

  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15), 0 0 0 1.5px rgba(229, 179, 101, 0.5);
  }

  50% {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32), 0 0 32px rgba(229, 179, 101, 0.3), 0 0 0 1.5px rgba(229, 179, 101, 0.88);
  }
}

body.theme-enchanted-forest .card-front-photo-frame {
  animation: framePulseForest 4s ease-in-out infinite;
}

@keyframes framePulseForest {

  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), 0 0 0 1.5px rgba(134, 196, 158, 0.45);
  }

  50% {
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.22), 0 0 26px rgba(134, 196, 158, 0.25), 0 0 0 1.5px rgba(134, 196, 158, 0.78);
  }
}

body.theme-starlight-glamour .card-front-photo-frame {
  animation: framePulseStarlight 4.5s ease-in-out infinite;
}

@keyframes framePulseStarlight {

  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18), 0 0 0 1.5px rgba(203, 213, 225, 0.4);
  }

  50% {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35), 0 0 28px rgba(203, 213, 225, 0.2), 0 0 0 1.5px rgba(203, 213, 225, 0.7);
  }
}

/* ── Ornament Divider — Breathing Pulse ─────────────────────── */
.card-back-content .ornament-divider {
  animation: ornamentBreathe 3.8s ease-in-out infinite;
}

@keyframes ornamentBreathe {

  0%,
  100% {
    opacity: 0.42;
    transform: scaleX(0.97);
  }

  50% {
    opacity: 0.85;
    transform: scaleX(1.03);
  }
}

/* ── Save The Date — Subtle Breathe ─────────────────────────── */
.save-the-date {
  animation: stdBreathe 5.5s ease-in-out infinite;
}

@keyframes stdBreathe {

  0%,
  100% {
    letter-spacing: 0.25em;
    opacity: 0.85;
  }

  50% {
    letter-spacing: 0.3em;
    opacity: 1;
  }
}

/* ── Wreath / Decor SVG — Slow Drift ────────────────────────── */
.wreath-svg {
  animation: wreathDrift 90s linear infinite;
}

.wreath-svg-back {
  animation: wreathDrift 120s linear infinite reverse;
}

@keyframes wreathDrift {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ── Divider Front — Subtle Width Pulse ─────────────────────── */
.inv-divider-front {
  animation: dividerPulse 4s ease-in-out infinite;
}

@keyframes dividerPulse {

  0%,
  100% {
    width: 44px;
    opacity: 0.28;
  }

  50% {
    width: 64px;
    opacity: 0.5;
  }
}

/* ═══════════════════════════════════════════════════════════════
   🌸 FLORAL PATTERNS — Petals · Botanical Sprigs · Dividers
   ═══════════════════════════════════════════════════════════════ */

/* ── Falling Cherry Blossom Petals ───────────────────────────── */
.wedding-petals-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.pet {
  position: absolute;
  width: 9px;
  height: 15px;
  border-radius: 50% 0 50% 0;
  background: var(--inv-accent, #b09070);
  top: -20px;
  left: var(--left, 50%);
  opacity: 0;
}

/* 6 concrete keyframes — no CSS vars inside (cross-browser safe) */
@keyframes petalA {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }

  5% {
    opacity: 0.3;
  }

  90% {
    opacity: 0.12;
  }

  100% {
    opacity: 0;
    transform: translate(50px, 110vh) rotate(540deg);
  }
}

@keyframes petalB {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(20deg);
  }

  5% {
    opacity: 0.28;
  }

  90% {
    opacity: 0.1;
  }

  100% {
    opacity: 0;
    transform: translate(-60px, 110vh) rotate(-480deg);
  }
}

@keyframes petalC {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-15deg);
  }

  6% {
    opacity: 0.32;
  }

  90% {
    opacity: 0.12;
  }

  100% {
    opacity: 0;
    transform: translate(35px, 110vh) rotate(420deg);
  }
}

@keyframes petalD {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(30deg);
  }

  6% {
    opacity: 0.26;
  }

  90% {
    opacity: 0.1;
  }

  100% {
    opacity: 0;
    transform: translate(-45px, 110vh) rotate(-380deg);
  }
}

@keyframes petalE {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-25deg);
  }

  5% {
    opacity: 0.3;
  }

  91% {
    opacity: 0.12;
  }

  100% {
    opacity: 0;
    transform: translate(65px, 110vh) rotate(600deg);
  }
}

@keyframes petalF {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(10deg);
  }

  6% {
    opacity: 0.25;
  }

  89% {
    opacity: 0.09;
  }

  100% {
    opacity: 0;
    transform: translate(-30px, 110vh) rotate(-440deg);
  }
}

/* Assign each petal a unique position, timing and motion type */
.pet:nth-child(1) {
  left: 5%;
  animation: petalA 9s ease-in 0s infinite;
}

.pet:nth-child(2) {
  left: 12%;
  animation: petalB 12s ease-in 1.8s infinite;
}

.pet:nth-child(3) {
  left: 20%;
  animation: petalC 8.5s ease-in 0.5s infinite;
}

.pet:nth-child(4) {
  left: 30%;
  animation: petalD 11s ease-in 3.2s infinite;
}

.pet:nth-child(5) {
  left: 39%;
  animation: petalE 9.5s ease-in 1.4s infinite;
}

.pet:nth-child(6) {
  left: 50%;
  animation: petalF 13s ease-in 4.2s infinite;
}

.pet:nth-child(7) {
  left: 58%;
  animation: petalA 8s ease-in 0.9s infinite;
}

.pet:nth-child(8) {
  left: 67%;
  animation: petalB 10.5s ease-in 2.6s infinite;
}

.pet:nth-child(9) {
  left: 76%;
  animation: petalC 9s ease-in 1.6s infinite;
}

.pet:nth-child(10) {
  left: 83%;
  animation: petalD 11.5s ease-in 3.8s infinite;
}

.pet:nth-child(11) {
  left: 91%;
  animation: petalE 8.5s ease-in 0.3s infinite;
}

.pet:nth-child(12) {
  left: 17%;
  animation: petalF 14s ease-in 6s infinite;
  width: 7px;
  height: 12px;
}

.pet:nth-child(13) {
  left: 44%;
  animation: petalC 10s ease-in 5s infinite;
  width: 7px;
  height: 12px;
}

.pet:nth-child(14) {
  left: 73%;
  animation: petalD 12.5s ease-in 4.6s infinite;
  width: 7px;
  height: 12px;
}

/* Per-theme petal colors */
body.theme-dark-luxury .pet {
  background: rgba(212, 175, 55, 0.95);
}

body.theme-royal-elegance .pet {
  background: rgba(229, 179, 101, 0.95);
}

body.theme-starlight-glamour .pet {
  background: rgba(203, 213, 225, 0.95);
}

body.theme-enchanted-forest .pet {
  background: rgba(134, 196, 158, 0.95);
}

body.theme-light-floral .pet {
  background: rgba(201, 149, 108, 0.95);
}

/* ── Wedding Filigree Corner Ornaments ──────────────────────── */
.card-flora-corner {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.card-sprig {
  position: absolute;
  width: 68px;
  height: 68px;
  color: var(--inv-accent);
  opacity: 0.22;
}

.sprig-tl {
  top: 16px;
  left: 16px;
}

.sprig-tr {
  top: 16px;
  right: 16px;
  transform: scaleX(-1);
}

.sprig-bl {
  bottom: 16px;
  left: 16px;
  transform: scaleY(-1);
}

.sprig-br {
  bottom: 16px;
  right: 16px;
  transform: scale(-1);
}

/* Back card has no photo — ornaments slightly more visible */
.card-back .card-sprig {
  opacity: 0.3;
}

/* ── Botanical Ornament Divider — override height ────────────── */
.card-back-content .ornament-divider {
  height: 30px;
  max-width: 160px;
}