/* ============================================
   IMPORTS & RESET
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

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

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --bg-primary:     #0a0a0f;
  --bg-secondary:   #0f0f1a;
  --bg-card:        rgba(255, 255, 255, 0.04);
  --accent-pink:    #ff4d8d;
  --accent-rose:    #ff6b9d;
  --accent-purple:  #b56cf5;
  --accent-gold:    #f0c060;
  --text-primary:   #f0e6f0;
  --text-secondary: #a890b8;
  --text-muted:     #6b5878;
  --border-glow:    rgba(255, 77, 141, 0.25);
  --shadow-card:    0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(181, 108, 245, 0.08);
  --transition:     all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(181, 108, 245, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 77, 141, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(181, 108, 245, 0.06) 0%, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body.popup-open {
  overflow: hidden;
}

/* ============================================
   POPUP OVERLAY
   ============================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 4, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 20px;
  animation: popupFadeIn 0.5s ease forwards;
}

.popup-overlay.hiding {
  animation: popupFadeOut 0.5s ease forwards;
}

@keyframes popupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popupFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Popup Card */
.popup-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 10, 35, 0.95), rgba(15, 8, 25, 0.98));
  border: 1px solid rgba(255, 77, 141, 0.2);
  border-radius: 28px;
  padding: 52px 48px 44px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(181, 108, 245, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: cardPop 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: visible;
}

@keyframes cardPop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Deco heart */
.popup-deco {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(255, 77, 141, 0.5), 0 0 0 6px rgba(10, 10, 15, 1);
}

.popup-heart-bg {
  width: 32px;
  height: 32px;
  fill: #fff;
  animation: heartbeat 1.4s ease-in-out infinite;
}

/* Popup texts */
.popup-pre {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 10px;
  margin-top: 8px;
}

.popup-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  background: linear-gradient(135deg, #f0e6f0 0%, var(--accent-rose) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.2;
}

.popup-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* Popup buttons wrapper */
.popup-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  position: relative;
  min-height: 52px;
}

/* Base button */
.popup-btn {
  padding: 13px 28px;
  border-radius: 50px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

/* YES button */
.btn-yes {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 77, 141, 0.4);
}

.btn-yes:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 36px rgba(255, 77, 141, 0.6);
}

.btn-yes:active {
  transform: scale(0.97);
}

/* NO button */
.btn-no {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

/* Dodge animation when 'No' tries to be clicked */
@keyframes noDodge {
  0%   { transform: translate(0,      0);      }
  20%  { transform: translate(120px, -30px);   }
  40%  { transform: translate(-90px, -60px);   }
  60%  { transform: translate(80px,   30px);   }
  80%  { transform: translate(-60px, -20px);   }
  100% { transform: translate(0,      0);      }
}

.btn-no.dodging {
  animation: noDodge 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Swap animation: No becomes Yes label */
.btn-no.became-yes {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(255, 77, 141, 0.4);
  animation: labelSwap 0.35s ease;
}

@keyframes labelSwap {
  0%   { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Hint text */
.popup-hint {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  min-height: 18px;
  transition: opacity 0.3s ease;
}


/* ============================================
   PARTICLES
   ============================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
}

.particle.star {
  background: var(--accent-gold);
  width: 2px;
  height: 2px;
  box-shadow: 0 0 6px 2px var(--accent-gold);
}

.particle.heart-p {
  width: 8px;
  height: 8px;
  background: none;
  font-size: 10px;
  border-radius: 0;
  color: var(--accent-pink);
  opacity: 0;
  animation: floatHeart var(--dur, 10s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes floatParticle {
  0%   { opacity: 0; transform: translateY(100vh) scale(0.5); }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1.2); }
}

@keyframes floatHeart {
  0%   { opacity: 0; transform: translateY(100vh) rotate(-15deg) scale(0.5); }
  15%  { opacity: 0.5; }
  85%  { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-5vh) rotate(15deg) scale(0.8); }
}

/* ============================================
   PLAY BUTTON
   ============================================ */
.play-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 30px rgba(255, 77, 141, 0.4), 0 2px 8px rgba(0,0,0,0.3);
  transition: var(--transition);
  animation: btnPulse 2s ease-in-out infinite;
}

.play-btn svg { flex-shrink: 0; }

.play-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 40px rgba(255, 77, 141, 0.55);
}

.play-btn.visible { display: flex; }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(255, 77, 141, 0.4); }
  50%       { box-shadow: 0 8px 50px rgba(255, 77, 141, 0.65); }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 60px 20px 80px;
  gap: 56px;
}

/* ============================================
   FADE IN ANIMATIONS
   ============================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0s);
}

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

/* ============================================
   TITLE SECTION
   ============================================ */
.title-section {
  text-align: center;
}

.subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
  font-weight: 400;
}

.title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  line-height: 1.1;
  background: linear-gradient(135deg, #f0e6f0 0%, var(--accent-rose) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   COUPLE SECTION
   ============================================ */
.couple-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
  width: 100%;
  max-width: 900px;
}

/* ============================================
   PHOTO CARD
   ============================================ */
.photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.photo-wrapper {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-glow);
  transition: var(--transition);
  cursor: pointer;
}

.photo-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(181, 108, 245, 0.15), rgba(255, 77, 141, 0.1));
  z-index: 1;
  opacity: 0;
  transition: var(--transition);
}

.photo-wrapper:hover::before { opacity: 1; }

.photo-wrapper:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 77, 141, 0.2);
  border-color: rgba(255, 77, 141, 0.5);
}

.photo {
  display: block;
  width: clamp(140px, 28vw, 240px);
  height: clamp(180px, 36vw, 300px);
  object-fit: cover;
  transition: var(--transition);
}

.photo-wrapper:hover .photo {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 28px 16px 16px;
  background: linear-gradient(to top, rgba(10,10,15,0.85) 0%, transparent 100%);
  display: flex;
  justify-content: center;
  transform: translateY(4px);
  opacity: 0;
  transition: var(--transition);
}

.photo-wrapper:hover .photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

.photo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.08em;
}

.photo-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
}

/* ============================================
   HEART ICON
   ============================================ */
.heart-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.heart-icon {
  width: 54px;
  height: 54px;
  fill: var(--accent-pink);
  filter: drop-shadow(0 0 14px rgba(255, 77, 141, 0.7)) drop-shadow(0 0 30px rgba(255, 77, 141, 0.3));
  animation: heartbeat 1.4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes heartbeat {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 14px rgba(255, 77, 141, 0.7)) drop-shadow(0 0 30px rgba(255, 77, 141, 0.3)); }
  14%  { transform: scale(1.2);  filter: drop-shadow(0 0 22px rgba(255, 77, 141, 1))   drop-shadow(0 0 50px rgba(255, 77, 141, 0.5)); }
  28%  { transform: scale(1);    }
  42%  { transform: scale(1.14); }
  70%  { transform: scale(1);    }
  100% { transform: scale(1);    }
}

.heart-pulse-ring {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255, 77, 141, 0.5);
  animation: pulseRing 1.8s ease-out infinite;
}

.heart-pulse-ring.delay-1 {
  animation-delay: 0.6s;
}

@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ============================================
   QUOTE SECTION
   ============================================ */
.quote-section {
  text-align: center;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.romantic-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.9;
  letter-spacing: 0.02em;
  border: none;
  quotes: none;
  padding: 0 16px;
}

.romantic-quote em {
  color: var(--accent-rose);
  font-style: normal;
}

.quote-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.quote-divider span {
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-muted));
}

.quote-divider span:last-child {
  background: linear-gradient(to left, transparent, var(--text-muted));
}

.quote-divider svg {
  fill: var(--accent-pink);
  opacity: 0.7;
  flex-shrink: 0;
  animation: heartbeat 2s ease-in-out infinite;
}

.date-text {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.heart-emoji {
  color: var(--accent-pink);
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}

/* ============================================
   VIEWER COUNT
   ============================================ */
.viewer-count {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  z-index: 10;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   CUTE NYAAAAA TOAST
   ============================================ */
.cute-toast {
  position: fixed;
  z-index: 8000;
  pointer-events: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.06em;
  white-space: nowrap;

  /* gradient text */
  background: linear-gradient(135deg, #fff 0%, var(--accent-rose) 45%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* glow */
  filter: drop-shadow(0 0 18px rgba(255, 77, 141, 0.8)) drop-shadow(0 0 40px rgba(181, 108, 245, 0.5));

  opacity: 0;
  transform: scale(0.4) rotate(-6deg);
  transition: none;
}

.cute-toast.show {
  animation: cuteToastPop 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cuteToastPop {
  0%   { opacity: 0;   transform: scale(0.3)  rotate(-8deg);  }
  18%  { opacity: 1;   transform: scale(1.15) rotate(3deg);   }
  30%  { opacity: 1;   transform: scale(0.95) rotate(-2deg);  }
  42%  { opacity: 1;   transform: scale(1.04) rotate(1deg);   }
  55%  { opacity: 1;   transform: scale(1)    rotate(0deg);   }
  75%  { opacity: 1;   transform: scale(1)    rotate(0deg);   }
  100% { opacity: 0;   transform: scale(0.7)  rotate(4deg) translateY(-30px); }
}

/* ============================================
   CORNER GIF
   ============================================ */
.corner-gif {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 77, 141, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 77, 141, 0.12);
  animation: gifFloat 4s ease-in-out infinite;
  opacity: 0.88;
}

.corner-gif:hover {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 77, 141, 0.3);
  transition: all 0.3s ease;
}

@keyframes gifFloat {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-6px); }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-pink); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .couple-section {
    flex-direction: column;
    gap: 0;
  }

  .heart-container {
    width: 60px;
    height: 60px;
    margin: 8px 0;
  }

  .heart-icon {
    width: 42px;
    height: 42px;
  }

  .play-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 18px;
  }

  .main {
    gap: 40px;
  }
}

@media (max-width: 380px) {
  .photo {
    width: 130px;
    height: 170px;
  }
}
