:root {
  --purple-900: #2e1065;
  --purple-800: #4c1d95;
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-200: #ddd6fe;
  --purple-100: #ede9fe;
  --purple-50: #f5f3ff;
  --ink: #1e1b2e;
  --muted: #6b6880;
}

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

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(168, 85, 247, 0.55) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 82% 78%,
      rgba(109, 40, 217, 0.6) 0%,
      transparent 44%
    ),
    radial-gradient(
      circle at 50% 110%,
      rgba(236, 72, 153, 0.25) 0%,
      transparent 45%
    ),
    linear-gradient(135deg, #1a103d 0%, #3b0764 55%, #1a103d 100%);
}

.backdrop-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      2px 2px at 20% 30%,
      rgba(255, 255, 255, 0.6) 50%,
      transparent 100%
    ),
    radial-gradient(
      1px 1px at 70% 60%,
      rgba(255, 255, 255, 0.5) 50%,
      transparent 100%
    ),
    radial-gradient(
      1.5px 1.5px at 40% 80%,
      rgba(255, 255, 255, 0.55) 50%,
      transparent 100%
    ),
    radial-gradient(
      1px 1px at 85% 25%,
      rgba(255, 255, 255, 0.5) 50%,
      transparent 100%
    ),
    radial-gradient(
      1.5px 1.5px at 10% 70%,
      rgba(255, 255, 255, 0.5) 50%,
      transparent 100%
    );
  opacity: 0.7;
}

#app {
  width: 100%;
  max-width: 440px;
  min-height: 540px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  padding: 44px 36px;
  box-shadow:
    0 40px 90px -30px rgba(76, 29, 149, 0.7),
    0 0 0 1px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

#app::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.25) 0%,
    transparent 70%
  );
  pointer-events: none;
}

#app::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.2) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.dots {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.dot {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: #e7e1f4;
  transition:
    background 0.35s ease,
    width 0.35s ease;
}

.dot.active {
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400));
  width: 34px;
}

.page {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 2;
}

.page.active {
  display: flex;
}

.question {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  letter-spacing: -0.015em;
  max-width: 320px;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  position: relative;
  min-height: 124px;
  margin-top: auto;
  padding-top: 36px;
}

.btn {
  min-width: 220px;
  padding: 15px 36px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
  transition:
    transform 0.15s ease,
    box-shadow 0.25s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn-yes {
  background: linear-gradient(
    135deg,
    var(--purple-600) 0%,
    var(--purple-500) 100%
  );
  color: #fff;
  box-shadow:
    0 12px 28px -10px rgba(124, 58, 237, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-yes:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px -10px rgba(124, 58, 237, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

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

.btn-no {
  background: #fff;
  color: var(--purple-700);
  border: 1.5px solid var(--purple-200);
  position: absolute;
  z-index: 10;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  will-change: left, top, transform;
  transition:
    left 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3),
    top 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3),
    font-size 0.25s ease,
    padding 0.25s ease,
    min-width 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 6px 18px -8px rgba(124, 58, 237, 0.25);
}

#win {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  position: relative;
  z-index: 2;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.win-emoji {
  font-size: 84px;
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(124, 58, 237, 0.35));
}

.win-text {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple-700), var(--purple-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.win-sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  margin-top: -8px;
}

@keyframes popIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.page.entering {
  animation: slideIn 0.4s ease both;
}

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

.heart {
  position: absolute;
  font-size: 22px;
  animation: floatUp 2.2s ease-out forwards;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) scale(1.6) rotate(20deg);
  }
}

.carousel {
  width: 100%;
  max-width: 320px;
  margin-top: 6px;
  position: relative;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-100), #fff);
  box-shadow:
    0 24px 50px -18px rgba(76, 29, 149, 0.55),
    0 0 0 1px rgba(124, 58, 237, 0.12),
    inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--purple-200);
  color: var(--purple-700);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  box-shadow: 0 6px 16px -4px rgba(76, 29, 149, 0.45);
  transition:
    transform 0.18s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 2;
  font-family: inherit;
}

.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 22px -4px rgba(76, 29, 149, 0.55);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--purple-200);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.3s ease,
    width 0.3s ease;
}

.carousel-dot.active {
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400));
  width: 22px;
}

@media (max-width: 480px) {
  #app {
    padding: 36px 24px;
    min-height: 500px;
  }
  .question {
    font-size: 19px;
  }
  .btn {
    min-width: 200px;
  }
  .carousel {
    max-width: 280px;
  }
}
