/* animations.css - Card flip, breathing glow, fade-in effects */
/* Adapted for light/white background with sage green accents */

/* Breathing glow on card back - subtle sage green pulse */
@keyframes breathingGlow {
  0%, 100% {
    box-shadow:
      0 0 15px rgba(157, 178, 40, 0.08),
      0 0 30px rgba(157, 178, 40, 0.04);
  }
  50% {
    box-shadow:
      0 0 20px rgba(157, 178, 40, 0.15),
      0 0 40px rgba(157, 178, 40, 0.08);
  }
}

.card-back,
.card-flip-back {
  animation: breathingGlow 4s ease-in-out infinite;
}

/* Card lift before flip */
.card-flip-container.flipped .card-flip-back {
  animation: none;
}

/* Gentle pulse on card text after reveal */
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.card-flip-container.flipped .card-text {
  animation: gentlePulse 3s ease-in-out 1.5s 1;
}

/* Fade in from below */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glow effect on revealed card - subtle for white bg */
@keyframes cardGlow {
  0%, 100% {
    box-shadow: 0 3px 6px -5px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 3px 10px rgba(157, 178, 40, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

.card-flip-container.flipped .card-flip-front {
  animation: cardGlow 4s ease-in-out infinite;
}

/* Streaming text cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.ai-response-text.streaming::after {
  content: '\2588';
  animation: blink 0.8s ease-in-out infinite;
  color: var(--accent-primary);
  margin-inline-start: 2px;
}

/* Modal entrance */
.email-modal.visible .email-modal-content {
  animation: fadeInUp 0.4s ease-out;
}

/* Streak dot entrance */
@keyframes dotPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.streak-display.visible .streak-dot {
  animation: dotPop 0.3s ease-out both;
}

.streak-display.visible .streak-dot:nth-child(1) { animation-delay: 0s; }
.streak-display.visible .streak-dot:nth-child(2) { animation-delay: 0.1s; }
.streak-display.visible .streak-dot:nth-child(3) { animation-delay: 0.2s; }
.streak-display.visible .streak-dot:nth-child(4) { animation-delay: 0.3s; }
.streak-display.visible .streak-dot:nth-child(5) { animation-delay: 0.4s; }
.streak-display.visible .streak-dot:nth-child(6) { animation-delay: 0.5s; }
.streak-display.visible .streak-dot:nth-child(7) { animation-delay: 0.6s; }

/* Draw button hover */
.draw-btn:not(.disabled) {
  transition: all 0.3s ease;
}

/* Page transition */
.screen {
  animation: fadeInUp 0.4s ease-out;
}
