* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24, #f0932b);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animated hearts background */
.hearts-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  animation: floatUp 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Floating particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 30px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15), 
              0 0 0 1px rgba(255,255,255,0.1) inset;
  width: 90%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(5deg);
  transition: all 0.3s ease;
  animation: cardFloat 4s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: perspective(1000px) rotateX(5deg) translateY(0px); }
  50% { transform: perspective(1000px) rotateX(5deg) translateY(-10px); }
}

.card:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-5px);
  box-shadow: 0 35px 70px rgba(0,0,0,0.2);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 107, 107, 0.3), transparent);
  animation: rotate 4s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

h1 {
  color: #e74c3c;
  margin-bottom: 20px;
  font-family: 'Dancing Script', cursive;
  font-size: 2.2em;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.subtitle {
  color: #7f8c8d;
  font-size: 1.1em;
  margin-bottom: 25px;
  font-style: italic;
  opacity: 0;
  animation: fadeIn 1s ease-in-out 0.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.love-meter {
  width: 100%;
  height: 20px;
  background: #ecf0f1;
  border-radius: 10px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #e91e63, #9c27b0);
  border-radius: 10px;
  width: 100%;
  animation: fillUp 2s ease-in-out 1s both;
  position: relative;
}

@keyframes fillUp {
  0% { width: 0%; }
  100% { width: 100%; }
}

.meter-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.meter-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
  margin-top: 30px;
}

button {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-text {
  position: relative;
  z-index: 2;
}

.yes {
  background: linear-gradient(135deg, #e74c3c, #e91e63);
  color: white;
  box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
}

.yes:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 15px 35px rgba(231, 76, 60, 0.6);
}

.btn-sparkle {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.yes:hover .btn-sparkle {
  left: 100%;
}

.no {
  background: linear-gradient(135deg, #95a5a6, #bdc3c7);
  color: #2c3e50;
  transition: all 0.2s ease;
  transform-origin: center;
}

.no:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #7f8c8d, #95a5a6);
  box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.no:disabled {
  background: linear-gradient(135deg, #bdc3c7, #d5dbdb);
  color: #95a5a6;
  cursor: not-allowed;
  transform: scale(0.95);
}

/* Popup backdrop overlay */
.popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 999;
  opacity: 0;
  animation: backdropShow 0.3s ease-out forwards;
}

@keyframes backdropShow {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes backdropHide {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Popup message styles */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  z-index: 1000;
  text-align: center;
  max-width: 300px;
  animation: popupShow 0.3s ease-out forwards;
}

.popup .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 18px;
  color: #bdc3c7;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.popup .close-btn:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  transform: scale(1.1);
}

@keyframes popupShow {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes popupHide {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.popup h3 {
  margin: 0 0 10px 0;
  color: #e74c3c;
  font-size: 1.2em;
}

.popup p {
  margin: 0;
  color: #7f8c8d;
  font-size: 1em;
}

.popup.hide {
  animation: popupHide 0.3s ease-in forwards;
}

.cute-message {
  margin-top: 20px;
  color: #7f8c8d;
  font-size: 14px;
  font-style: italic;
  opacity: 0;
  animation: fadeIn 1s ease-in-out 2s forwards;
}

/* Success animation styles */
.success {
  animation: successBounce 0.8s ease-in-out;
}

@keyframes successBounce {
  0%, 20%, 40%, 60%, 80%, 100% {
    transform: translateY(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateY(-10px);
  }
}

.success h1 {
  color: #27ae60;
  animation: none;
}

/* Confetti animation */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #e74c3c;
  animation: confettifall 3s linear infinite;
}

@keyframes confettifall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive design */
@media (max-width: 480px) {
  .card {
    padding: 30px 20px;
    margin: 20px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  
  button {
    width: 200px;
    margin-bottom: 15px;
  }
}
