/*
 * A Fantástica Aventura do Circo - Fun Animations
 * Escola Maria Cacko Ballet Infantil
 */

/* ===== Fun Keyframes ===== */

/* Confetti Animation */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(1000px) rotate(720deg);
    opacity: 0;
  }
}

/* Emoji Float Animation */
@keyframes emoji-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Jelly Animation */
@keyframes jelly {
  0%, 100% {
    transform: scale(1, 1);
  }
  25% {
    transform: scale(0.95, 1.05);
  }
  50% {
    transform: scale(1.05, 0.95);
  }
  75% {
    transform: scale(0.97, 1.03);
  }
}

/* Tada Animation */
@keyframes tada {
  0% {
    transform: scale(1);
  }
  10%, 20% {
    transform: scale(0.9) rotate(-3deg);
  }
  30%, 50%, 70%, 90% {
    transform: scale(1.1) rotate(3deg);
  }
  40%, 60%, 80% {
    transform: scale(1.1) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

/* Rainbow Border Animation */
@keyframes rainbow-border {
  0% {
    border-color: #ff73b9;
    box-shadow: 0 0 10px #ff73b9;
  }
  20% {
    border-color: #ff9e73;
    box-shadow: 0 0 10px #ff9e73;
  }
  40% {
    border-color: #ffff73;
    box-shadow: 0 0 10px #ffff73;
  }
  60% {
    border-color: #73ff73;
    box-shadow: 0 0 10px #73ff73;
  }
  80% {
    border-color: #73b9ff;
    box-shadow: 0 0 10px #73b9ff;
  }
  100% {
    border-color: #ff73b9;
    box-shadow: 0 0 10px #ff73b9;
  }
}

/* Heartbeat Animation */
@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.15);
  }
  70% {
    transform: scale(1);
  }
}

/* Swing Animation */
@keyframes swing {
  20% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* ===== Fun Animation Classes ===== */

.jelly {
  animation: jelly 0.8s ease;
}

.jelly-hover:hover {
  animation: jelly 0.8s ease;
}

.tada {
  animation: tada 1s ease;
}

.tada-hover:hover {
  animation: tada 1s ease;
}

.rainbow-border {
  animation: rainbow-border 5s linear infinite;
}

.heartbeat {
  animation: heartbeat 1.5s ease infinite;
}

.swing {
  animation: swing 1s ease;
}

.swing-hover:hover {
  animation: swing 1s ease;
}

/* ===== Fun Elements ===== */

/* Confetti Container */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confetti-container.active {
  opacity: 1;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--color-primary);
  border-radius: 0;
  opacity: 0.8;
  animation: confetti-fall 5s linear forwards;
}

/* Emoji Decorations */
.emoji-decoration {
  position: absolute;
  font-size: 2.4rem;
  z-index: 1;
  pointer-events: none;
  animation: emoji-float 3s ease-in-out infinite;
  opacity: 0.7;
}

/* Fun Cursor */
.fun-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  z-index: 9999;
  opacity: 0.7;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

/* Enhanced Ticket Cards */
.ticket-card.fun {
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ticket-card.fun:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 15px 30px rgba(91, 42, 138, 0.3);
}

.ticket-card.fun::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: rotate(45deg);
  z-index: 1;
  transition: all 0.8s ease;
  pointer-events: none;
}

.ticket-card.fun:hover::before {
  transform: rotate(45deg) translate(100%, 100%);
}

.ticket-card.fun .ticket-icon {
  transition: all 0.5s ease;
}

.ticket-card.fun:hover .ticket-icon {
  transform: rotate(360deg) scale(1.2);
}

/* Enhanced Feature Icons */
.ticket-features li i.fun-icon {
  transition: all 0.3s ease;
  transform-origin: center;
}

.ticket-features li:hover i.fun-icon {
  transform: scale(1.5);
  color: var(--color-accent);
}

/* Enhanced Timeline */
.timeline-item.fun .timeline-icon {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item.fun:hover .timeline-icon {
  transform: translateX(-50%) scale(1.2) rotate(15deg);
  background-color: var(--color-accent);
}

.timeline-item.fun .timeline-content {
  transition: all 0.5s ease;
}

.timeline-item.fun:hover .timeline-content {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(91, 42, 138, 0.25);
}

/* Fun Buttons */
.btn-primary.fun, .btn-secondary.fun {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary.fun::after, .btn-secondary.fun::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: rotate(45deg);
  z-index: 1;
  transition: all 0.8s ease;
  pointer-events: none;
}

.btn-primary.fun:hover::after, .btn-secondary.fun:hover::after {
  transform: rotate(45deg) translate(100%, 100%);
}

.btn-primary.fun:hover, .btn-secondary.fun:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 20px rgba(91, 42, 138, 0.3);
}

/* Animated Background Patterns */
.fun-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image:
    radial-gradient(var(--color-primary) 2px, transparent 2px),
    radial-gradient(var(--color-secondary) 2px, transparent 2px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: float 20s linear infinite;
}

/* Emoji Feature Icons */
.emoji-icon {
  display: inline-block;
  font-size: 2.2rem;
  margin-right: 10px;
  transform-origin: center;
  animation: float 3s ease-in-out infinite;
}



/* Video Showcase Section */
.video-showcase {
  position: relative;
  padding: var(--spacing-xl) 0;
  background-color: var(--color-primary);
  overflow: hidden;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, var(--color-secondary) 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, var(--color-accent) 2px, transparent 2px),
    radial-gradient(circle at 40% 80%, var(--color-blue) 2px, transparent 2px);
  background-size: 100px 100px;
  opacity: 0.2;
  z-index: 0;
  animation: float 30s linear infinite;
}

.video-container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-container:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-radius: var(--border-radius-lg);
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none;
  animation: rainbow-border 5s linear infinite;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.video-title {
  text-align: center;
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.video-title h2 {
  color: var(--color-white);
  margin-bottom: var(--spacing-xs);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.video-title p {
  font-size: 1.8rem;
  max-width: 600px;
  margin: 0 auto;
}

.video-emoji-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.video-emoji {
  position: absolute;
  font-size: 3rem;
  opacity: 0.7;
  animation: float 5s ease-in-out infinite;
}

.video-emoji:nth-child(1) {
  top: 10%;
  left: 5%;
  animation-delay: 0.5s;
}

.video-emoji:nth-child(2) {
  top: 15%;
  right: 10%;
  animation-delay: 1s;
}

.video-emoji:nth-child(3) {
  bottom: 15%;
  left: 10%;
  animation-delay: 1.5s;
}

.video-emoji:nth-child(4) {
  bottom: 20%;
  right: 5%;
  animation-delay: 2s;
}
