@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Playfair+Display:ital,wght@0,600;0,800;1,400&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --primary-pink: #ff85a2;
  --secondary-pink: #fbb1bd;
  --blush-bg: #ffe5ec;
  --deep-rose: #a23e48;
  --dark-text: #4a282a;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-color: rgba(162, 62, 72, 0.15);
}

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

body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #ffe5ec 0%, #ffcad4 50%, #fbb1bd 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  font-family: 'Poppins', sans-serif;
  color: var(--dark-text);
  overflow-x: hidden;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Background Hearts */
.bg-hearts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  color: var(--primary-pink);
  font-size: 20px;
  opacity: 0.6;
  animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-105vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* App Container */
.app-container {
  width: 90%;
  max-width: 500px;
  perspective: 1000px;
  z-index: 10;
  margin: 20px auto;
}

/* Glassmorphic Panel Card */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 30px 24px;
  box-shadow: 0 20px 40px var(--shadow-color), 
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: center;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  position: relative;
}

.glass-panel.hidden {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  pointer-events: none;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
}

/* Music Control Widget */
.music-widget {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.music-widget:hover {
  transform: scale(1.1);
}

.music-disc {
  font-size: 24px;
  animation: spin 3s linear infinite;
  animation-play-state: paused;
}

.music-widget.playing .music-disc {
  animation-play-state: running;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Envelope Stage */
.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.envelope-title {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--dark-text);
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.envelope-container {
  width: 100%;
  max-width: 320px;
  height: 220px;
  background-color: #fff;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  box-shadow: 0 15px 35px var(--shadow-color);
  transition: transform 0.5s ease;
  overflow: hidden;
  border: 4px double var(--secondary-pink);
}

.envelope-container:hover {
  transform: translateY(-5px);
}

.envelope-paper {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  background: #fff0f3;
  border-radius: 8px;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
  border: 1px dashed var(--primary-pink);
}

.envelope-paper p {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 600;
  color: var(--deep-rose);
  margin-bottom: 10px;
}

.heart-seal {
  font-size: 50px;
  color: var(--primary-pink);
  animation: heartPulse 1.2s infinite alternate;
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

.envelope-hint {
  font-size: 0.85rem;
  color: var(--deep-rose);
  margin-top: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Polaroid Photo Style */
.polaroid-container {
  background: white;
  padding: 15px 15px 25px 15px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transform: rotate(-2deg);
  margin: 15px auto 25px auto;
  max-width: 250px;
  transition: transform 0.4s ease;
}

.polaroid-container:hover {
  transform: rotate(1deg) scale(1.03);
}

.polaroid-gif {
  width: 100%;
  height: 200px;
  border-radius: 4px;
  border: 1px solid #eee;
  overflow: hidden;
  background: #fafafa;
}

.polaroid-gif iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.polaroid-caption {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--dark-text);
  font-weight: 600;
}

/* Typography & Content styling */
h1.main-title {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 10px;
  line-height: 1.3;
}

p.sub-title {
  font-size: 1rem;
  color: var(--deep-rose);
  margin-bottom: 25px;
  font-weight: 500;
}

/* Buttons */
.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  min-height: 80px;
  position: relative;
}

.custom-btn {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 14px 35px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-yes {
  background: linear-gradient(135deg, var(--primary-pink) 0%, #ff527b 100%);
  color: white;
}

.btn-yes:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 25px rgba(255, 82, 123, 0.35);
}

.btn-no {
  background: white;
  color: var(--dark-text);
  border: 2px solid var(--secondary-pink);
}

.btn-no:hover {
  background: var(--blush-bg);
  transform: scale(0.95);
}

/* Celebration Stage */
.canvas-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.celebration-wrapper {
  z-index: 5;
  position: relative;
}

.our-story-title {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 30px 0 15px 0;
  color: var(--dark-text);
  position: relative;
  display: inline-block;
}

.our-story-title::after {
  content: '💖';
  position: absolute;
  right: -25px;
  top: -2px;
}

.our-story-title::before {
  content: '💖';
  position: absolute;
  left: -25px;
  top: -2px;
}

/* Carousel Section */
.carousel-viewport {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 15px;
  padding: 10px 5px 20px 5px;
  scrollbar-width: none; /* Firefox */
}

.carousel-viewport::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.carousel-card {
  flex: 0 0 85%;
  scroll-snap-align: center;
  background: white;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--glass-border);
  text-align: left;
  transition: transform 0.3s ease;
}

.carousel-card:hover {
  transform: translateY(-4px);
}

.carousel-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.carousel-header {
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 6px;
}

.carousel-desc {
  font-size: 0.8rem;
  color: #6a4c4e;
  line-height: 1.4;
}

/* Love Reason Card */
.reason-box {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 20px;
  margin-top: 10px;
  border: 1px dashed var(--primary-pink);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.reason-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--deep-rose);
  line-height: 1.5;
  text-align: center;
  transition: opacity 0.3s ease;
}

.reason-btn {
  background: var(--primary-pink);
  border: none;
  color: white;
  padding: 10px 22px;
  font-size: 0.9rem;
  border-radius: 30px;
  margin-top: 15px;
  cursor: pointer;
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(255, 133, 162, 0.2);
  transition: all 0.3s ease;
}

.reason-btn:hover {
  background: #ff527b;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 82, 123, 0.3);
}

.send-msg-btn {
  margin-top: 25px;
  width: 100%;
  background: #25d366; /* WhatsApp color */
  color: white;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

.send-msg-btn:hover {
  transform: scale(1.03);
  background: #20ba59;
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.35);
}

/* Mobile Styling tweaks */
@media (max-width: 480px) {
  .glass-panel {
    padding: 24px 18px;
  }
  
  h1.main-title {
    font-size: 1.45rem;
  }
  
  .custom-btn {
    font-size: 0.95rem;
    padding: 12px 28px;
  }
  
  .envelope-container {
    max-width: 280px;
    height: 200px;
  }
  
  .polaroid-container {
    max-width: 220px;
  }
  
  .polaroid-gif {
    height: 170px;
  }
}