@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

/* ===== BASE & BACKGROUND ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #1a0011 0%, #2d0a1e 25%, #4a1042 50%, #2d0a1e 75%, #1a0011 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== FLOATING HEARTS BACKGROUND ===== */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  color: #ff4d6d;
  animation: floatUp linear infinite;
  filter: blur(1px);
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-110vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* ===== SPARKLE CURSOR TRAIL ===== */
.sparkle-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff 0%, #ff6b9d 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleFade 0.8s ease-out forwards;
}

@keyframes sparkleFade {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0) translate(var(--dx, 10px), var(--dy, -10px));
    opacity: 0;
  }
}

/* ===== SCENE LAYOUT ===== */
.scene {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

/* ===== GREETING ANIMATION ===== */
.greeting {
  text-align: center;
  margin-bottom: 10px;
  animation: fadeInDown 1.5s ease-out;
}

.greeting-hey {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 182, 203, 0.8);
  letter-spacing: 8px;
  text-transform: uppercase;
  animation: fadeInDown 1s ease-out;
}

.greeting-name {
  display: block;
  font-family: 'Great Vibes', cursive;
  font-size: 4.5rem;
  background: linear-gradient(135deg, #ff6b9d, #ffa3c4, #ff4d6d, #ff8fab);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInDown 1.5s ease-out 0.3s both, nameGlow 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.5));
}

@keyframes nameGlow {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.5)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 50px rgba(255, 107, 157, 0.8)); }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ROSE CONTAINER ===== */
.container {
  position: relative;
  width: 200px;
  height: 350px;
  animation: roseAppear 2s ease-out 0.5s both;
}

@keyframes roseAppear {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Glow ring behind the rose */
.glow-ring {
  position: absolute;
  width: 180px;
  height: 180px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 109, 0.3) 0%, transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.3); opacity: 1; }
}

/* ===== GLASS VASE ===== */
.glass {
  position: absolute;
  height: 140px;
  width: 90px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border-radius: 0 0 25px 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.glass .shine {
  position: absolute;
  width: 15px;
  height: 80%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  left: 15px;
  top: 10%;
  border-radius: 10px;
}

.glass .water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(255, 77, 109, 0.2), transparent);
  border-radius: 0 0 25px 25px;
}

/* ===== PETALS ===== */
.petals > div {
  position: absolute;
  background: #d52d58;
  width: 45px;
  height: 80px;
  top: 55px;
  transition: all 0.5s ease-out;
}

.petals > div:nth-child(1) {
  border-radius: 15px;
  box-shadow: 0px 0px 30px #f594b8;
  left: 80px;
  top: 60px;
  background: #d52d58;
}

.petals > div:nth-child(2),
.petals > div:nth-child(4),
.petals > div:nth-child(6) {
  background: #b81b43;
  left: 60px;
  border-radius: 0px 30px 0px 30px;
  transform-origin: bottom right;
}

.petals > div:nth-child(3),
.petals > div:nth-child(5),
.petals > div:nth-child(7) {
  background: #b81b43;
  left: 100px;
  border-radius: 30px 0px 30px 0px;
  transform-origin: bottom left;
}

.petals > div:nth-child(2) {
  z-index: 5;
  background: #ab1a3f;
  top: 75px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom2 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(3) {
  z-index: 4;
  background: #ab1a3f;
  top: 75px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom3 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(4) {
  z-index: 3;
  background: #b81b43;
  top: 70px;
  height: 75px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom4 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(5) {
  z-index: 2;
  background: #b81b43;
  top: 70px;
  height: 75px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom5 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(6) {
  z-index: 1;
  background: #c9204b;
  top: 65px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.3);
  animation: bloom6 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(7) {
  z-index: 0;
  background: #c9204b;
  top: 65px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.3);
  animation: bloom7 3s ease-in-out, glowing 2.5s ease-in-out infinite 3s;
  animation-fill-mode: forwards;
}

/* ===== DEAD / FALLING PETALS ===== */
.deadPetals > div {
  position: absolute;
  background: #d52d58;
  width: 20px;
  height: 15px;
  top: 120px;
  border-radius: 0px 30px 0px 30px;
  box-shadow: 0px 0px 30px rgba(245, 148, 184, 0.5);
  transition: all 0.5s ease-out;
}

.deadPetals > div:nth-child(1) {
  left: 80px;
  transform: rotate(-30deg);
  animation: falling 10s 4s ease-in-out infinite;
}

.deadPetals > div:nth-child(2) {
  left: 101px;
  transform: rotate(-30deg);
  animation: falling 20s 8s ease-in-out infinite;
}

.deadPetals > div:nth-child(3) {
  left: 79px;
  transform: rotate(-30deg);
  animation: falling 20s 12s ease-in-out infinite;
}

.deadPetals > div:nth-child(4) {
  left: 92px;
  transform: rotate(-30deg);
  animation: falling 20s 16s ease-in-out infinite;
}

/* ===== LEAVES & STEM ===== */
.leaves > div:nth-last-child(1) {
  position: absolute;
  width: 55px;
  height: 30px;
  background: #338f37;
  top: 120px;
  left: 75px;
  border-radius: 100px;
}

.leaves > div:nth-child(1) {
  position: absolute;
  width: 6px;
  height: 210px;
  background: linear-gradient(to bottom, #054c05, #0a6b0a);
  top: 95px;
  left: 100px;
  border-radius: 0 0 100px 100px;
}

.leaves > div:nth-child(2) {
  position: absolute;
  width: 30px;
  height: 50px;
  top: 53px;
  border-radius: 5px 40px 20px 40px;
  background: #054c05;
  transform-origin: bottom;
  transform: rotate(-30deg);
  top: 180px;
  left: 80px;
  box-shadow: inset 5px 5px #066406;
}

.leaves > div:nth-child(3) {
  position: absolute;
  width: 30px;
  height: 50px;
  top: 53px;
  border-radius: 40px 5px 40px 20px;
  background: #054c05;
  transform-origin: bottom;
  transform: rotate(30deg);
  top: 150px;
  left: 95px;
  box-shadow: inset -5px 5px #066406;
}

/* ===== THORNS ===== */
.thorns > div {
  position: absolute;
  width: 0;
  height: 0;
  top: 140px;
}

.thorns > div:nth-child(odd) {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #054c05;
  left: 105px;
}

.thorns > div:nth-child(even) {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #054c05;
  left: 95px;
}

.thorns > div:nth-child(1) { top: 200px; }
.thorns > div:nth-child(2) { top: 170px; }
.thorns > div:nth-child(4) { top: 230px; }

/* ===== BLOOM ANIMATIONS ===== */
@keyframes bloom2 {
  50% {
    transform: rotate(-90deg);
    top: 200px;
    left: 100px;
  }
  100% {
    transform: rotate(-60deg);
    top: 252px;
    left: 50px;
    background: #71122a;
    box-shadow: 0px 0px 0px rgba(245, 148, 184, 0);
  }
}

@keyframes bloom3 { 100% { transform: rotate(45deg); } }
@keyframes bloom4 { 100% { transform: rotate(-20deg); } }
@keyframes bloom5 { 100% { transform: rotate(20deg); } }
@keyframes bloom6 { 100% { transform: rotate(-5deg); } }
@keyframes bloom7 { 100% { transform: rotate(5deg); } }

@keyframes glowing {
  50% {
    background: #d7365f;
    box-shadow: 0px 0px 60px #f594b8;
  }
}

@keyframes falling {
  20% {
    top: 335px;
    background: #9d193b;
    box-shadow: 0px 0px 0px rgba(245, 148, 184, 0);
  }
  100% {
    top: 335px;
    opacity: 0;
  }
}

/* ===== MESSAGE SECTION ===== */
.message-section {
  text-align: center;
  margin-top: 10px;
}

.message-line {
  font-family: 'Great Vibes', cursive;
  color: rgba(255, 182, 203, 0.9);
  text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
  opacity: 0;
}

.line-1 {
  font-size: 1.8rem;
  animation: fadeInUp 1s ease-out 2.5s forwards;
}

.line-2 {
  font-size: 1.4rem;
  color: rgba(255, 163, 196, 0.7);
  margin-top: 5px;
  animation: fadeInUp 1s ease-out 3.2s forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SURPRISE BUTTON ===== */
.surprise-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 40px;
  background: linear-gradient(135deg, #ff4d6d, #ff6b9d, #ff4d6d);
  background-size: 200% 200%;
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(255, 77, 109, 0.4), 0 0 60px rgba(255, 77, 109, 0.15);
  opacity: 0;
  animation: fadeInUp 1s ease-out 3.8s forwards, btnPulse 2.5s ease-in-out 4.8s infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.surprise-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 35px rgba(255, 77, 109, 0.6), 0 0 80px rgba(255, 77, 109, 0.3);
  background-position: 100% 50%;
}

.btn-icon {
  font-size: 1.3rem;
  animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s ease-in-out infinite 4.8s;
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 25px rgba(255, 77, 109, 0.4), 0 0 60px rgba(255, 77, 109, 0.15); }
  50% { box-shadow: 0 4px 35px rgba(255, 77, 109, 0.6), 0 0 80px rgba(255, 77, 109, 0.3); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .greeting-name {
    font-size: 3.2rem;
  }
  .greeting-hey {
    font-size: 1.2rem;
  }
  .container {
    transform: scale(0.85);
  }
  .line-1 {
    font-size: 1.4rem;
  }
  .line-2 {
    font-size: 1.1rem;
  }
  .surprise-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .greeting-name {
    font-size: 2.5rem;
  }
  .container {
    transform: scale(0.7);
  }
  .scene {
    gap: 0;
  }
}
