:root {
  --primary-color: #ff6b6b;
  --hover-color: #ff4757;
  --bg-color: #ffe4e1;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --text-color: #535c68;
}

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

body {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); /* Fallback */
  background: linear-gradient(
    to top right,
    #ffe4e1 0%,
    #ffdde1 100%,
    #fad0c4 100%
  );
  font-family: "Nunito", sans-serif;
  overflow: hidden;
  position: relative;
}

/* Floating background hearts */
body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#ff9a9e 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.container {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 4rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 90%;
  width: 600px;
  z-index: 10;
  transition:
    transform 0.3s ease,
    height 0.3s ease;
  position: relative;
}

.image-container {
  margin-bottom: 1.5rem;
}

.emoji-display {
  font-size: 6rem;
  line-height: 1;
  filter: drop-shadow(0 5px 15px rgba(255, 107, 107, 0.3));
  animation: float 3s ease-in-out infinite;
}

h1 {
  color: #ff4757;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.buttons-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  /* Ensure buttons container has height so buttons can be positioned */
  min-height: 60px;
}

.btn {
  padding: 0.8rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Nunito", sans-serif;
}

.btn-yes {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-yes:hover {
  background-color: var(--hover-color);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-no {
  background-color: #ffffff;
  color: var(--text-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  /* We need position absolute to move it freely if intended to move around the WHOLE screen, 
        or fixed/absolute relative to body. 
        However, the prompt says "move to a random position on the screen". 
        So it should be absolute/fixed relative to viewport. 
     */
  position: relative;
}

/* Success State */
.hidden {
  display: none;
}

.success-text {
  color: #ff4757;
  margin-bottom: 0.5rem;
}

.sub-text {
  font-size: 1.2rem;
  color: #747d8c;
  font-weight: 600;
}

.shy-hint {
  font-size: 0.85rem;
  color: #bdc3c7; /* Light gray */
  font-weight: 600;
  opacity: 0.7;

  /* Absolute positioning at bottom */
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  margin: 0;
}

.signature-text {
  position: absolute;
  bottom: -30px; /* Below the box */
  right: 0;
  font-size: 0.7rem;
  color: red; /* Kept user preference */
  opacity: 0.7; /* visible */
  cursor: pointer; /* Changed to pointer */
  z-index: 20;
  width: 100%;
  text-align: right;
  padding-right: 15px;
  text-decoration: none; /* No underline */
  transition: opacity 0.3s ease;
}

.signature-text:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Confetti Canvas */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
