/* Valentine's Day - The Persistent Valentine */

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

:root {
  --pink-light: #ffc2d1;
  --pink-medium: #ffb3c6;
  --pink-dark: #ff85a2;
  --pink-accent: #ff6b9d;
  --peach: #ffcab0;
  --purple-soft: #e8d5f2;
  --bg-gradient: linear-gradient(
    135deg,
    #fff0f3 0%,
    #ffeef2 25%,
    #ffe4ec 50%,
    #ffd6e0 75%,
    #ffccd5 100%
  );
}

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-gradient);
  overflow-x: hidden;
  position: relative;
}

/* Floating Hearts Background */
.hearts-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

/* Main Container */
.container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Intro Section */
.intro {
  text-align: center;
  padding: 40px 20px;
}

.typing-text {
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 700;
  color: #d63384;
  text-shadow: 2px 2px 8px rgba(214, 51, 132, 0.2);
  min-height: 3em;
}

.typing-text::after {
  content: "|";
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Question Section */
.question-section {
  text-align: center;
  padding: 30px 20px;
}

.question {
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 800;
  color: #d63384;
  text-shadow: 3px 3px 10px rgba(214, 51, 132, 0.25);
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

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

.emoji-face {
  font-size: clamp(4rem, 15vw, 8rem);
  margin: 20px 0 30px;
  transition: all 0.3s ease;
  animation: bounce 1s ease-in-out infinite;
}

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

/* Buttons Container */
.buttons-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}

@media (min-width: 480px) {
  .buttons-container {
    flex-direction: row;
    justify-content: center;
    gap: 30px;
  }
}

/* Buttons */
.btn {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  font-weight: 700;
  padding: 16px 48px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  -webkit-tap-highlight-color: transparent;
}

.btn-yes {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff85a2 50%, #ff9eb5 100%);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-yes:hover,
.btn-yes:active {
  background: linear-gradient(135deg, #ff5588 0%, #ff7094 50%, #ff8ca8 100%);
  box-shadow:
    0 12px 35px rgba(255, 107, 157, 0.4),
    0 0 20px rgba(255, 107, 157, 0.3);
}

.btn-no {
  background: linear-gradient(135deg, #e8d5f2 0%, #dcc5e8 50%, #d0b5de 100%);
  color: #9d5ba5;
}

.btn-no:hover,
.btn-no:active {
  background: linear-gradient(135deg, #dcc5e8 0%, #d0b5de 50%, #c4a5d4 100%);
}

/* Shake Animation */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0) scale(var(--no-scale, 1));
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px) scale(var(--no-scale, 1));
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px) scale(var(--no-scale, 1));
  }
}

/* Success Section */
.success-section {
  text-align: center;
  padding: 40px 20px;
}

.success-title {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 800;
  color: #d63384;
  margin-bottom: 30px;
  animation: celebratePulse 0.5s ease-in-out infinite alternate;
}

@keyframes celebratePulse {
  from {
    transform: scale(1) rotate(-2deg);
  }
  to {
    transform: scale(1.05) rotate(2deg);
  }
}

.success-message {
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  font-weight: 600;
  color: #e05299;
  line-height: 1.6;
  margin-bottom: 30px;
}

.success-hearts {
  font-size: clamp(2rem, 8vw, 3.5rem);
  animation: heartBeat 1.2s ease-in-out infinite;
}

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

/* Utility Classes */
.hidden {
  display: none !important;
}

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

.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Extra touch-friendly adjustments */
@media (hover: none) {
  .btn:active {
    transform: scale(0.95);
  }

  .btn-yes:active {
    transform: scale(0.95);
  }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .container {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
