/* ==========================================================
   HAPPY NATIONAL GIRLFRIEND DAY - LUXURY FLORAL & ENVELOPE ENGINE
   ========================================================== */

:root {
  --bg-primary: #fff0f3;
  --bg-secondary: #ffe5ec;
  --pink-light: #ffc2d1;
  --pink-mid: #ff8fa3;
  --pink-vibrant: #ff4d6d;
  --rose-deep: #c9184a;
  --crimson-dark: #800f2f;
  --text-dark: #4a0e17;
  --text-muted: #8d4b55;

  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-script: 'Dancing Script', cursive;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background: linear-gradient(135deg, #fff0f3 0%, #ffe5ec 50%, #ffc2d1 100%);
  color: var(--text-dark);
  position: relative;
}

/* FLOWER OVERLAY */
.flower-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  display: none;
  background: rgba(74, 14, 23, 0.25);
  contain: layout paint style;
}

.flower-overlay.active {
  display: block;
}

.dom-flower-dynamic {
  position: absolute;
  object-fit: contain;
  transform: scale(0) rotate(0deg);
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: none;
}

/* PETALS CANVAS */
#petalsCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#petalsCanvas.paused {
  opacity: 0;
}

/* MUSIC BUTTON */
.music-toggle-wrapper {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  cursor: pointer;
}

.vinyl-disc {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--rose-deep), var(--pink-vibrant));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(201, 24, 74, 0.3);
}

.vinyl-disc.playing {
  animation: spinVinyl 4s linear infinite;
}

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

/* AESTHETIC CLAIM MODAL OVERLAY */
.claim-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(74, 14, 23, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.claim-modal-card {
  max-width: 380px;
  background: linear-gradient(135deg, #ffffff, #fff0f3);
  border: 2px solid var(--pink-mid);
  padding: 36px 24px;
  box-shadow: 0 20px 40px rgba(164, 19, 60, 0.2);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.modal-title {
  font-size: 2.2rem;
  color: var(--crimson-dark);
  margin-bottom: 14px;
}

.modal-message {
  font-size: 0.98rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-close-btn {
  width: 100%;
  justify-content: center;
}

/* APP SLIDE CONTAINER */
.app-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slides-view-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slides-view-wrapper.hidden {
  display: none;
}

.slide-page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 80px 16px;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.slide-page.active {
  opacity: 1;
  visibility: visible;
  z-index: 5;
}

/* LUXURY INTRO ENVELOPE CONTAINER */
.envelope-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
}

.envelope-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 5;
}

.intro-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.95);
  color: var(--crimson-dark);
  padding: 6px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border: 1px solid var(--pink-mid);
  box-shadow: 0 4px 14px rgba(201, 24, 74, 0.1);
}

.intro-heading {
  font-size: 2.4rem;
  color: var(--crimson-dark);
  margin-bottom: 4px;
}

.envelope-card {
  width: 300px;
  height: 195px;
  background: linear-gradient(145deg, #ffffff 0%, #fff0f3 100%);
  border-radius: 18px;
  position: relative;
  box-shadow: 
    0 22px 50px rgba(164, 19, 60, 0.2),
    inset 0 0 15px rgba(255, 255, 255, 0.9);
  border: 2px solid var(--pink-mid);
  cursor: pointer;
  overflow: hidden;
  margin: 0 auto;
  animation: floatEnvelope 3.5s ease-in-out infinite alternate;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes floatEnvelope {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.envelope-card:hover {
  transform: translateY(-12px) scale(1.03);
}

.envelope-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 182, 193, 0.4), rgba(255, 143, 163, 0.65), rgba(255, 182, 193, 0.4));
  z-index: 2;
  pointer-events: none;
}

.envelope-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 147.5px solid transparent;
  border-right: 147.5px solid transparent;
  border-top: 108px solid #ffccd5;
  z-index: 3;
  filter: drop-shadow(0 4px 8px rgba(164, 19, 60, 0.12));
}

.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--rose-deep), var(--crimson-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 
    0 8px 22px rgba(128, 15, 47, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  animation: pulseSeal 2s infinite ease-in-out;
}

@keyframes pulseSeal {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 22px rgba(128, 15, 47, 0.45);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 12px 28px rgba(128, 15, 47, 0.6), 0 0 20px rgba(255, 77, 109, 0.5);
  }
}

.seal-inner {
  color: #ffffff;
  font-size: 1.5rem;
}

.envelope-instruction {
  font-family: var(--font-serif);
  color: var(--crimson-dark);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}

/* ELEGANT REALISTIC SCRAPBOOK PAPER CARD */
.glass-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 182, 193, 0.6);
  box-shadow: 
    0 20px 40px rgba(128, 15, 47, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 36px 24px 30px 24px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  will-change: transform, opacity;
}

.text-center { text-align: center; }

.badge-tag {
  display: inline-block;
  background: #ffe5ec;
  color: var(--crimson-dark);
  padding: 5px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 14px;
  border: 1px solid var(--pink-mid);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: var(--crimson-dark);
  line-height: 1.25;
  margin-bottom: 10px;
}

.highlight-name {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--rose-deep);
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-deep), var(--pink-vibrant));
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 40px;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(201, 24, 74, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

/* LETTER CARD */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--crimson-dark);
}

.section-subtext {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.script-font { font-family: var(--font-script); }

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  border-bottom: 1px stroke var(--pink-light);
  padding-bottom: 10px;
}

.stamp-icon { font-size: 1.5rem; color: var(--rose-deep); }

.letter-body { font-size: 0.95rem; line-height: 1.65; }
.greeting-text { font-weight: 700; margin-bottom: 10px; }
.letter-paragraph { margin-bottom: 10px; }
.signature-block { margin-top: 16px; text-align: right; }
.sig-title { font-size: 0.85rem; color: var(--text-muted); }
.sig-name { font-size: 1.7rem; color: var(--rose-deep); }

/* PROMISES SECTION (CLEAN MODERN NUMBER FONT) */
.promises-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.promise-item {
  background: #ffffff;
  border: 1px solid rgba(255, 182, 193, 0.6);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(164, 19, 60, 0.04);
}

.promise-num {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--rose-deep);
  background: #ffe5ec;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--pink-mid);
  letter-spacing: -0.5px;
}

.promise-item p {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.45;
}

/* COUPONS GRID (3 COUPONS) */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.coupon-item {
  background: #ffffff;
  border: 1.5px dashed var(--rose-deep);
  border-radius: 14px;
  padding: 16px 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-align: center;
}

.coupon-item.secret-coupon {
  border: 1.5px dashed var(--pink-vibrant);
  background: linear-gradient(135deg, #ffffff, #fff0f3);
}

.coupon-item.secret-coupon .coupon-number {
  background: #ffccd5;
  color: var(--crimson-dark);
}

.coupon-item:hover {
  transform: translateY(-3px);
}

.coupon-number {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--rose-deep);
  background: #ffe5ec;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.coupon-item h4 { font-size: 0.88rem; color: var(--crimson-dark); margin-bottom: 4px; }
.coupon-item p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.35; }

.claim-badge {
  font-size: 0.7rem;
  background: var(--rose-deep);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.coupon-item.claimed { opacity: 0.6; }

.replay-btn {
  font-size: 0.85rem;
  padding: 10px 22px;
}

/* BOTTOM NAVIGATION */
.bottom-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(164, 19, 60, 0.1);
  border: 1px solid var(--pink-mid);
  z-index: 10;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--rose-deep);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink-light);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
  background: var(--rose-deep);
  transform: scale(1.3);
}

@media (max-width: 580px) {
  .hero-title { font-size: 1.8rem; }
  .highlight-name { font-size: 2.2rem; }
  .glass-card { padding: 24px 16px; }
  .coupons-grid { grid-template-columns: 1fr; }
  .intro-heading { font-size: 2rem; }
  .envelope-card { width: 260px; height: 170px; }
  .envelope-top { border-left-width: 127.5px; border-right-width: 127.5px; border-top-width: 95px; }
}
