@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Poppins:wght@300;400;600;700&display=swap');

body {
  background: linear-gradient(-45deg, #ff9a9e, #fecfef, #fecfef, #ff9a9e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

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

.fade-in {
  animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.9); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.heart-float {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.heart {
  position: absolute;
  width: 20px;
  height: 20px;
  background: url('https://cdn-icons-png.flaticon.com/512/833/833472.png') no-repeat center center / contain;
  animation: float 8s infinite ease-in-out;
  filter: drop-shadow(0 0 5px rgba(255, 182, 193, 0.6));
}

@keyframes float {
  0% { 
    transform: translateY(100vh) scale(0.3) rotate(0deg); 
    opacity: 0; 
  }
  20% { 
    opacity: 1; 
  }
  80% { 
    opacity: 1; 
  }
  100% { 
    transform: translateY(-10vh) scale(1.5) rotate(360deg); 
    opacity: 0; 
  }
}

.main-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.main-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.15);
}

.title {
  font-family: 'Dancing Script', cursive;
  background: linear-gradient(45deg, #ff6b9d, #c44569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titlePulse 3s ease-in-out infinite;
  text-align: center;
  width: 100%;
  display: block;
  margin: 0 auto;
  min-height: 1.2em; /* Prevent layout shift during typing */
  position: relative;
}

/* Enhanced typewriter cursor */
.typewriter-cursor {
  color: #ff6b9d !important;
  font-weight: bold !important;
  animation: cursorBlink 1s infinite !important;
}

@keyframes cursorBlink {
  0%, 50% { 
    opacity: 1; 
    transform: scale(1);
  }
  51%, 100% { 
    opacity: 0.3; 
    transform: scale(0.9);
  }
}

/* Enhanced typewriter text */
.typewriter-text {
  background: linear-gradient(45deg, #ff6b9d, #c44569, #ff9ff3) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  background-size: 200% 200% !important;
  animation: gradientShift 3s ease infinite !important;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.message-text {
  line-height: 1.8;
  animation: textGlow 4s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 5px rgba(255, 182, 193, 0.3); }
  to { text-shadow: 0 0 15px rgba(255, 182, 193, 0.6); }
}

.signature {
  font-family: 'Dancing Script', cursive;
  background: linear-gradient(45deg, #ff6b9d, #c44569, #ff9ff3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: signatureShine 3s ease-in-out infinite;
}

@keyframes signatureShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.interactive-heart {
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: heartbeat 2s ease-in-out infinite;
}

.interactive-heart:hover {
  transform: scale(1.3);
  filter: drop-shadow(0 0 10px #ff6b9d);
}

@keyframes heartbeat {
  0%, 50%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(1.1); }
}

.love-button {
  background: linear-gradient(45deg, #ff6b9d, #c44569);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(255, 107, 157, 0.3);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.love-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.love-button:hover:before {
  left: 100%;
}

.love-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(255, 107, 157, 0.4);
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffd700;
  border-radius: 50%;
  animation: sparkleAnim 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.photo-section {
  margin-top: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.photo-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-placeholder {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  animation: photoRotate 10s linear infinite;
}

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