:root {
  --primary-gold: #c59b27;
  --gold-gradient: linear-gradient(135deg, #dfba4d 0%, #b88a1c 100%);
  --gold-glow: rgba(212, 175, 55, 0.25);
  --dark: #1a1917;
  --body-bg: #f8f6f2;
  --card-bg: rgba(255, 255, 255, 0.96);
  --border: rgba(212, 175, 55, 0.25);
  --text-primary: #232220;
  --text-secondary: #6e6b66;
  --radius-lg: 24px;
  --radius-md: 14px;
  --font-he: 'Assistant', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-he);
  background-color: var(--body-bg);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

html[dir="ltr"] body {
  font-family: 'Montserrat', -apple-system, sans-serif;
}
html[dir="ltr"] .lang-switch-container {
  right: auto;
  left: 16px;
}


.lang-switch-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
}

.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.lang-btn.active {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lang-btn .flag { font-size: 1.05rem; line-height: 1; }

.page-wrapper {
  width: 100%;
  max-width: 500px;
  padding: 60px 14px 24px;
  position: relative;
  z-index: 2;
}

.bg-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
}
.glow-1 { top: -60px; right: -60px; background: #fae8b4; }
.glow-2 { bottom: -60px; left: -60px; background: #f3d4ce; }

.card-main {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0,0,0,0.02);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}


.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 0;
  gap: 6px;
}
.monogram {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 4px;
  color: var(--primary-gold);
  font-weight: 700;
}
.names-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.ring-icon {
  color: var(--primary-gold);
  font-size: 1.1rem;
}
.subtitle-tag {
  display: inline-block;
  padding: 5px 16px;
  background: #fdf6e2;
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #926f12;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.5px;
}


.invite-action-area {
  display: flex;
  justify-content: center;
  margin: 2px 0;
}

.btn-invitation {
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px var(--gold-glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-invitation:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(184, 138, 28, 0.35);
}

.btn-invitation:active {
  transform: scale(0.98);
}

.bounce-intro {
  animation: introPop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes introPop {
  0% { transform: scale(0.65); opacity: 0; }
  45% { transform: scale(1.18); box-shadow: 0 20px 45px rgba(184, 138, 28, 0.5); opacity: 1; }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); box-shadow: 0 8px 25px var(--gold-glow); }
}

.btn-sparkle { font-size: 0.8rem; opacity: 0.85; }


.timer-section {
  background: #fbfaf8;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}
.timer-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.time-unit {
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.time-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.time-lbl {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}


.details-section {
  text-align: center;
  padding: 0 8px;
}
.ornament {
  color: var(--primary-gold);
  font-size: 1rem;
  margin-bottom: 6px;
}
.event-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4a4843;
  margin-bottom: 14px;
}
.venue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ede9e1;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  text-align: center;
  margin: 0 auto;
}
html[dir="ltr"] .venue-badge { text-align: center; }
.venue-icon { font-size: 1.2rem; line-height: 1; display: flex; align-items: center; }
.venue-name { display: block; font-size: 0.95rem; color: var(--dark); font-weight: 700; line-height: 1.2; }
.venue-city { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }


.form-section {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid #ebe7df;
  padding: 20px 16px;
}
.form-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
}
.form-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 4px 0 16px;
}
.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #403e3a;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d4cb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fdfdfc;
  color: var(--dark);
  outline: none;
  transition: all 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  background: #fff;
}
.guests-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #faf8f5;
  border: 1px solid #eae5db;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.total-bar strong {
  color: var(--primary-gold);
  font-size: 1.1rem;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-submit:hover {
  background: #000;
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


.nav-section { display: flex; justify-content: center; }
.btn-waze {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #33ccff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(51, 204, 255, 0.35);
  transition: transform 0.2s;
}
.btn-waze:hover { transform: translateY(-1px); }


.credit {
  font-size: 0.75rem;  
  color: #666;          
  text-align: center;  
  margin-top: 30px;
  margin-bottom: 40px;
  font-style: italic;   
}


.modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-layer.active { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  max-width: 92vw;
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.btn-close-modal {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[dir="ltr"] .btn-close-modal { left: auto; right: 12px; }
.modal-img-wrap { overflow-y: auto; max-height: 85vh; }
.invite-img { display: block; max-width: 100%; height: auto; }


.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1d1b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 2000;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.toast.show { opacity: 1; }