/* Flipcard Animation Component */
.flipcard-container {
  perspective: 1000px;
  width: 100%;
  height: 400px;
  margin: var(--spacing-xl) 0;
  cursor: pointer;
}

.flipcard {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flipcard.is-flipped {
  transform: rotateY(180deg);
}

.flipcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(238, 90, 49, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
  text-align: center;
}

.flipcard-front {
  background-color: var(--taku-orange);
  color: white;
}

.flipcard-back {
  background-color: white;
  color: var(--taku-orange);
  transform: rotateY(180deg);
  border: 3px solid var(--taku-orange);
}

/* Entrance animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: slideInUp 0.5s ease-out forwards;
}

/* Button hover effects */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: var(--taku-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

/* Loading animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in forwards;
}

/* Pulse animation for save button */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-primary:active {
  animation: pulse 0.2s ease-in-out;
}

/* Smooth transitions for form elements */
input[type="text"],
input[type="date"],
textarea,
select {
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(238, 90, 49, 0.15);
}

/* Progress bar animation */
.progress-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success message animation */
.success-message {
  animation: slideInRight 0.4s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hover effects for lesson cards */
.flipcard-container:hover .flipcard-face {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(238, 90, 49, 0.2);
}

.flipcard-container:hover .flipcard-back {
  transform: rotateY(180deg) translateY(-4px);
}

/* Tooltip animations */
.tooltip {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tooltip-label:hover .tooltip {
  visibility: visible;
  opacity: 1;
  animation: tooltipAppear 0.3s ease-out;
}

@keyframes tooltipAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Interactive button animations */
.interactive-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.interactive-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(238, 90, 49, 0.2);
}

.interactive-btn:active {
  transform: translateY(-1px);
}

/* Value card animations */
.value-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0) scale(1);
}

.value-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(238, 90, 49, 0.2);
}

.value-card.selected {
  animation: cardSelect 0.4s ease-out;
}

@keyframes cardSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Dream section animations - REMOVED FLOATING ANIMATION */
.dream-section {
  /* No floating animation */
}

.dream-prompt {
  transition: all 0.3s ease;
}

.dream-prompt:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(238, 90, 49, 0.1);
}

/* Time block animations */
.time-block {
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.time-block:nth-child(1) { animation-delay: 0.1s; }
.time-block:nth-child(2) { animation-delay: 0.2s; }
.time-block:nth-child(3) { animation-delay: 0.3s; }
.time-block:nth-child(4) { animation-delay: 0.4s; }

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

.time-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(238, 90, 49, 0.15);
}

/* Goal section animations */
.goal-section {
  transition: all 0.3s ease;
}

.goal-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(238, 90, 49, 0.12);
}

.smart-indicator {
  transition: all 0.3s ease;
}

.smart-indicator:hover {
  transform: scale(1.05);
  background-color: var(--taku-orange);
  color: white;
}

/* Milestone tracker animations */
.milestone-item {
  transition: all 0.3s ease;
  opacity: 0;
  animation: slideInFromLeft 0.5s ease-out forwards;
}

.milestone-item:nth-child(1) { animation-delay: 0.1s; }
.milestone-item:nth-child(2) { animation-delay: 0.2s; }
.milestone-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.milestone-item:hover {
  transform: translateX(5px);
  background-color: white;
  box-shadow: 0 4px 15px rgba(238, 90, 49, 0.1);
}

.progress-indicator {
  transition: all 0.3s ease;
}

.progress-indicator.active {
  animation: indicatorPulse 2s infinite;
}

@keyframes indicatorPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(238, 90, 49, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(238, 90, 49, 0);
  }
}

/* Family tree animations */
.tree-member {
  transition: all 0.3s ease;
  opacity: 0;
  animation: treeGrow 0.6s ease-out forwards;
}

.tree-level:nth-child(1) .tree-member { animation-delay: 0.1s; }
.tree-level:nth-child(2) .tree-member { animation-delay: 0.3s; }
.tree-level:nth-child(3) .tree-member { animation-delay: 0.5s; }

@keyframes treeGrow {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.tree-member:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(238, 90, 49, 0.15);
}

/* SVG line drawing animation */
@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Pepeha display animation */
.pepeha-display {
  animation: pepehaReveal 0.8s ease-out;
}

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

.pepeha-line {
  opacity: 0;
  animation: lineReveal 0.4s ease-out forwards;
}

.pepeha-line:nth-child(1) { animation-delay: 0.1s; }
.pepeha-line:nth-child(2) { animation-delay: 0.2s; }
.pepeha-line:nth-child(3) { animation-delay: 0.3s; }
.pepeha-line:nth-child(4) { animation-delay: 0.4s; }
.pepeha-line:nth-child(5) { animation-delay: 0.5s; }
.pepeha-line:nth-child(6) { animation-delay: 0.6s; }
.pepeha-line:nth-child(7) { animation-delay: 0.7s; }
.pepeha-line:nth-child(8) { animation-delay: 0.8s; }

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Logo - no hover effects */
.dashboard-logo {
  transition: none;
}

/* Staggered entrance animations */
.stagger-in {
  opacity: 0;
  animation: staggerReveal 0.6s ease-out forwards;
}

.stagger-in:nth-child(1) { animation-delay: 0.1s; }
.stagger-in:nth-child(2) { animation-delay: 0.2s; }
.stagger-in:nth-child(3) { animation-delay: 0.3s; }
.stagger-in:nth-child(4) { animation-delay: 0.4s; }
.stagger-in:nth-child(5) { animation-delay: 0.5s; }
.stagger-in:nth-child(6) { animation-delay: 0.6s; }

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

/* REMOVED - Breathing animation no longer used */
/* .breathe animation has been removed as requested */

/* Shake animation for validation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}