/* Fonts Definitions */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

/* Base Design Variables & Setup */
:root {
  --color-gold: #ffeed2;
  --color-gold-dark: #e1d0b4;
  --color-red-primary: #800000;
  --color-red-deep: #5a0000;
  --color-red-dark: #2a0000;
  --color-text-light: #ffffff;
  --color-text-muted: rgba(255, 238, 210, 0.7);
  --color-card-bg: rgba(90, 0, 0, 0.45);
  --color-card-border: rgba(255, 238, 210, 0.15);
  --shadow-color: rgba(255, 238, 210, 0.15);
  --font-elegant: 'Dancing Script', cursive, serif;
  --font-base: 'Lora', serif;
  --font-accent: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-red-dark);
  color: var(--color-gold);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animations */
@keyframes ambient-rise {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-20vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes seal-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 20px var(--shadow-color), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 4px 30px rgba(255, 238, 210, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
}

@keyframes shine {
  0% {
    left: -50%;
  }
  100% {
    left: 150%;
  }
}

@keyframes sound-wave-play {
  0%, 100% {
    height: 3px;
  }
  50% {
    height: 18px;
  }
}

@keyframes fade-out-screen {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
    visibility: hidden;
  }
}

@keyframes slide-up-in {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ken-burns-zoom {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes text-glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 238, 210, 0.15), 0 0 2px rgba(255, 238, 210, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 238, 210, 0.5), 0 0 5px rgba(255, 238, 210, 0.8), 0 0 10px rgba(255, 238, 210, 0.3);
  }
}

/* UTILITIES */
.font-accent {
  font-family: var(--font-accent);
}

.hidden {
  display: none !important;
}

.hidden-opacity {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* Twinkling sparkles fixed background overlay */
.sparkles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}

/* Scroll reveal triggers */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* LANDING ENVELOPE SCREEN */
.envelope-container {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(to bottom right, var(--color-red-deep), #400000, var(--color-red-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
}

.envelope-container.opened {
  animation: fade-out-screen 1.2s forwards;
  pointer-events: none;
}

.floating-elements-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-symbol {
  position: absolute;
  bottom: -40px;
  font-size: 16px;
  font-weight: bold;
  user-select: none;
  animation: ambient-rise 10s ease-in-out infinite;
}

.envelope-card-wrapper {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 520px;
  background: var(--color-red-primary);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 40px rgba(255, 238, 210, 0.15);
  padding: 100px 30px 50px 30px;
  text-align: center;
  overflow: hidden;
}

/* Background Double Happiness watermark inside envelope card */
.envelope-card-wrapper::before, .envelope-card-wrapper::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  background-image: url('https://chungdoi.com/images/themes/song-hy-red/chu-hy.webp');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.envelope-card-wrapper::before {
  top: -60px;
  left: -80px;
  transform: rotate(30deg);
}

.envelope-card-wrapper::after {
  bottom: -60px;
  right: -80px;
  transform: rotate(-30deg);
}

.envelope-seal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at 30% 30%, #ffeed2, var(--color-gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: seal-pulse 2.5s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(255, 238, 210, 0.4);
}

.seal-inner {
  font-size: 32px;
  color: var(--color-red-primary);
  opacity: 0.95;
  font-weight: bold;
  line-height: 1;
}

.wedding-title-elegant {
  font-family: var(--font-elegant);
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--color-gold);
  font-weight: normal;
  animation: text-glow 4s ease-in-out infinite;
}

.wedding-title-elegant .name-block {
  display: block;
}

.wedding-title-elegant .ampersand {
  font-family: serif;
  font-size: 1.8rem;
  display: block;
  margin: 5px 0;
  opacity: 0.85;
}

.divider-hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.divider-hearts .line {
  height: 1px;
  width: 60px;
}

.divider-hearts .line:first-child {
  background: linear-gradient(to right, transparent, var(--color-gold));
}

.divider-hearts .line:last-child {
  background: linear-gradient(to left, transparent, var(--color-gold));
}

.heart-symbol {
  font-size: 18px;
  opacity: 0.8;
}

.envelope-date {
  font-family: var(--font-base);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--color-gold-dark);
  margin-bottom: 25px;
}

.envelope-invitation-text {
  font-family: var(--font-base);
  font-size: 16px;
  font-style: italic;
  color: var(--color-gold-dark);
  margin-bottom: 35px;
}

.btn-open-card {
  position: relative;
  background-color: var(--color-gold);
  color: var(--color-red-primary);
  border: none;
  padding: 12px 40px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 238, 210, 0.35);
  font-family: var(--font-base);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-open-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 238, 210, 0.5);
}

.btn-open-card:active {
  transform: scale(0.98);
}

.btn-shine {
  position: absolute;
  top: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 3s ease-in-out infinite;
}

/* MAIN CONTENT LAYOUT */
.main-content-wrapper {
  max-width: 650px;
  margin: 0 auto;
  padding: 20px 15px 90px 15px;
  background-color: var(--color-red-dark);
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  transition: opacity 1.5s ease-out;
}

.main-content-wrapper.revealed {
  opacity: 1;
  pointer-events: auto;
  height: auto;
  overflow: visible;
  animation: slide-up-in 1.2s ease-out;
}

/* FLOATING MUSIC TOGGLE BUTTON */
.float-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 238, 210, 0.9);
  border: 1px solid var(--color-gold);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.float-btn:hover {
  transform: scale(1.1);
  background-color: var(--color-gold);
}

.soundwaves {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 25px;
  height: 20px;
}

.wave-bar {
  width: 3px;
  height: 5px;
  background-color: var(--color-red-primary);
  border-radius: 2px;
}

.soundwaves.playing .wave-bar {
  animation: sound-wave-play 1s infinite ease-in-out;
}

.soundwaves.playing .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.soundwaves.playing .wave-bar:nth-child(2) { animation-delay: 0.3s; }
.soundwaves.playing .wave-bar:nth-child(3) { animation-delay: 0.6s; }
.soundwaves.playing .wave-bar:nth-child(4) { animation-delay: 0.2s; }

.sound-off-icon {
  font-size: 20px;
}

/* GENERAL SECTIONS & PANEL CARDS */
.section-container {
  margin-bottom: 40px;
  padding: 30px 20px;
  text-align: center;
  position: relative;
}

.card-panel {
  background: var(--color-card-bg);
  border: 1px solid rgba(255, 238, 210, 0.2);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 238, 210, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-panel:hover {
  border-color: rgba(255, 238, 210, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 25px rgba(255, 238, 210, 0.18);
  transform: translateY(-4px);
}

.section-title {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  color: var(--color-gold);
  margin-bottom: 25px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.divider-ornament {
  font-size: 20px;
  color: var(--color-gold-dark);
  margin: 30px 0;
  opacity: 0.8;
}

/* BUTTONS */
.gold-btn {
  background-color: var(--color-gold);
  color: var(--color-red-primary);
  border: none;
  font-weight: bold;
  padding: 10px 24px;
  font-size: 15px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-base);
  box-shadow: 0 4px 12px rgba(255, 238, 210, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 238, 210, 0.4);
  background-color: #ffffff;
}

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

.outline-btn {
  background-color: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  font-weight: normal;
  padding: 9px 20px;
  font-size: 14px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.outline-btn:hover {
  background-color: var(--color-gold);
  color: var(--color-red-primary);
  transform: translateY(-2px);
}

/* 1. WELCOME COVER SECTION */
.welcome-section {
  padding-top: 10px;
}

.title-couple-small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--color-gold-dark);
  margin-bottom: 8px;
}

.small-seal {
  font-size: 20px;
  color: var(--color-gold);
  font-weight: bold;
}

.heading-wedding {
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 25px;
  opacity: 0.8;
  color: var(--color-gold-dark);
}

.cover-image-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 238, 210, 0.2);
}

.hero-cover-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: ken-burns-zoom 20s infinite ease-in-out;
}

.cover-image-container:hover .hero-cover-img {
  transform: scale(1.08);
}

/* 2. CEREMONY DETAILS SECTION */
.family-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.family-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.avatar-frame {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-gold);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 15px;
}

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

.role-title {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-bottom: 5px;
}

.member-name {
  font-size: 1.6rem;
  color: var(--color-gold);
  font-weight: normal;
  margin-bottom: 5px;
}

.relation-rank {
  font-size: 12px;
  font-style: italic;
  opacity: 0.8;
  margin-bottom: 12px;
}

.parents-info {
  font-size: 13px;
  color: var(--color-gold-dark);
  line-height: 1.5;
}

.parents-info strong {
  color: var(--color-gold);
}

.event-time-details {
  margin-top: 10px;
}

.event-title-h3 {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.event-desc {
  font-size: 13px;
  font-style: italic;
  opacity: 0.85;
  margin-bottom: 20px;
  color: var(--color-gold-dark);
}

.datetime-block {
  margin-bottom: 20px;
}

.time-item {
  font-size: 2.2rem;
  color: var(--color-gold);
  line-height: 1.2;
}

.date-item {
  font-size: 16px;
  font-weight: bold;
  margin: 5px 0;
}

.lunar-date-item {
  font-size: 13px;
  color: var(--color-gold-dark);
  font-style: italic;
}

.event-address {
  font-size: 15px;
  margin-bottom: 25px;
}

.event-action-buttons {
  margin-top: 15px;
}

/* 3. PHOTO GALLERY CAROUSEL */
.album-section {
  padding-left: 0;
  padding-right: 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 10px;
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
}

.carousel-slide img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(90, 0, 0, 0.7);
  border: 1px solid var(--color-gold-dark);
  color: var(--color-gold);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-control:hover {
  background-color: var(--color-red-primary);
  transform: translateY(-50%) scale(1.05);
}

.carousel-control:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.carousel-counter {
  margin-top: 15px;
  font-size: 14px;
  color: var(--color-gold-dark);
  font-weight: bold;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 238, 210, 0.3);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
  background-color: var(--color-gold);
  transform: scale(1.2);
}

/* 4. RECEPTION SECTION */
.countdown-container {
  margin: 15px 0;
}

.countdown-heading {
  font-size: 13px;
  letter-spacing: 1.5px;
  opacity: 0.75;
  margin-bottom: 20px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.countdown-box {
  width: 75px;
  height: 85px;
  background-color: rgba(90, 0, 0, 0.6);
  border: 1px solid var(--color-card-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.countdown-value {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--color-gold);
}

.countdown-label {
  font-size: 11px;
  color: var(--color-gold-dark);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.calendar-wrapper {
  margin: 10px auto;
  max-width: 320px;
}

.calendar-heading {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--color-gold-dark);
  font-weight: bold;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.calendar-table th {
  padding: 8px 5px;
  color: var(--color-gold-dark);
  font-weight: 500;
  font-size: 12px;
  opacity: 0.7;
}

.calendar-table td {
  padding: 8px 5px;
  text-align: center;
  color: var(--color-gold-dark);
}

.calendar-table td.wedding-highlight-day {
  color: var(--color-red-primary);
  font-weight: bold;
  position: relative;
}

.calendar-table td.wedding-highlight-day .highlight-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(255, 238, 210, 0.5);
}

.reception-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
}

.btn-rsvp-action {
  width: 100%;
  max-width: 280px;
  padding: 12px 20px;
  font-size: 15px;
}

/* 5. MAP SECTION */
.map-section {
  padding: 0 0 20px 0;
}

.map-iframe-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-card-border);
}

/* 6. GUEST BOOK SECTION */
.guestbook-desc {
  font-size: 14px;
  color: var(--color-gold-dark);
  margin-bottom: 25px;
  font-style: italic;
}

.wishes-input-form {
  text-align: left;
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--color-gold-dark);
  margin-bottom: 6px;
  font-weight: bold;
}

.textarea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.textarea-header label {
  margin-bottom: 0;
}

.btn-ai-suggest-wish {
  background: rgba(255, 238, 210, 0.15);
  border: 1px solid rgba(255, 238, 210, 0.3);
  color: var(--color-gold);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-ai-suggest-wish:hover {
  background: rgba(255, 238, 210, 0.3);
  border-color: var(--color-gold);
}

.wishes-input-form input[type="text"],
.wishes-input-form textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: rgba(90, 0, 0, 0.5);
  border: 1px solid var(--color-card-border);
  color: var(--color-gold);
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wishes-input-form input[type="text"]:focus,
.wishes-input-form textarea:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 8px rgba(255, 238, 210, 0.2);
}

.btn-submit-wish {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  font-size: 15px;
}

.wishes-display-wrapper {
  margin-top: 15px;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.wishes-title-h3 {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 15px;
  text-align: center;
}

.wishes-list {
  max-height: 650px;
  overflow-y: auto;
  padding-right: 5px;
}

.wishes-list::-webkit-scrollbar {
  width: 6px;
}

.wishes-list::-webkit-scrollbar-track {
  background: rgba(90, 0, 0, 0.2);
  border-radius: 10px;
}

.wishes-list::-webkit-scrollbar-thumb {
  background: var(--color-card-border);
  border-radius: 10px;
}

.wishes-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-dark);
}

.wish-item-empty {
  text-align: center;
  font-style: italic;
  color: var(--color-gold-dark);
  font-size: 14px;
  padding: 20px 0;
}

.wish-card {
  background-color: rgba(90, 0, 0, 0.4);
  border: 1px solid rgba(255, 238, 210, 0.08);
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 12px;
  animation: slide-up-in 0.4s ease-out;
}

.wish-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  border-bottom: 1px dashed rgba(255, 238, 210, 0.1);
  padding-bottom: 4px;
}

.wish-author {
  font-weight: bold;
  font-size: 13px;
  color: var(--color-gold);
}

.wish-time {
  font-size: 10px;
  color: var(--color-gold-dark);
  opacity: 0.6;
}

.wish-text {
  font-size: 13px;
  color: var(--color-gold-dark);
  white-space: pre-wrap;
  line-height: 1.4;
}

/* 7. GIFT BOX SECTION */
.gift-desc {
  font-size: 14px;
  color: var(--color-gold-dark);
  margin-bottom: 20px;
  padding: 0 10px;
  font-style: italic;
}

.gift-envelope-entrance {
  width: 280px;
  height: 180px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 238, 210, 0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.gift-envelope-entrance:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 18px 45px rgba(255, 238, 210, 0.25), 0 0 25px rgba(255, 238, 210, 0.15);
}

.gift-envelope-entrance img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.envelope-entrance-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gift-envelope-entrance:hover .envelope-entrance-overlay {
  opacity: 1;
}

.tap-text {
  color: var(--color-gold);
  font-family: var(--font-accent);
  font-size: 1.1rem;
  border: 1.5px solid var(--color-gold);
  padding: 6px 15px;
  border-radius: 30px;
  background: rgba(128, 0, 0, 0.9);
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ENVELOPE MODAL Centering Styles */
.envelope-modal-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-envelope-box {
  position: relative;
  width: 310px;
  height: 460px;
  perspective: 1000px;
}

.gift-envelope-front {
  position: absolute;
  inset: 0;
  z-index: 5;
  background-color: var(--color-red-deep);
  border: 1.5px solid var(--color-gold);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.85s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.85s ease, visibility 0.85s;
}

.gift-envelope-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seal-button {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe699, #cda135);
  border: 3px double #800000;
  color: #800000;
  font-family: var(--font-accent);
  font-weight: bold;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  animation: seal-pulse 2.2s ease-in-out infinite;
  z-index: 10;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.seal-button:hover {
  transform: scale(1.08);
  background: radial-gradient(circle, #ffffff, #cda135);
}

.gift-envelope-letter {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  background: var(--color-red-deep);
  border: 1.5px solid var(--color-gold);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  z-index: 2;
  opacity: 0;
  transform: scale(0.6) translateY(0);
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.9s ease;
  pointer-events: none;
  text-align: center;
}

/* Envelope opened state */
.gift-envelope-box.opened .gift-envelope-front {
  transform: translateY(120%) rotate(-12deg) scale(0.8);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gift-envelope-box.opened .seal-button {
  transform: scale(0) rotate(360deg);
  opacity: 0;
}

.gift-envelope-box.opened .gift-envelope-letter {
  opacity: 1;
  transform: scale(1.06) translateY(0);
  pointer-events: auto;
  z-index: 10;
}

@media (max-width: 480px) {
  .gift-envelope-box {
    width: 280px;
    height: 420px;
  }
  .gift-envelope-box.opened .gift-envelope-letter {
    transform: scale(1) translateY(0);
  }

  /* Mobile optimization for gift modal bank details */
  .gift-envelope-letter {
    padding: 18px 12px;
  }

  .bank-info-container {
    padding: 15px 10px;
  }

  .screen-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .screen-header .modal-title {
    font-size: 1.25rem !important;
  }

  .btn-back-selection {
    padding: 4px 8px;
    font-size: 11px;
  }

  .bank-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .bank-detail-item .label {
    font-size: 12px;
  }

  .bank-detail-item .value {
    font-size: 13px;
    align-self: flex-start;
  }

  .account-copy-wrapper {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .highlight-acc {
    font-size: 13px;
    padding: 3px 6px;
    flex-grow: 1;
    text-align: center;
  }

  .btn-copy-acc {
    padding: 4px 8px;
    font-size: 10px;
    white-space: nowrap;
  }
  
  .qr-code-img {
    width: 150px;
  }
}

/* MODAL DIALOGS OVERLAYS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-card {
  background: var(--color-red-deep);
  border: 1px solid var(--color-gold);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 30px 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay:not(.hidden) .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--color-gold);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

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

.modal-title {
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--color-gold-dark);
  margin-bottom: 25px;
  opacity: 0.8;
  line-height: 1.4;
}

.modal-form {
  text-align: left;
}

.rsvp-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rsvp-radio-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-gold-dark);
  background-color: rgba(90, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
  transition: background-color 0.2s, border-color 0.2s;
}

.rsvp-radio-container:hover {
  background-color: rgba(90, 0, 0, 0.7);
  border-color: rgba(255, 238, 210, 0.4);
}

.rsvp-radio-container input[type="radio"] {
  display: none;
}

.custom-radio {
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-gold-dark);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.rsvp-radio-container input[type="radio"]:checked + .custom-radio {
  border-color: var(--color-gold);
}

.rsvp-radio-container input[type="radio"]:checked + .custom-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-gold);
}

.modal-form input[type="text"],
.modal-form select,
.modal-form input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  background-color: rgba(90, 0, 0, 0.5);
  border: 1px solid var(--color-card-border);
  color: var(--color-gold);
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 14px;
  outline: none;
}

.modal-form input[type="text"]:focus,
.modal-form select:focus,
.modal-form input[type="tel"]:focus {
  border-color: var(--color-gold);
}

.btn-rsvp-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 10px;
}

/* GIFT BOX MODAL SPECIALS */
.gift-modal-card {
  max-width: 440px;
}

.bank-info-container {
  background-color: rgba(90, 0, 0, 0.4);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  padding: 20px 15px;
  text-align: left;
}

.bank-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-card-border);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.bank-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.bank-name {
  font-weight: bold;
  font-size: 14px;
  color: var(--color-gold);
}

.bank-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bank-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.bank-detail-item .label {
  color: var(--color-gold-dark);
  opacity: 0.8;
}

.bank-detail-item .value {
  font-weight: bold;
  color: var(--color-gold);
}

.account-copy-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.highlight-acc {
  background-color: rgba(255, 238, 210, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 15px;
  letter-spacing: 1px;
}

.btn-copy-acc {
  background-color: var(--color-gold);
  color: var(--color-red-primary);
  border: none;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-base);
  transition: opacity 0.2s;
}

.btn-copy-acc:hover {
  opacity: 0.9;
}

.qr-code-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px dashed var(--color-card-border);
  padding-top: 15px;
}

.qr-code-img {
  display: block;
  width: 180px;
  height: auto;
  border-radius: 8px;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
}

.qr-hint {
  font-size: 11px;
  color: var(--color-gold-dark);
  opacity: 0.75;
  font-style: italic;
  line-height: 1.3;
}

/* MOBILE BOTTOM NAV BAR (HIDDEN BY DEFAULT, VISIBLE ON LG/MOBILE SCREEN) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(42, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-t: 1px solid rgba(255, 238, 210, 0.15);
  z-index: 95;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.5);
  display: none; /* Display is toggled dynamically or in media query */
}

.nav-tabs-wrapper {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  max-width: 480px;
  margin: 0 auto;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: rgba(255, 238, 210, 0.5);
  text-decoration: none;
  font-size: 10px;
  gap: 3px;
  transition: color 0.3s;
}

.nav-tab.active {
  color: var(--color-gold);
}

.nav-tab .tab-icon {
  font-size: 18px;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--color-gold);
  color: var(--color-red-primary);
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* FOOTER */
.main-footer-section {
  text-align: center;
  padding: 40px 0 20px 0;
  border-top: 1px solid var(--color-card-border);
  margin-top: 40px;
}

.footer-happiness-seal {
  font-size: 2.2rem;
  color: var(--color-gold);
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-thankyou {
  font-size: 15px;
  font-style: italic;
  color: var(--color-gold-dark);
  margin-bottom: 5px;
}

.footer-couple {
  font-size: 1.8rem;
  color: var(--color-gold);
  font-weight: normal;
  margin-bottom: 20px;
}

.footer-attribution {
  font-size: 10px;
  color: var(--color-gold-dark);
  opacity: 0.5;
}

/* MEDIA QUERIES FOR RESPONSIVENESS */
@media (max-width: 600px) {
  .wedding-title-elegant {
    font-size: 2.3rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .family-columns-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .time-item {
    font-size: 1.8rem;
  }
  
  .countdown-box {
    width: 65px;
    height: 75px;
  }
  
  .countdown-value {
    font-size: 1.5rem;
  }
  
  .mobile-bottom-nav {
    display: block; /* Show bottom tabs on mobile devices */
  }
  
  .main-content-wrapper {
    padding-bottom: 100px; /* Offset bottom nav bar on mobile */
  }
  
  .float-btn {
    bottom: 90px; /* Offset music floating button above bottom nav bar */
  }
}

@media (min-width: 601px) {
  /* Scale details slightly on bigger tablets/screens */
  .envelope-card-wrapper {
    padding: 120px 50px 70px 50px;
  }
}

/* DESKTOP (COMPUTER) SPECIFIC CAROUSEL ADJUSTMENT */
@media (min-width: 1025px) {
  .carousel-slide img {
    max-height: 600px; /* Increase max height on computer screen to reduce vertical crop */
    object-position: center 10%; /* Center the crop window near the top of the image to keep the couple's heads visible */
  }
}

/* GIFT MODAL SELECTION & DUAL SCREENS STYLES */
.gift-screen {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gift-screen.hidden {
  display: none !important;
}

.gift-select-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
  margin-bottom: 10px;
}

.gift-select-btn {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 1.5px solid var(--color-gold-dark);
  background: rgba(90, 0, 0, 0.45);
  border-radius: 14px;
  color: var(--color-gold);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
  width: 100%;
}

.gift-select-btn:hover {
  transform: translateY(-3px);
  background: rgba(120, 0, 0, 0.7);
  border-color: var(--color-gold);
  box-shadow: 0 8px 20px rgba(255, 238, 210, 0.2);
}

.btn-emoji {
  font-size: 2.2rem;
  margin-right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-text-content {
  display: flex;
  flex-direction: column;
}

.gift-select-btn .btn-label {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-gold);
  line-height: 1.2;
}

.gift-select-btn .btn-subtext {
  font-size: 0.9rem;
  color: var(--color-gold-dark);
  opacity: 0.85;
  margin-top: 2px;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-card-border);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.btn-back-selection {
  background: transparent;
  border: 1.5px solid var(--color-gold-dark);
  color: var(--color-gold);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-base);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-back-selection:hover {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-red-primary);
  font-weight: bold;
}

/* EXPORT WISHES BUTTON STYLES */
.wishes-actions-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 25px;
}

.btn-export-wishes {
  background: rgba(90, 0, 0, 0.45);
  border: 1.5px dashed var(--color-gold);
  color: var(--color-gold);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-family: var(--font-base);
  cursor: pointer;
  transition: all 0.30s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-export-wishes:hover {
  background: var(--color-gold);
  color: var(--color-red-primary);
  border-style: solid;
  font-weight: bold;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 238, 210, 0.25);
}
