@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/nunito-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9,
    U+20AB;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

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

[hidden] {
  display: none !important;
}

body {
  background-color: #ffe4e8;
  font-family: "Nunito", sans-serif;
  line-height: normal;
  min-height: 100vh;
  overflow: hidden;
}

.valentine-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #ffe4e8;
  background-image:
    radial-gradient(circle at 15% 85%, #ffb3c1 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, #ff8fa3 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, #fff0f3 0%, transparent 60%);
}

.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hearts-bg::before,
.hearts-bg::after {
  content: "💕 💗 💖 💝 💓";
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.15;
  animation: floatHearts 12s linear infinite;
  white-space: nowrap;
  top: 100%;
  left: 10%;
}

.hearts-bg::after {
  animation-delay: 6s;
  left: 60%;
  content: "💗 💕 💓 💖 💝";
}

@keyframes floatHearts {
  from {
    transform: translateY(0);
    opacity: 0.15;
  }
  to {
    transform: translateY(-110vh);
    opacity: 0;
  }
}

.container {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
}

h1 {
  max-width: min(920px, calc(100vw - 40px));
  margin-inline: auto;
  font-size: 2.4rem;
  line-height: 1.38;
  color: #d63384;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 0 rgba(214, 51, 132, 0.2);
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

.step-detail {
  max-width: min(820px, calc(100vw - 40px));
  margin: -8px auto 12px;
  color: #a52f69;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.gif-container {
  margin: 20px auto;
  display: flex;
  justify-content: center;
}

#cat-gif,
.success-gif {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  transition: opacity 0.3s ease;
}

.buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

#yes-btn {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1.6rem;
  font-weight: 900;
  font-family: "Nunito", sans-serif;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1.2;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.45);
  letter-spacing: 1px;
}

#yes-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 28px rgba(76, 175, 80, 0.55);
}

#yes-btn:active {
  transform: scale(0.98);
}

#no-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  padding: 12px 28px;
  cursor: pointer;
  line-height: 1.375;
  transition: background 0.2s, left 0.22s ease, top 0.22s ease;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.4);
}

#no-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
}

#tease-toast {
  margin-top: 14px;
  font-size: 1rem;
  color: #d63384;
  font-weight: 700;
  font-style: italic;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-height: 1.5rem;
}

#tease-toast.show {
  opacity: 1;
  transform: translateY(0);
}

#music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
  z-index: 100;
}

#music-toggle:hover {
  transform: scale(1.1);
}

.yes-container h1.yes-title {
  font-size: 2.8rem;
  animation: bounceTitle 0.6s ease infinite alternate;
}

@keyframes bounceTitle {
  from {
    transform: translateY(0) rotate(-1deg);
  }
  to {
    transform: translateY(-12px) rotate(1deg);
  }
}

.yes-message {
  max-width: min(880px, calc(100vw - 40px));
  color: #e91e8c;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 24px auto 0;
  animation: fadeIn 1s ease 0.5s both;
}

.yes-message p + p {
  margin-top: 10px;
}

.yes-message .success-lead,
.yes-message .final-note {
  font-size: 1.25rem;
  font-weight: 900;
}

.yes-message .sign-off {
  font-weight: 900;
}

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

.yes-container .success-gif {
  width: 260px;
  height: 260px;
}

.safety-note {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(900px, calc(100vw - 150px));
  color: #7f355d;
  background: rgba(255, 255, 255, 0.64);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(6px);
}

#yes-btn:focus-visible,
#no-btn:focus-visible,
#music-toggle:focus-visible {
  outline: 3px solid #85225a;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .container {
    padding: 28px 14px 70px;
  }

  h1 {
    max-width: calc(100vw - 28px);
    font-size: 2rem;
  }

  .step-detail,
  .yes-message {
    max-width: calc(100vw - 28px);
  }

  .yes-container {
    max-height: 100vh;
    overflow-y: auto;
  }

  .yes-container h1.yes-title {
    font-size: 2.25rem;
  }

  .yes-container .success-gif {
    width: 220px;
    height: 220px;
  }

  .safety-note {
    left: 10px;
    right: 82px;
    bottom: 10px;
    transform: none;
    width: auto;
    font-size: 0.66rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
