/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --primary-maroon: #800020;
  --primary-gold: #D4AF37;
  --accent-gold: #E5A93C;
  --bg-warm-ivory: #FFFDF9;
  --text-dark: #3A251C;
  --text-muted: #7E5F52;
  --emerald-green: #0F5257;
  --blush-rose: #F4ACB7;
  --maxw: 480px;
  --border-gold: 1px solid rgba(212, 175, 55, 0.45);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  background-color: #120005; /* Deep luxury backdrop for desktop letterboxing */
  overflow: hidden;
}

/* Beautiful background on desktop around the mobile column */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: 
    radial-gradient(circle at 10% 20%, rgba(128, 0, 32, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 40%),
    linear-gradient(135deg, #1b0007 0%, #0d0003 100%);
  background-attachment: fixed;
}

/* Deck container matching mobile viewport Snapping */
.deck {
  position: relative;
  height: 100dvh;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background: var(--bg-warm-ivory);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.deck::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

/* Snapping Screen */
.screen {
  position: relative;
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 24px;
  background: var(--bg-warm-ivory);
  border: 10px solid transparent;
  /* Gold border inlay */
  border-image: linear-gradient(to bottom right, #D4AF37 0%, #F3E5AB 50%, #D4AF37 100%) 10;
}

/* Slide backgrounds with subtle patterns */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(var(--primary-gold) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 1;
}

/* Canvas overlay for falling petals */
.petal-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Decorative SVG Corner borders */
.corner-decor {
  position: absolute;
  width: 50px;
  height: 50px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.8;
}
.corner-decor.top-left { top: 12px; left: 12px; }
.corner-decor.top-right { top: 12px; right: 12px; transform: scaleX(-1); }
.corner-decor.bottom-left { bottom: 12px; left: 12px; transform: scaleY(-1); }
.corner-decor.bottom-right { bottom: 12px; right: 12px; transform: scale(-1); }

/* Typography */
.font-script {
  font-family: 'Great Vibes', cursive;
  color: var(--primary-gold);
}

.font-serif {
  font-family: 'Cinzel', serif;
  color: var(--primary-maroon);
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Centered Header elements */
.header-decor {
  text-align: center;
  z-index: 5;
  margin-top: 15px;
}

.header-decor .shree-ganesha {
  width: 55px;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 4px rgba(128, 0, 32, 0.2));
  animation: floatGanesha 4s ease-in-out infinite;
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 5;
  width: 100%;
}

.footer-decor {
  text-align: center;
  z-index: 5;
  margin-bottom: 10px;
}

/* Individual Slide Content Styling */

/* Slide 1 - Cover */
#s1 {
  background: linear-gradient(to bottom, rgba(27, 0, 7, 0.95), rgba(128, 0, 32, 0.95)), 
              url('images/couple_placeholder.png') center/cover no-repeat;
  border-image: linear-gradient(to bottom right, #E5A93C 0%, #FFF 50%, #E5A93C 100%) 10;
}

#s1::after { display: none; } /* hide dot background */

.cover-title {
  font-size: 3.2rem;
  margin: 10px 0 0 0;
  line-height: 1;
  color: #FFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.cover-sub {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary-gold);
  margin-bottom: 30px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.cover-img-container {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 4px solid var(--primary-gold);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 25px;
  position: relative;
  background-color: var(--primary-maroon);
}

.cover-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-welcome {
  color: #E2D3CD;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
  max-width: 80%;
  line-height: 1.6;
}

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #F3E5AB 50%, #D4AF37 100%);
  color: var(--primary-maroon);
  border: none;
  padding: 14px 28px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.45);
  transition: all 0.3s ease;
  z-index: 10;
  text-decoration: none;
  display: inline-block;
  outline: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

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

/* Slide 2 - Ganesh / Quote */
.mandala-bg {
  position: absolute;
  width: 280px;
  height: 280px;
  opacity: 0.05;
  z-index: 1;
  animation: rotateMandala 60s linear infinite;
  pointer-events: none;
}

.ganesha-large {
  width: 110px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(128, 0, 32, 0.15));
}

.shloka-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary-maroon);
  line-height: 1.8;
  max-width: 90%;
  margin-bottom: 25px;
}

.shloka-translation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 80%;
}

/* Slide 3 - Invitation Text */
.invitation-quote {
  font-size: 2.2rem;
  margin: 0 0 10px 0;
}

.invitation-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark);
  max-width: 90%;
  margin: 15px 0;
}

.host-names {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-maroon);
  margin-top: 20px;
}

/* Slide 4 - Save the Date / Calendar */
.date-header {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.calendar-box {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(128, 0, 32, 0.06);
  border: var(--border-gold);
  padding: 18px;
  width: 100%;
  max-width: 320px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.calendar-month {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--primary-maroon);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 8px;
  font-size: 0.9rem;
}

.calendar-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
}

/* Special glowing circles for event days (July 4, 5) */
.calendar-days span.event-day {
  border: 1.5px solid rgba(212, 175, 55, 0.8);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
  font-weight: 600;
  background-color: rgba(254, 249, 231, 0.6);
  animation: breatheGold 2s infinite alternate;
}

/* Beating heart for the Wedding Day (July 6) */
.calendar-days span.wedding-day {
  background-color: var(--primary-maroon);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(128, 0, 32, 0.5);
  animation: heartPulse 1.4s ease-in-out infinite;
}

.calendar-days span.muted-day {
  color: #C0B0A8;
}

/* Slide 5 - Celebrations Timeline */
.timeline-container {
  width: 100%;
  max-height: 62dvh;
  overflow-y: auto;
  padding-right: 4px;
  margin: 15px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-gold) transparent;
}

.timeline-container::-webkit-scrollbar {
  width: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-gold);
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  background: white;
  border-radius: 12px;
  border: var(--border-gold);
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.04);
  margin-bottom: 16px;
  padding: 16px;
  text-align: left;
  transition: transform 0.2s ease;
}

.timeline-item:hover {
  transform: translateY(-2px);
}

.timeline-tag {
  display: inline-block;
  background-color: rgba(128, 0, 32, 0.08);
  color: var(--primary-maroon);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.timeline-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--primary-maroon);
  font-weight: 700;
  margin: 0 0 6px 0;
}

.timeline-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.timeline-venue, .timeline-dress {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin: 4px 0;
}

.timeline-dress strong {
  color: var(--text-muted);
}

.timeline-buttons {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.btn-mini {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--primary-gold);
  background-color: transparent;
  color: var(--primary-maroon);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background-color: var(--primary-maroon);
  color: white;
  border-color: var(--primary-maroon);
}

/* Slide 6 - RSVP Portal */
.rsvp-card {
  background: white;
  border-radius: 16px;
  border: var(--border-gold);
  box-shadow: 0 8px 25px rgba(128, 0, 32, 0.05);
  width: 100%;
  max-width: 340px;
  padding: 20px;
  margin: 10px 0;
}

/* RSVP Form tabs */
.rsvp-tabs {
  display: flex;
  border-bottom: 2px solid #EAE2DF;
  margin-bottom: 20px;
}

.rsvp-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
}

.rsvp-tab.active {
  color: var(--primary-maroon);
  border-bottom-color: var(--primary-maroon);
}

.rsvp-panel {
  display: none;
}

.rsvp-panel.active {
  display: block;
}

/* Inputs styling */
.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  border: 1.5px solid #E2DCDA;
  border-radius: 8px;
  background-color: var(--bg-warm-ivory);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-gold);
}

.checkbox-group {
  max-height: 105px;
  overflow-y: auto;
  border: 1.5px solid #E2DCDA;
  border-radius: 8px;
  padding: 8px;
  background-color: var(--bg-warm-ivory);
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin: 6px 0;
  cursor: pointer;
}

.checkbox-label input {
  margin-right: 8px;
  accent-color: var(--primary-maroon);
}

.btn-form-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary-maroon);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(128, 0, 32, 0.2);
  transition: all 0.3s ease;
  margin-top: 5px;
}

.btn-form-submit:hover {
  background: #600018;
  box-shadow: 0 6px 14px rgba(128, 0, 32, 0.3);
}

/* WhatsApp RSVP Card contents */
.wa-prompt {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.wa-btn {
  background: #25D366;
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.wa-btn:hover {
  background: #20BA56;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* Slide 7 - Contacts, Photos & Info */
.qr-container {
  background: white;
  border-radius: 12px;
  border: var(--border-gold);
  padding: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  background-color: #EEE;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.contacts-card {
  background: white;
  border-radius: 16px;
  border: var(--border-gold);
  padding: 16px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 15px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F3ECE9;
}

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

.contact-info {
  text-align: left;
}

.contact-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.contact-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.contact-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #E2DCDA;
  background-color: var(--bg-warm-ivory);
  color: var(--primary-maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-btn:hover {
  background-color: var(--primary-maroon);
  color: white;
  border-color: var(--primary-maroon);
}

/* Scroll Cues & Toasts */
.scrollcue {
  font-size: 1.8rem;
  color: var(--primary-gold);
  pointer-events: none;
  animation: bob 1.8s ease-in-out infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(128, 0, 32, 0.95);
  border: 1px solid var(--primary-gold);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  max-width: 80%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Float music player and config */
.music-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.15);
  color: var(--primary-maroon);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.music-btn:active {
  transform: scale(0.9);
}

.music-btn.playing {
  animation: spinSlow 8s linear infinite;
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.15), 0 0 0 5px rgba(212, 175, 55, 0.15);
}

.music-btn .mslash {
  position: absolute;
  width: 26px;
  height: 2px;
  background-color: var(--primary-maroon);
  transform: rotate(-45deg);
  display: none;
}

.music-btn.muted .mslash {
  display: block;
}

/* Track list selector hidden by default, pops up on hover/click hold */
.playlist-popup {
  position: fixed;
  top: 68px;
  right: 16px;
  background: white;
  border-radius: 12px;
  border: var(--border-gold);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 10px;
  z-index: 999;
  width: 180px;
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

.playlist-popup.show {
  display: block;
}

.playlist-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-gold);
  margin-bottom: 6px;
  border-bottom: 1px solid #EEE;
  padding-bottom: 4px;
  text-align: center;
}

.playlist-track {
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.playlist-track:hover {
  background-color: rgba(212, 175, 55, 0.1);
}

.playlist-track.active {
  background-color: rgba(128, 0, 32, 0.06);
  color: var(--primary-maroon);
  font-weight: 600;
}

/* Animations */
@keyframes floatGanesha {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes rotateMandala {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes breatheGold {
  0% { box-shadow: 0 0 4px rgba(212, 175, 55, 0.2); }
  100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.6); }
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.1); }
  40% { transform: scale(1.02); }
  60% { transform: scale(1.07); }
  80% { transform: scale(1); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 0.9; }
}

/* Responsive tweaks */
@media (max-width: 360px) {
  .screen {
    padding: 30px 16px;
  }
  .cover-title {
    font-size: 2.7rem;
  }
  .cover-img-container {
    width: 160px;
    height: 160px;
  }
  .shloka-text {
    font-size: 0.95rem;
  }
  .calendar-box {
    padding: 10px;
  }
  .timeline-container {
    max-height: 52dvh;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
