/* ========== SUCCESS / REVEAL PAGE ========== */

#success-view {
  z-index: 4;
  flex-direction: column;
  overflow-y: auto;
}

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

/* Success checkmark overlay */
.success-check {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
}

.success-check.visible {
  opacity: 1;
}

.success-check .check-circle {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}

.success-check.visible .check-circle {
  animation: draw 0.6s var(--ease-material) 0.1s forwards;
}

.success-check .check-mark {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
}

.success-check.visible .check-mark {
  animation: draw 0.4s var(--ease-material) 0.5s forwards;
}

/* Main success content */
.success-content {
  text-align: center;
  max-width: 560px;
  width: 90%;
  padding: var(--space-2xl) var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.success-content.visible {
  animation: fadeSlideUp 0.8s var(--ease-spring) forwards;
}

/* Badge */
.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.3);
  border-radius: 100px;
  padding: 8px 20px 8px 12px;
  margin-bottom: var(--space-xl);
  opacity: 0;
}

.success-badge.visible {
  animation: badgeIn 0.6s var(--ease-spring) forwards;
}

.success-badge span {
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 600;
  color: var(--captcha-green);
}

/* Title */
.success-title {
  margin-bottom: var(--space-xl);
}

.success-line-1 {
  display: block;
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 400;
  color: var(--warm-gray);
  margin-bottom: var(--space-sm);
  opacity: 0;
}

.success-line-1.visible {
  animation: fadeIn 0.5s ease forwards;
}

.success-line-2 {
  display: block;
  font-family: var(--font-handwritten);
  font-size: 42px;
  font-weight: 700;
  color: var(--deep-rose);
  line-height: 1.2;
  opacity: 0;
}

.success-line-2.visible {
  animation: fadeSlideUp 0.8s var(--ease-spring) forwards;
}

/* Love letter */
.love-letter {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-medium);
  margin-bottom: var(--space-xl);
  position: relative;
  opacity: 0;
}

.love-letter.visible {
  animation: fadeSlideUp 0.6s var(--ease-spring) forwards;
}

/* Decorative doodle border */
.love-letter::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px dashed var(--coral);
  border-radius: calc(var(--radius-lg) + 3px);
  opacity: 0.4;
  pointer-events: none;
}

.love-letter-inner {
  position: relative;
}

.love-line {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--charcoal);
  line-height: 1.8;
  opacity: 0;
}

.love-line.visible {
  animation: loveLine 0.5s var(--ease-spring) forwards;
  animation-delay: calc(var(--delay) * 0.25s);
}

.love-line-signature {
  font-family: var(--font-handwritten);
  font-size: 28px;
  font-weight: 700;
  color: var(--rose);
  margin-top: var(--space-md);
}

/* Replay button */
.btn-replay {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--warm-gray);
  background: none;
  border: none;
  padding: 8px 16px;
  opacity: 0;
  transition: color 0.2s;
}

.btn-replay.visible {
  animation: fadeIn 0.5s ease 1s forwards;
}

.btn-replay:hover {
  color: var(--rose);
}

/* Responsive */
@media (max-width: 480px) {
  .success-line-2 {
    font-size: 32px;
  }

  .love-line {
    font-size: 14px;
  }

  .love-line-signature {
    font-size: 24px;
  }

  .success-content {
    padding: var(--space-xl) var(--space-sm);
  }
}