:root {
  --primary-glow: radial-gradient(circle, rgba(94, 148, 227, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
  --blue-gradient: linear-gradient(135deg, #060e20 0%, #02050c 100%);
  --panel-bg: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.12);
  --white: #ffffff;
  --blue-accent: #5e94e3;
  --blue-glow: #3b82f6;
  --dark-navy: #091a36;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --font-title: 'Fredoka', cursive, sans-serif;
  --font-text: 'Quicksand', sans-serif;
  --font-mono: 'Outfit', sans-serif;
  
  /* Framer Motion spring physics curves */
  --spring-transition: all 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.35);
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #02050c;
  background-image: var(--blue-gradient);
  font-family: var(--font-text);
  color: var(--text-primary);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Canvas overlay for particle animations */
#effects-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ================= LOADING SCREEN ================= */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #02050c;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.loading-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Sleeping Cat Animation */
.sleeping-cat-container {
  position: relative;
  width: 180px;
  height: 180px;
}

.sleeping-cat-svg {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.cat-sleeping-body {
  animation: breathe 3s ease-in-out infinite alternate;
  transform-origin: 100px 120px;
}

.cat-sleeping-head {
  animation: breatheHead 3s ease-in-out infinite alternate;
  transform-origin: 72px 105px;
}

.cat-tail {
  animation: tailSleep 3.5s ease-in-out infinite;
  transform-origin: 135px 135px;
}

.cat-left-ear, .cat-right-ear {
  animation: earSleep 5s ease-in-out infinite alternate;
  transform-origin: 64px 75px;
}

.cat-right-ear {
  transform-origin: 88px 77px;
  animation-delay: 1.2s;
}

/* Zzz Floating bubbles */
.zzz-container {
  position: absolute;
  top: 40px;
  left: 110px;
  pointer-events: none;
}

.zzz {
  position: absolute;
  color: var(--blue-accent);
  font-family: var(--font-title);
  opacity: 0;
  transform: scale(0.5);
  animation: floatZzz 2.8s infinite linear;
}

.z1 { font-size: 14px; animation-delay: 0s; }
.z2 { font-size: 20px; animation-delay: 0.9s; left: 12px; top: -10px; }
.z3 { font-size: 16px; animation-delay: 1.8s; left: 24px; top: -5px; }

/* Loading Bar */
.loading-bar-outer {
  width: 280px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.loading-bar-inner {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #5e94e3 0%, #cbdcf5 100%);
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(94, 148, 227, 0.7);
  animation: fillBar 4s cubic-bezier(0.15, 0.85, 0.2, 1) forwards;
}

.loading-text {
  font-family: var(--font-title);
  color: var(--text-secondary);
  font-size: 1.15rem;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.heart-pulse {
  display: inline-block;
  color: var(--blue-accent);
  animation: heartPulse 1.1s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}


/* ================= MAIN CONTAINERS & SPRING TRANSITIONS ================= */
.app-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.screen {
  position: absolute;
  width: 100%;
  max-width: 580px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--spring-transition);
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  pointer-events: none;
}

.screen.active-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.screen.hidden-view {
  opacity: 0;
  transform: translateY(-40px) scale(0.92);
  pointer-events: none;
}


/* ================= PREMIUM GLASSMORPHISM CARD ================= */
.glass-card {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 
              inset 0 1px 2px rgba(255, 255, 255, 0.15),
              0 0 40px rgba(59, 130, 246, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.5s var(--spring-bounce);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 
              inset 0 1px 2px rgba(255, 255, 255, 0.2),
              0 0 50px rgba(59, 130, 246, 0.08);
}

/* Diagonal reflection sheen sweep animation */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.85s ease-in-out;
  z-index: 1;
}

.glass-card:hover::after {
  left: 150%;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--primary-glow);
  pointer-events: none;
  z-index: 0;
}

/* ================= PAGE 1 & 2 CONTENT ================= */
.billa-container {
  position: relative;
  width: 210px;
  height: 210px;
  margin-bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s var(--spring-bounce);
}

.billa-container:hover {
  transform: scale(1.05) translateY(-5px);
}

.billa-container:active {
  transform: scale(0.95);
}

/* Cat Squash (Springy tap animation classes) */
.squash-animation {
  animation: catSquashEffect 0.6s var(--spring-bounce) forwards;
}

.main-heading {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--white);
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
  z-index: 2;
  letter-spacing: -0.2px;
}

.text-red {
  color: #ff9aa2;
  text-shadow: 0 0 20px rgba(255, 154, 162, 0.45);
}

.sub-heading {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  z-index: 2;
  font-weight: 500;
  letter-spacing: 0.2px;
}


/* ================= BUTTONS & MICRO-INTERACTIONS ================= */
.button-group {
  display: flex;
  gap: 24px;
  width: 100%;
  justify-content: center;
  z-index: 2;
}

.btn {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 15px 40px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--spring-transition);
  outline: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.btn-primary.glow-blue {
  background: linear-gradient(135deg, #5e94e3 0%, #3b82f6 100%);
  color: var(--white);
  border: 1px solid rgba(94, 148, 227, 0.6);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(5px);
}

/* Button Reflective sheen */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 30%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  transition: 0.6s ease;
}

.btn:hover::after {
  left: 120%;
}

/* Button hover spring physics */
.btn:hover {
  transform: translateY(-6px) scale(1.04);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.25);
}

.btn-primary.glow-blue:hover {
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.75), 0 0 15px rgba(94, 148, 227, 0.4);
  background: linear-gradient(135deg, #6c9fe8 0%, #4b8af2 100%);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-2px) scale(0.96);
  transition: all 0.1s ease;
}


/* ================= PAGE 3 CONTENT ================= */
.yes-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.typing-text {
  font-family: var(--font-title);
  font-size: 2.15rem;
  color: var(--white);
  text-shadow: 0 0 20px rgba(94, 148, 227, 0.5);
  margin-bottom: 40px;
  min-height: 54px;
  line-height: 1.2;
}

.envelope-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.envelope-label-top {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.envelope-label-bottom {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue-accent);
  margin-top: 28px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.pulse-text {
  animation: textPulse 1.5s infinite ease-in-out;
}


/* ================= 3D ENVELOPE DESIGN ================= */
.envelope-wrapper {
  position: relative;
  width: 320px;
  height: 190px;
  background-color: #0a1c3b;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.1);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.envelope-wrapper:hover {
  transform: translateY(-10px) scale(1.04) rotateX(4deg);
  box-shadow: 0 30px 60px rgba(59, 130, 246, 0.35), 0 0 40px rgba(59, 130, 246, 0.2);
}

.envelope-shadow {
  position: absolute;
  top: 100%;
  left: 5%;
  width: 90%;
  height: 15px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 80%);
  pointer-events: none;
}

.envelope-body {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #0b2247;
  border-radius: 16px;
  overflow: visible;
}

/* Inside space of the envelope */
.envelope-inside {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #030814 0%, #0b2247 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* The tucked-in letter preview */
.letter-tucked {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 290px;
  height: 160px;
  background-color: var(--white);
  border-radius: 10px;
  padding: 15px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.06);
  transform: translateY(0);
  transition: transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.cute-mini-cat-seal {
  width: 55px;
  height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heartPulse 1.8s infinite ease-in-out;
}

/* Flap at the top of the envelope */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 106px;
  transform-origin: top;
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  backface-visibility: hidden;
}

/* Flaps details on left and right sides */
.flap-left-right {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}


/* Opening States (Triggered by JS) */
.envelope-wrapper.open .envelope-flap {
  transform: rotateX(-180deg);
  z-index: 3;
}

.envelope-wrapper.open .letter-tucked {
  transform: translateY(-95px);
}


/* ================= LETTERS MODAL OVERLAY ================= */
.letter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.letter-overlay.active-view {
  opacity: 1;
  pointer-events: auto;
}

.letter-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 4, 10, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.letter-scroll-wrapper {
  position: relative;
  width: 90%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 102;
  border-radius: 32px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.88) translateY(50px);
  transition: transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Webkit scrollbar formatting */
.letter-scroll-wrapper::-webkit-scrollbar {
  width: 6px;
}
.letter-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
}

.letter-overlay.active-view .letter-scroll-wrapper {
  transform: scale(1) translateY(0);
}

/* Real Letter styling - white/translucent paper, rich contrasts */
.premium-letter {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 1);
  color: #0f172a;
  text-align: left;
  align-items: stretch;
  box-shadow: none;
  padding: 48px 42px;
  transition: transform 0.3s ease;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(59, 130, 246, 0.18);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.letter-stamp {
  font-family: var(--font-title);
  color: var(--blue-accent);
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.letter-decorations-top {
  display: flex;
  gap: 14px;
}

.decor-item {
  font-size: 1.45rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.4s var(--spring-bounce);
}

.decor-item:hover {
  transform: scale(1.35) rotate(12deg);
}

/* Custom Tooltips for letter headers */
.decor-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: #0f172a;
  color: var(--white);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  z-index: 10;
}

.decor-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.salutation {
  font-family: var(--font-title);
  font-size: 1.65rem;
  color: #0f172a;
  margin-bottom: 24px;
}

.letter-paragraphs p {
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 20px;
  color: #334155;
  font-weight: 500;
  font-family: var(--font-text);
}

/* Micro-interaction widgets for the highlights */
.highlight-txt {
  font-weight: 600;
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  transition: var(--spring-transition);
  cursor: pointer;
  position: relative;
}

.highlight-cats { color: #2563eb; background: rgba(59, 130, 246, 0.08); }
.highlight-flowers { color: #db2777; background: rgba(219, 39, 119, 0.08); }
.highlight-chocolate { color: #7c2d12; background: rgba(124, 45, 18, 0.08); }
.highlight-monster { color: #15803d; background: rgba(22, 163, 74, 0.08); }
.highlight-rajma { color: #ea580c; background: rgba(234, 88, 12, 0.08); }
.highlight-pav { color: #b45309; background: rgba(180, 83, 9, 0.08); }

/* Springy scale on hover */
.highlight-txt:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
}

/* Specific tooltip animations */
.highlight-txt::after {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  font-size: 1.6rem;
  transition: var(--spring-transition);
}

.highlight-cats:hover::after { content: '😸🐾'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }
.highlight-flowers:hover::after { content: '🌸🌼'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }
.highlight-chocolate:hover::after { content: '🍫❤️'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }
.highlight-monster:hover::after { content: '🥤⚡'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }
.highlight-rajma:hover::after { content: '🍛✨'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }
.highlight-pav:hover::after { content: '🫓🔥'; opacity: 1; transform: translateX(-50%) scale(1) translateY(-5px); }

/* Steam animations for warm foods */
.highlight-rajma::before, .highlight-pav::before {
  content: '♨️';
  position: absolute;
  top: -12px;
  right: -2px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.highlight-rajma:hover::before, .highlight-pav:hover::before {
  opacity: 0.85;
  animation: risingSteam 1.5s infinite linear;
}

.climax-text {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 4px !important;
}

.text-glow-blue {
  color: #1d4ed8;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.letter-footer {
  border-top: 2px dashed rgba(59, 130, 246, 0.18);
  padding-top: 28px;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.closing {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: #475569;
}

.instagram-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  border-radius: 50px;
}

/* Floating close envelope button */
.close-letter-btn {
  position: absolute;
  top: 15px;
  right: 18px;
  background: rgba(15, 23, 42, 0.05);
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--spring-transition);
}

.close-letter-btn:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  transform: rotate(90deg) scale(1.08);
}


/* ================= FLOATING MUSIC WIDGET ================= */
.music-controller {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  color: var(--white);
  transition: var(--spring-transition);
  opacity: 0;
  transform: scale(0.8);
}

.music-controller.hidden-widget {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.music-controller.visible-widget {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.music-controller:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
}

.music-controller:active {
  transform: scale(0.95);
}

.music-icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.music-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Sound waves styling */
.music-waves {
  position: absolute;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 18px;
  height: 12px;
  bottom: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-waves span {
  width: 3px;
  height: 100%;
  background-color: var(--blue-accent);
  border-radius: 4px;
  transform-origin: bottom;
  animation: pulseWave 1s infinite alternate;
}

.music-waves span:nth-child(2) {
  animation-delay: 0.2s;
  animation-duration: 0.8s;
}

.music-waves span:nth-child(3) {
  animation-delay: 0.4s;
  animation-duration: 1.1s;
}

/* Active music state */
.music-controller.playing .music-icon {
  transform: scale(0) rotate(180deg);
  opacity: 0;
}

.music-controller.playing .music-waves {
  opacity: 1;
  bottom: 20px;
}


/* ================= FLOATING KISSES ================= */
.kiss-emoji {
  position: absolute;
  font-size: 2.2rem;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  animation: floatKiss 4.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}


/* ================= KEYFRAME ANIMATIONS ================= */

/* General breathing for sleeping cat */
@keyframes breathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.04) translateY(-3px); }
}

@keyframes breatheHead {
  0% { transform: translate(0, 0); }
  100% { transform: translate(1px, -1.5px); }
}

@keyframes tailSleep {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(10deg); }
}

@keyframes earSleep {
  0%, 100% { transform: rotate(0deg); }
  10%, 12% { transform: rotate(5deg); }
  22%, 24% { transform: rotate(-4deg); }
}

/* Zzz movement */
@keyframes floatZzz {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  12% { opacity: 0.75; }
  85% { opacity: 0.75; }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1.25) rotate(-18deg);
  }
}

/* Loading Bar Inner fill */
@keyframes fillBar {
  0% { width: 0%; }
  35% { width: 40%; }
  70% { width: 80%; }
  100% { width: 100%; }
}

/* Heading pulse */
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Text pulsing */
@keyframes textPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* Sound waves jumping */
@keyframes pulseWave {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* Cat wagging tail */
@keyframes catTailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(26deg) translateY(-2px); }
}

.cat-wagging-tail {
  animation: catTailWag 1.6s ease-in-out infinite;
  transform-origin: 160px 145px;
}

/* Cat ears twitching periodically */
@keyframes catEarsTwitch {
  0%, 92%, 100% { transform: rotate(0deg); }
  94% { transform: rotate(-5deg); }
  97% { transform: rotate(5deg); }
}

.ears-group {
  animation: catEarsTwitch 4.5s ease-in-out infinite;
  transform-origin: 110px 85px;
}

/* Grumpy Slipper Cat low tail twitch */
@keyframes catTailLowTwitch {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-14deg); }
}

.cat-low-tail {
  animation: catTailLowTwitch 2.2s ease-in-out infinite;
  transform-origin: 165px 150px;
}

/* Angry slipper cat ears flattened animation */
@keyframes angryEars {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px) rotate(-1deg); }
}

.grumpy-ears {
  animation: angryEars 2.8s ease-in-out infinite alternate;
}

/* Slipper holding/bobbing */
@keyframes slipperBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(3.5px) rotate(-2deg); }
}

.slipper-in-mouth {
  animation: slipperBob 1.4s ease-in-out infinite alternate;
  transform-origin: 110px 95px;
}

/* Spring Squash effect for cats when tapped */
@keyframes catSquashEffect {
  0% { transform: scale(1); }
  25% { transform: scale(1.15, 0.85); }
  50% { transform: scale(0.9, 1.12); }
  75% { transform: scale(1.05, 0.95); }
  100% { transform: scale(1); }
}

/* Rising steam emoji effect */
@keyframes risingSteam {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: translateY(-15px) scale(1.2); opacity: 0; }
}

/* Kiss animation path */
@keyframes floatKiss {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0) scale(0.7) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: translateY(78vh) translateX(20px) scale(1.15) rotate(6deg);
  }
  50% {
    transform: translateY(40vh) translateX(-25px) scale(0.95) rotate(-12deg);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) translateX(15px) scale(0.85) rotate(18deg);
  }
}


/* ================= RESPONSIVE STYLES ================= */
@media (max-width: 600px) {
  body {
    overflow-y: auto;
  }

  .screen {
    padding: 16px;
  }

  .glass-card {
    padding: 34px 22px;
    border-radius: 26px;
  }

  .main-heading {
    font-size: 1.8rem;
  }

  .sub-heading {
    font-size: 1.05rem;
    margin-bottom: 28px;
  }

  .button-group {
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }

  .btn {
    width: 100%;
    padding: 14px 20px;
  }

  .premium-letter {
    padding: 32px 24px;
  }

  .salutation {
    font-size: 1.4rem;
  }

  .letter-paragraphs p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .climax-text {
    font-size: 1.25rem;
  }

  .typing-text {
    font-size: 1.7rem;
    margin-bottom: 30px;
  }

  .envelope-wrapper {
    width: 290px;
    height: 172px;
  }

  .letter-tucked {
    width: 260px;
    height: 142px;
    left: 15px;
  }
}
