/* ============================================================
   FOREVER YOURS — Romantic CSS
   ============================================================ */

/* ── Google Font Import (fallback for offline) ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Great+Vibes&family=Lato:wght@300;400&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Moody, velvet romantic palette */
  --rose:        #e06c88;
  --rose-dark:   #ba4863;
  --rose-light:  #f2a9ba;
  --pink:        #f0b9c8;
  --gold:        #d4b254;
  --gold-light:  #f7e6ad;
  
  --dark:        #291a20;      /* Deep burgundy/espresso */
  --dark-2:      #38242b;      /* Slightly lighter burgundy */
  --dark-3:      #4a303a;      /* Highlight background */
  
  --text:        #f9eef1;      /* Soft cream text */
  --text-muted:  #ccaeb8;      /* Muted rose grey */
  
  --glass:       rgba(255, 255, 255, 0.03);
  --glass-border:rgba(212, 175, 55, 0.15); 
  
  --radius:      16px;
  --radius-lg:   24px;
  
  --shadow:      0 8px 30px rgba(0, 0, 0, 0.2); 
  
  --font-display:"Cormorant Garamond", Georgia, serif;
  --font-hand:  "Great Vibes", cursive;
  --font-body:  "Lato", system-ui, sans-serif;
  
  --transition: 0.3s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-image: radial-gradient(circle at 100% 0%, rgba(248, 182, 200, 0.15) 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, rgba(212, 175, 55, 0.08) 0%, transparent 40%);
  transform: translateZ(0); /* Hardware acceleration */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Canvas Hearts (Petals Update) ── */
#heartCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6; /* Slightly more visible for petals */
  will-change: transform;
  transform: translateZ(0);
}

/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-heart {
  font-size: clamp(3rem, 8vw, 5rem);
  animation: heartBeat 0.8s ease infinite alternate;
  filter: drop-shadow(0 0 15px var(--rose-light));
}
.preloader-text {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 4vw, 2.5rem); /* Made cursive larger */
  color: var(--rose);
  margin-top: 1rem;
  opacity: 0.9;
}
@keyframes heartBeat {
  from { transform: scale(1); }
  to   { transform: scale(1.15); } /* Softer heartbeat */
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 3vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(41, 26, 32, 0.95); /* Opaque for performance */
  /* Remove backdrop-filter for performance */
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.nav-logo {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--rose);
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 2px rgba(212, 175, 55, 0.2);
}
.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* Soft, airy romantic gradient background */
  background: 
    radial-gradient(ellipse at 50% 30%, rgba(255, 215, 230, 0.6) 0%, transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83v58.34h-58.34v-.83l57.51-58.34h.01zM0 54.627l54.627-54.627h-53.797v53.797h-.83z' fill='%23d4af37' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E"); /* Subtle gold texture */
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(5rem, 10vw, 10rem) clamp(1rem, 5vw, 3rem) 3rem;
  max-width: 800px;
}
.rose-emoji {
  font-size: clamp(3rem, 7vw, 5rem);
  display: block;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 10px rgba(224, 122, 147, 0.4));
}
.animate-float {
  animation: floatY 4s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0) translateZ(0);    }
  50%       { transform: translateY(-12px) translateZ(0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem); /* Slightly larger for elegance */
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--rose-dark);
}
.gradient-text {
  /* Using calligraphy font for the highlight instead of a gradient */
  font-family: var(--font-hand);
  font-size: 1.3em;
  color: var(--gold);
  line-height: 0.8;
  padding: 0 0.2em;
  font-weight: normal;
  text-shadow: 1px 1px 3px rgba(212, 175, 55, 0.2);
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.9;
  font-weight: 300;
}
.hero-subtitle em { color: var(--rose-dark); font-style: italic; font-weight: 400; }

/* ── Buttons (Wax Seal Style) ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: clamp(0.9rem, 2vw, 1.2rem) clamp(2rem, 4vw, 3rem);
  background: var(--rose);
  border: 1px solid var(--rose-light);
  border-radius: 60px;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 8px 25px rgba(224, 122, 147, 0.35);
  transition: all var(--transition);
}
.btn-primary:hover {
  transform: translateY(-4px);
  background: var(--rose-dark);
  box-shadow: 0 12px 35px rgba(224, 122, 147, 0.45);
  border-color: var(--rose-dark);
}
.btn-icon { font-size: 1.2em; }

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: scrollBob 2.5s ease-in-out infinite;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0.8;
}
@keyframes scrollBob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(10px); }
}

/* ── Generic Section ── */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 8vw, 10rem) clamp(1rem, 5vw, 5vw);
  max-width: 1200px;
  margin: 0 auto;
  contain: content; /* Containment for layout performance */
}
.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--gold-light);
  border-radius: 40px;
  padding: 0.4rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--rose-dark);
  line-height: 1.2;
}
.section-desc {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Countdown ── */
.countdown-date-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.countdown-date-wrapper label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
#specialDate {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--rose-dark);
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
}
#specialDate:focus { border-color: var(--rose); }

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  flex-wrap: wrap;
}
.countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: var(--dark-2); /* Solid color instead of glass */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 2rem) clamp(1.2rem, 4vw, 3rem);
  min-width: clamp(80px, 15vw, 130px);
  /* Reduced blur for performance */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); 
  transition: transform var(--transition);
}
.countdown-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cd-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--rose-dark);
  line-height: 1;
}
.cd-label {
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.countdown-sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold);
  line-height: 1;
  align-self: flex-start;
  padding-top: clamp(0.6rem, 2vw, 1rem);
}

/* ── Quotes (Parchment Ribbon) ── */
.quotes-section {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 5vw, 6rem) clamp(1rem, 5vw, 5vw);
  background: linear-gradient(135deg, rgba(224, 108, 136, 0.08) 0%, rgba(212, 178, 84, 0.05) 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.1);
}
.quote-carousel {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.quote-slide { display: none; animation: fadeIn 0.8s ease; }
.quote-slide.active { display: block; }
.quote-text {
  font-family: var(--font-hand);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.5;
  color: var(--rose-dark);
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}
.quote-author {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quote-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.q-prev, .q-next {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--rose-light);
  color: var(--rose);
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(224, 122, 147, 0.2);
  transition: all var(--transition);
}
.q-prev:hover, .q-next:hover { 
  background: var(--rose); 
  color: #fff; 
  transform: scale(1.1) rotate(5deg); 
  border-color: var(--rose);
}

/* ── Love Chat UI (Envelope Style) ── */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--dark-3); /* Pure white envelope base */
  border: 1px solid var(--glass-border);
  border-radius: 8px; /* Sharper radius for paper feel */
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(224, 122, 147, 0.2);
  display: flex;
  flex-direction: column;
  height: 60vh;
  min-height: 500px;
  position: relative;
}
/* Subtle folded paper texture overlay */
.chat-container::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}
.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}
/* Custom Scrollbar for Chat */
.chat-feed::-webkit-scrollbar { width: 6px; }
.chat-feed::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); }
.chat-feed::-webkit-scrollbar-thumb { background: rgba(224, 122, 147, 0.4); border-radius: 10px; }

/* Chat Bubbles */
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: fadeSlideUp 0.4s ease forwards;
}
.chat-bubble-wrap.peer { align-self: flex-start; }
.chat-bubble-wrap.self { align-self: flex-end; align-items: flex-end; }

.chat-sender {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  padding: 0 0.5rem;
  font-weight: 600;
}
.chat-bubble {
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Peer bubbles on the left */
.chat-bubble-wrap.peer .chat-bubble {
  background: var(--dark-2); /* Soft blush */
  color: var(--text);
  border: 1px solid rgba(224, 122, 147, 0.2);
  border-bottom-left-radius: 4px;
}
/* Self bubbles on the right */
.chat-bubble-wrap.self .chat-bubble {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-time {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 0.4rem;
  text-align: right;
  display: block;
}

/* Chat Input Area */
.chat-input-area {
  background: var(--dark-2); /* Deep burgundy base */
  border-top: 1px solid var(--glass-border);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}
.chat-input-row { display: flex; gap: 0.8rem; }
.flex-row { flex-direction: row; align-items: center; }

.chat-name-input {
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  color: var(--rose-light);
  font-size: 0.85rem;
  width: 200px;
  outline: none;
  transition: border-color var(--transition);
}
.chat-text-input {
  flex: 1;
  background: var(--dark-3);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 24px;
  padding: 0.75rem 1.4rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}
.chat-name-input:focus, .chat-text-input:focus { 
  border-color: var(--rose); 
  box-shadow: 0 0 0 3px rgba(224, 108, 136, 0.15);
}
.chat-text-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-send-btn:not(:disabled):hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
.chat-send-btn:disabled { background: var(--glass-border); color: #fff; cursor: not-allowed; }

.chat-emoji-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.2rem;
}
.chat-emoji {
  font-size: 1.2rem; width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.chat-emoji:hover { transform: scale(1.3); background: rgba(224, 122, 147, 0.1); }

/* Delete Message Button */
.delete-msg-btn {
  background: rgba(0, 0, 0, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  margin-left: 10px;
}
.delete-msg-btn:hover {
  background: rgba(255, 0, 0, 0.6);
}

/* ── Playlist ── */
.playlist-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}
.song-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05); /* Increased opacity for visibility without blur */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
  /* backdrop-filter removed for performance */
}
.song-card:hover { border-color: rgba(232, 48, 106, 0.5); box-shadow: var(--shadow); }
.song-info { flex: 1; text-align: center; }
.song-info h4 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.2rem; color: var(--rose-light); }
.song-info span { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem; }
.song-note { font-size: 0.82rem; color: var(--text); font-style: italic; opacity: 0.8; }
.song-player { margin-top: 0.5rem; display: flex; justify-content: center; width: 100%; }
audio { width: 100%; height: 40px; border-radius: 20px; outline: none; }
audio::-webkit-media-controls-panel { background: rgba(255,255,255,0.1); }
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display { color: var(--text); }

/* ── Memories Grid (Polaroids) ── */
.memories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 2rem 0;
}
.polaroid-wrapper {
  perspective: 1000px;
  width: clamp(260px, 100%, 300px);
  height: 380px;
  margin-bottom: 2rem;
  /* Add subtle scatter rotations via nth-child in JS or CSS */
}
.polaroid-wrapper:nth-child(even) { transform: rotate(3deg); }
.polaroid-wrapper:nth-child(odd) { transform: rotate(-3deg); }
.polaroid-wrapper:nth-child(3n) { transform: rotate(-5deg); }

.polaroid-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-radius: 4px;
}
.polaroid-wrapper:hover .polaroid-inner {
  transform: rotateY(180deg) scale(1.05) !important;
  box-shadow: 0 15px 35px rgba(224, 122, 147, 0.25);
}

.polaroid-front, .polaroid-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
  background: var(--dark-3); /* Changed from white to burgundy highlight */
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

/* Front: The Photo Area */
.polaroid-front {
  padding: 1rem 1rem 4rem 1rem;
}
.polaroid-photo {
  flex: 1;
  background: var(--dark); /* Darker photo frame */
  border: 1px solid rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem; /* For the emoji */
  overflow: hidden;
}
.polaroid-caption {
  font-family: var(--font-hand);
  font-size: 1.8rem;
  color: var(--text);
  margin-top: 1rem;
  line-height: 1;
}

/* Back: The Written Memory */
.polaroid-back {
  background: var(--dark);
  transform: rotateY(180deg);
  padding: 2rem 1.5rem;
  justify-content: center;
  border: 1px solid var(--glass-border);
}
.polaroid-back h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--rose-dark);
  margin-bottom: 1rem;
}
.polaroid-back p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}
.polaroid-date {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 1.5rem;
}

/* ── Interactive Surprise (Teddy Bear) ── */
.teddy-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px; /* Slightly larger */
  height: 70px;
  background: var(--dark-3);
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  /* Removed blur for performance */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 9999; /* Ensure it stays above everything except the modal */
  box-shadow: 0 10px 30px rgba(224, 122, 147, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
  animation: floatTeddy 4s ease-in-out infinite;
}
.teddy-btn:hover {
  transform: scale(1.15) rotate(-5deg);
  background: var(--rose-light);
  border-color: var(--rose);
}
.teddy-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.6) 0%, transparent 70%); /* Gold glow */
  opacity: 0.6;
  z-index: -1;
  animation: pulseGlow 2s infinite alternate;
}
@keyframes floatTeddy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes pulseGlow {
  from { transform: scale(0.9); opacity: 0.3; }
  to { transform: scale(1.2); opacity: 0.8; }
}

/* ── Surprise Modal (Love Letter Envelope) ── */
.surprise-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 15, 0.9); /* Opaque dark for performance */
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.surprise-modal.hidden {
  opacity: 0;
  visibility: hidden;
}
.surprise-modal-content {
  background: var(--dark-2);
  border: 1px solid var(--gold-light);
  border-radius: 8px; /* Paper-like feel */
  max-width: 650px;
  width: 100%;
  padding: 4rem 3rem;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 80px rgba(212, 175, 55, 0.2), inset 0 0 60px rgba(248, 182, 200, 0.1);
  transform: scale(1) translateY(0);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* Fancy envelope fold graphic at the top */
.surprise-modal-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, var(--gold-light) 50%, var(--dark-2) 52%);
  opacity: 0.2;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}
.surprise-modal.hidden .surprise-modal-content {
  transform: scale(0.9) translateY(60px) rotateX(-10deg);
}
.close-surprise {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
  color: var(--gold);
  transition: color 0.3s, transform 0.3s;
}
.close-surprise:hover { color: var(--rose); transform: rotate(90deg); }
.surprise-header { margin-bottom: 2rem; }
.surprise-emoji { font-size: 4rem; display: block; margin-bottom: 0.5rem; filter: drop-shadow(0 4px 10px rgba(224, 122, 147, 0.4));}
.surprise-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--rose-dark);
  line-height: 1.2;
}
.surprise-letter {
  font-family: var(--font-hand);
  font-size: clamp(1.4rem, 3.5vw, 1.8rem); /* Slightly larger script */
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}
.surprise-heart {
  font-size: 3.5rem;
  margin-top: 2rem;
  display: inline-block;
  color: var(--rose);
}
.pulse { animation: heartBeat 1.2s infinite alternate; }
.bounce { animation: bounceIn 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes bounceIn {
  0%   { transform: scale(0.1) translateY(100px); opacity: 0; }
  60%  { transform: scale(1.2) translateY(-10px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .message-composer { flex-direction: column; }
  .countdown-sep { display: none; }
  .song-note { display: none !important; }
}
