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

:root {
  --pink-1: #ff5f8f;
  --pink-2: #ff7ba6;
  --red-1: #ff3366;
  --red-2: #d10a4d;
  --white-soft: #fff9fb;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  --font-main: "Manrope", sans-serif;
  --font-romantic: "Great Vibes", cursive;
}

body {
  font-family: var(--font-main);
  overflow-x: hidden;
}

.page-enter {
  animation: fadeInPage 0.6s ease;
}

.page-exit {
  animation: fadeOutPage 0.5s ease forwards;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutPage {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

body.center {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px;
  background: linear-gradient(140deg, #ff8fb7 0%, #ff5c89 45%, #ff3f72 100%);
  position: relative;
}

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

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: drift 8s ease-in-out infinite;
}

.shape.one {
  width: 190px;
  height: 190px;
  left: -40px;
  top: 10%;
  background: rgba(255, 255, 255, 0.25);
}

.shape.two {
  width: 230px;
  height: 230px;
  right: -60px;
  bottom: 10%;
  background: rgba(255, 220, 232, 0.35);
  animation-delay: 1.6s;
}

.shape.three {
  width: 120px;
  height: 120px;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  animation-delay: 0.7s;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(18px) scale(1.05);
  }
}

.card {
  position: relative;
  width: min(100%, 430px);
  padding: 28px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
  z-index: 1;
  animation: liftIn 0.7s ease;
}

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

.form-title {
  text-align: center;
  font-family: var(--font-romantic);
  color: #d10a4d;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  letter-spacing: 0.4px;
}

.form-subtitle {
  margin: 6px 0 18px;
  text-align: center;
  color: #7e4a5d;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 15px;
}

.card input[type="text"],
.card input[type="file"] {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #ffd6e3;
  background: #fff;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: var(--font-main);
}

.card input[type="text"]:focus,
.card input[type="file"]:focus {
  outline: none;
  border-color: #ff4d81;
  box-shadow: 0 0 0 4px rgba(255, 77, 129, 0.15);
}

.file-label {
  display: block;
  margin: 0 0 8px;
  color: #8c3956;
  font-size: 0.9rem;
}

.file-hint {
  margin-top: 8px;
  color: #965c72;
  font-size: 0.8rem;
}

.btn-surprise,
.btn-back,
.btn-share,
.btn-download {
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.btn-surprise {
  width: 100%;
  margin-top: 5px;
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(120deg, #ff3e78, #ff5e9a);
  box-shadow: 0 10px 18px rgba(255, 62, 120, 0.35);
}

.btn-surprise:hover,
.btn-back:hover,
.btn-share:hover,
.btn-download:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-surprise:active,
.btn-back:active,
.btn-share:active,
.btn-download:active {
  transform: scale(0.98);
}

.love-bg {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at 15% 15%, #ff8fb7, transparent 30%),
    radial-gradient(circle at 85% 80%, #ff5a8f, transparent 35%),
    linear-gradient(150deg, var(--red-1), var(--red-2));
  color: #fff;
  position: relative;
}

.love-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px 16px;
}

.love-container.hidden {
  display: none;
}

.love-container.reveal {
  display: grid;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  animation: fadeInPage 0.7s ease;
}

.love-content {
  width: min(100%, 600px);
  text-align: center;
  padding: 20px 14px;
  animation: softZoom 0.9s ease;
}

@keyframes softZoom {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.love-title {
  font-family: var(--font-romantic);
  font-size: clamp(2.2rem, 11vw, 4rem);
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(255, 235, 242, 0.7);
  }
  50% {
    text-shadow: 0 0 22px rgba(255, 235, 242, 1);
  }
}

.couple-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
  flex-wrap: wrap;
}

.person-card {
  width: min(38vw, 180px);
  text-align: center;
}

.person-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #ffe9f1;
  font-weight: 600;
}

.love-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 48px;
}

.link-heart {
  font-size: 1.6rem;
  animation: pulseHeart 1.3s ease-in-out infinite;
}

.link-heart.small {
  font-size: 1.2rem;
  animation-delay: 0.4s;
}

@keyframes pulseHeart {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.love-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  border: 4px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 22px rgba(255, 214, 227, 0.75), 0 18px 38px rgba(0, 0, 0, 0.35);
  animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.03);
  }
  45% {
    transform: scale(0.99);
  }
  60% {
    transform: scale(1.04);
  }
}

.msg {
  font-size: clamp(1.02rem, 4.6vw, 1.3rem);
  color: var(--white-soft);
  max-width: 560px;
  margin: 0 auto;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.typing-line {
  min-height: 34px;
  margin: 14px auto 22px;
  font-size: clamp(0.95rem, 4vw, 1.1rem);
  color: #ffe9f1;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  width: fit-content;
  max-width: 96%;
  white-space: nowrap;
  overflow: hidden;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%,
  50% {
    border-right-color: rgba(255, 255, 255, 0.85);
  }
  51%,
  100% {
    border-right-color: transparent;
  }
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-share,
.btn-download {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.94rem;
  color: #d10a4d;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.btn-back {
  margin-top: 14px;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.site-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #ffe9f1;
}

.know-more-link {
  display: inline-block;
  margin-top: 6px;
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.know-more-link:hover {
  opacity: 0.85;
}

.social-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.social-icon-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-icon-link svg {
  width: 20px;
  height: 20px;
}

.social-icon-link:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255, 255, 255, 0.32);
}

.valentine-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.valentine-gate::before,
.valentine-gate::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.valentine-gate::before {
  width: 240px;
  height: 240px;
  top: -80px;
  left: -70px;
  background: rgba(255, 218, 231, 0.38);
  animation: gateBlobA 8s ease-in-out infinite;
}

.valentine-gate::after {
  width: 280px;
  height: 280px;
  right: -100px;
  bottom: -90px;
  background: rgba(255, 177, 208, 0.28);
  animation: gateBlobB 9s ease-in-out infinite;
}

.valentine-gate.hide {
  animation: fadeOutPage 0.4s ease forwards;
}

.valentine-card {
  width: min(100%, 460px);
  background: linear-gradient(160deg, rgba(255, 118, 170, 0.34), rgba(255, 91, 154, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 24px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(7px);
  position: relative;
  overflow: hidden;
  animation: cardFloat 3.5s ease-in-out infinite;
}

.valentine-card::before {
  content: "";
  position: absolute;
  top: -38%;
  left: -45%;
  width: 40%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.34) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: cardShimmer 3.8s linear infinite;
}

.valentine-title {
  font-family: var(--font-romantic);
  font-size: clamp(2.5rem, 8vw, 3.7rem);
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 0 2px 14px rgba(255, 225, 239, 0.55);
  letter-spacing: 0.5px;
}

.valentine-subtitle {
  color: #fff3f8;
  margin-bottom: 22px;
  font-weight: 500;
}

.valentine-actions {
  position: relative;
  min-height: 140px;
}

.btn-yes,
.btn-no {
  width: 130px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-yes {
  background: linear-gradient(120deg, #fff, #ffeaf3);
  color: #be0b48;
  position: absolute;
  left: 18px;
  top: 56px;
  box-shadow: 0 10px 18px rgba(255, 255, 255, 0.35);
  animation: yesPulse 1.5s ease-in-out infinite;
}

.btn-no {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.58);
  position: absolute;
  right: 18px;
  top: 56px;
}

.btn-yes:hover,
.btn-no:hover {
  transform: scale(1.06);
}

@keyframes yesPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0), 0 10px 18px rgba(255, 255, 255, 0.28);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 238, 246, 0.9), 0 12px 24px rgba(255, 255, 255, 0.35);
  }
}

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

@keyframes cardShimmer {
  0% {
    left: -45%;
  }
  100% {
    left: 125%;
  }
}

@keyframes gateBlobA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, 12px) scale(1.08);
  }
}

@keyframes gateBlobB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-18px, -15px) scale(1.06);
  }
}

.valentine-popup {
  position: fixed;
  left: 50%;
  top: 32px;
  transform: translate(-50%, -14px);
  background: rgba(255, 255, 255, 0.95);
  color: #c50a4a;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.valentine-popup.show {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.floating-hearts,
.sparkle-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.float-heart {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  animation-name: rise;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(0.75);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-110vh) scale(1.2);
    opacity: 0;
  }
}

.sparkle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 14px rgba(255, 255, 255, 1);
  animation: twinkle 1.2s ease forwards;
}

@keyframes twinkle {
  from {
    transform: scale(0.3);
    opacity: 1;
  }
  to {
    transform: scale(1.9);
    opacity: 0;
  }
}

.burst-heart {
  position: fixed;
  font-size: 1.1rem;
  animation: burst 1.15s ease-out forwards;
}

.love-rain-text {
  position: fixed;
  top: -24px;
  color: #fff1f7;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: loveRainFall 2.8s linear forwards;
}

.love-rain-heart {
  position: fixed;
  top: -24px;
  pointer-events: none;
  animation: loveRainFall 2.8s linear forwards;
}

@keyframes loveRainFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(12deg);
    opacity: 0;
  }
}

@keyframes burst {
  from {
    transform: translate(0, 0) scale(0.2);
    opacity: 1;
  }
  to {
    transform: translate(var(--x), var(--y)) scale(1.15);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .love-content {
    padding: 16px 10px;
  }

  .valentine-card {
    width: min(100%, 520px);
    padding: 22px 14px;
  }

  .valentine-title {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .typing-line {
    white-space: normal;
    border-right: none;
    text-align: center;
    animation: none;
  }

  .person-card {
    width: min(40vw, 170px);
  }
}

@media (max-width: 480px) {
  body.center {
    padding: 14px;
  }

  .card {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .form-title {
    font-size: clamp(1.9rem, 10vw, 2.4rem);
  }

  .btn-hearts,
  .btn-share,
  .btn-download,
  .btn-back,
  .btn-surprise {
    width: 100%;
  }

  .controls {
    gap: 8px;
  }

  .love-title {
    font-size: clamp(2rem, 13vw, 2.8rem);
  }

  .msg {
    font-size: 0.98rem;
  }

  .btn-yes,
  .btn-no {
    width: 44%;
    max-width: 132px;
    min-width: 96px;
  }

  .btn-yes {
    left: 10px;
  }

  .btn-no {
    right: 10px;
  }

  .couple-row {
    gap: 8px;
  }

  .person-card {
    width: min(41vw, 148px);
  }

  .social-icon-link {
    width: 34px;
    height: 34px;
  }

  .site-footer {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .valentine-card {
    padding: 18px 12px;
  }

  .valentine-actions {
    min-height: 128px;
  }

  .btn-yes,
  .btn-no {
    font-size: 0.92rem;
    padding: 10px 8px;
  }

  .person-card {
    width: min(39vw, 132px);
  }

  .person-label {
    font-size: 0.82rem;
  }
}

