/* ============================================
   MODERN ANIMATIONS FOR MATCHA DATING APP
   ============================================ */

/* ========== GLOBAL ANIMATION UTILITIES ========== */

/* Плавное появление снизу */
.animate-fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

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

/* Появление с масштабированием */
.animate-scale-in {
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== FLOATING PARTICLES BACKGROUND ========== */

.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  height: auto;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.4));
  border-radius: 50%;
  animation: floatParticle 15s ease-in-out infinite;
  opacity: 0;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 18s;
}
.particle:nth-child(2) {
  left: 20%;
  animation-delay: 2s;
  animation-duration: 15s;
}
.particle:nth-child(3) {
  left: 30%;
  animation-delay: 4s;
  animation-duration: 20s;
}
.particle:nth-child(4) {
  left: 40%;
  animation-delay: 1s;
  animation-duration: 17s;
}
.particle:nth-child(5) {
  left: 50%;
  animation-delay: 3s;
  animation-duration: 16s;
}
.particle:nth-child(6) {
  left: 60%;
  animation-delay: 5s;
  animation-duration: 19s;
}
.particle:nth-child(7) {
  left: 70%;
  animation-delay: 2.5s;
  animation-duration: 14s;
}
.particle:nth-child(8) {
  left: 80%;
  animation-delay: 4.5s;
  animation-duration: 18s;
}
.particle:nth-child(9) {
  left: 90%;
  animation-delay: 1.5s;
  animation-duration: 21s;
}
.particle:nth-child(10) {
  left: 15%;
  animation-delay: 3.5s;
  animation-duration: 16s;
}
.particle:nth-child(11) {
  left: 25%;
  animation-delay: 0.5s;
  animation-duration: 19s;
}
.particle:nth-child(12) {
  left: 35%;
  animation-delay: 2.2s;
  animation-duration: 17s;
}
.particle:nth-child(13) {
  left: 45%;
  animation-delay: 4.2s;
  animation-duration: 15s;
}
.particle:nth-child(14) {
  left: 55%;
  animation-delay: 1.2s;
  animation-duration: 20s;
}
.particle:nth-child(15) {
  left: 65%;
  animation-delay: 3.2s;
  animation-duration: 18s;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ========== GLOWING ORBS ========== */

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 20s ease-in-out infinite;
}

.glow-orb--1 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.15);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.glow-orb--2 {
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.12);
  bottom: -50px;
  left: -50px;
  animation-delay: -5s;
}

.glow-orb--3 {
  width: 250px;
  height: 250px;
  background: rgba(168, 85, 247, 0.1);
  top: 50%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(20px, 10px) scale(1.05);
  }
}

/* ========== HERO SECTION ANIMATIONS ========== */

/* Анимация заголовка с эффектом печати */
.hero-title-animated {
  overflow: hidden;
}

.hero-title-animated span {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-90deg);
  animation: titleReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes titleReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Анимация появления для hero контента */
.hero--landing .hero__text--independent {
  opacity: 0;
  animation: heroContentReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero--landing .hero__video--independent {
  opacity: 0;
  animation: heroContentReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero--landing .hero__cta--independent {
  opacity: 0;
  animation: heroContentReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

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

/* ========== HEARTS ANIMATION ========== */

.hearts__spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #f97316);
  opacity: 0;
  animation: sparkle 2s ease-in-out infinite;
}

.hearts__spark--1 {
  top: 0;
  left: 50%;
  animation-delay: 0s;
}
.hearts__spark--2 {
  top: 20%;
  right: 10%;
  animation-delay: 0.3s;
}
.hearts__spark--3 {
  bottom: 20%;
  right: 15%;
  animation-delay: 0.6s;
}
.hearts__spark--4 {
  bottom: 0;
  left: 50%;
  animation-delay: 0.9s;
}
.hearts__spark--5 {
  top: 20%;
  left: 10%;
  animation-delay: 1.2s;
}
.hearts__spark--6 {
  bottom: 20%;
  left: 15%;
  animation-delay: 1.5s;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0) translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) translate(-50%, -50%);
  }
}

/* Пульсация совместимости */
.hearts__compatibility {
  animation: compatibilityPulse 2s ease-in-out infinite;
}

@keyframes compatibilityPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
}

/* ========== BUTTON ANIMATIONS ========== */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Эффект ripple при клике */
.btn::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.6s, opacity 0.6s;
}

.btn:active::after {
  transform: scale(2);
  opacity: 1;
  transition: 0s;
}

/* Магнитный эффект при наведении */
.btn--primary {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4), 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.btn--primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Shimmer эффект для primary кнопок */
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

/* ========== CARD ANIMATIONS ========== */

.how-it-works__step {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.how-it-works__step.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

.how-it-works__step:nth-child(1) {
  transition-delay: 0.1s;
}
.how-it-works__step:nth-child(2) {
  transition-delay: 0.2s;
}
.how-it-works__step:nth-child(3) {
  transition-delay: 0.3s;
}

/* 3D hover эффект для карточек */
.how-it-works__step:hover {
  transform: translateY(-5px) rotateX(2deg) rotateY(-2deg); /* Уменьшено с -8px до -5px для предотвращения переполнения */
  box-shadow: 0 15px 35px -15px rgba(6, 182, 212, 0.15), 0 0 0 1px rgba(6, 182, 212, 0.1); /* Уменьшен box-shadow */
}

/* Иконки с bounce эффектом */
.how-it-works__icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.how-it-works__step:hover .how-it-works__icon {
  transform: scale(1.15) rotate(5deg);
}

/* ========== SCROLL INDICATOR ========== */

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 1;
}

@keyframes scrollBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-15px);
  }
  60% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* ========== CHAT BUBBLES ANIMATION ========== */

.bubble {
  opacity: 0;
  transform: translateY(20px);
  animation: bubbleAppear 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

@keyframes bubbleAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Эффект наведения на bubble */
.bubble:hover .bubble__message {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.2);
}

.bubble__message {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== CLOUD ANIMATIONS ========== */

.cloud {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.cloud.cloud--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cloud--1.cloud--visible {
  transition-delay: 0.2s;
}

.cloud--2.cloud--visible {
  transition-delay: 0.4s;
}

/* Плавающий эффект для облаков */
.cloud__message {
  animation: cloudFloat 4s ease-in-out infinite;
}

.cloud--1 .cloud__message {
  animation-delay: 0s;
}

.cloud--2 .cloud__message {
  animation-delay: 2s;
}

@keyframes cloudFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ========== STATS COUNTER ANIMATION ========== */

.stats-number {
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: statsGlow 3s ease-in-out infinite;
}

@keyframes statsGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
  }
}

/* ========== SECTION REVEAL ON SCROLL ========== */

.section-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========== NAVBAR ANIMATION ========== */

.topbar {
  animation: navSlideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes navSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hover эффект для навигации */
.nav__link {
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
}

.nav__link:hover::after {
  width: 80%;
}

/* ========== FOOTER ANIMATION ========== */

.footer {
  opacity: 0;
  animation: footerReveal 0.8s ease-out 1s forwards;
}

@keyframes footerReveal {
  to {
    opacity: 1;
  }
}

/* ========== MOBILE MENU ANIMATION ========== */

.mobile-menu {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(100%);
  opacity: 0;
}

.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

.mobile-menu__nav .nav__link {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.active .mobile-menu__nav .nav__link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(2) {
  transition-delay: 0.15s;
}
.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(3) {
  transition-delay: 0.2s;
}
.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(4) {
  transition-delay: 0.25s;
}
.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(5) {
  transition-delay: 0.3s;
}
.mobile-menu.active .mobile-menu__nav .nav__link:nth-child(6) {
  transition-delay: 0.35s;
}

/* ========== LOADING STATES ========== */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ========== TOOLTIP ANIMATION ========== */

.tooltip {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ========== FOCUS ANIMATIONS ========== */

input:focus,
textarea:focus,
select:focus {
  animation: focusPulse 0.3s ease-out;
}

@keyframes focusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
  }
}

/* ========== IMAGE HOVER EFFECTS ========== */

.how-it-works__icon img {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.how-it-works__step:hover .how-it-works__icon img {
  transform: scale(1.1) rotate(3deg);
}

/* ========== GRADIENT TEXT ANIMATION ========== */

.animated-gradient-text {
  background: linear-gradient(270deg, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #06b6d4);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========== REDUCE MOTION ========== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== AURORA BACKGROUND EFFECT ========== */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(6, 182, 212, 0.08) 60deg,
    transparent 120deg,
    rgba(59, 130, 246, 0.08) 180deg,
    transparent 240deg,
    rgba(168, 85, 247, 0.06) 300deg,
    transparent 360deg
  );
  animation: auroraRotate 30s linear infinite;
}

.aurora-bg::after {
  animation-direction: reverse;
  animation-duration: 25s;
  opacity: 0.5;
}

@keyframes auroraRotate {
  from {
    transform: translate(-25%, -25%) rotate(0deg);
  }
  to {
    transform: translate(-25%, -25%) rotate(360deg);
  }
}

/* ========== MORPHING BLOB ========== */
.morph-blob {
  position: fixed;
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morphBlob 15s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  top: 20%;
  right: -10%;
}

@keyframes morphBlob {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg) scale(1);
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 70% 50% 60%;
    transform: rotate(180deg) scale(0.95);
  }
  75% {
    border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    transform: rotate(270deg) scale(1.05);
  }
}

/* ========== FIREFLIES ANIMATION - светлячки в header и footer ========== */
.fireflies-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.fireflies-header,
.fireflies-footer {
  height: 100%;
}

.firefly {
  --firefly-hue: 180;
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    hsl(var(--firefly-hue), 100%, 90%) 0%,
    hsl(var(--firefly-hue), 100%, 70%) 30%,
    hsl(var(--firefly-hue), 100%, 50%) 60%,
    transparent 100%
  );
  box-shadow: 
    0 0 6px 2px hsla(var(--firefly-hue), 100%, 70%, 0.8),
    0 0 12px 4px hsla(var(--firefly-hue), 100%, 60%, 0.5),
    0 0 20px 8px hsla(var(--firefly-hue), 100%, 50%, 0.3);
  animation: 
    fireflyFloat 4s ease-in-out infinite,
    fireflyGlow 2s ease-in-out infinite;
  opacity: 0;
}

/* Светлячки в header - более яркие на тёмном фоне */
.fireflies-header .firefly {
  --firefly-hue: 185;
  background: radial-gradient(
    circle at center,
    hsl(var(--firefly-hue), 100%, 95%) 0%,
    hsl(var(--firefly-hue), 100%, 80%) 30%,
    hsl(var(--firefly-hue), 100%, 60%) 60%,
    transparent 100%
  );
  box-shadow: 
    0 0 8px 3px hsla(var(--firefly-hue), 100%, 80%, 0.9),
    0 0 16px 6px hsla(var(--firefly-hue), 100%, 70%, 0.6),
    0 0 28px 12px hsla(var(--firefly-hue), 100%, 60%, 0.4);
}

/* Анимация парения светлячка */
@keyframes fireflyFloat {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    transform: translate(15px, -10px);
  }
  50% {
    transform: translate(-10px, -20px);
    opacity: 1;
  }
  75% {
    transform: translate(20px, -15px);
  }
  90% {
    opacity: 0.7;
  }
}

/* Анимация мерцания свечения */
@keyframes fireflyGlow {
  0%, 100% {
    box-shadow: 
      0 0 6px 2px hsla(var(--firefly-hue), 100%, 70%, 0.8),
      0 0 12px 4px hsla(var(--firefly-hue), 100%, 60%, 0.5),
      0 0 20px 8px hsla(var(--firefly-hue), 100%, 50%, 0.3);
    filter: brightness(1);
  }
  50% {
    box-shadow: 
      0 0 10px 4px hsla(var(--firefly-hue), 100%, 80%, 1),
      0 0 20px 8px hsla(var(--firefly-hue), 100%, 70%, 0.7),
      0 0 35px 15px hsla(var(--firefly-hue), 100%, 60%, 0.4);
    filter: brightness(1.3);
  }
}

/* ========== GLITCH TEXT EFFECT ========== */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  animation: glitchTop 3s ease-in-out infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch-text::after {
  animation: glitchBottom 2.5s ease-in-out infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitchTop {
  0%,
  100% {
    transform: translate(0);
  }
  2% {
    transform: translate(2px, -1px);
  }
  4% {
    transform: translate(-2px, 1px);
  }
  6% {
    transform: translate(0);
  }
}

@keyframes glitchBottom {
  0%,
  100% {
    transform: translate(0);
  }
  3% {
    transform: translate(-2px, 1px);
  }
  6% {
    transform: translate(2px, -1px);
  }
  9% {
    transform: translate(0);
  }
}

/* ========== 3D CARD TILT ========== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card-inner {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
}

.tilt-card:hover .tilt-card-inner {
  transform: rotateY(10deg) rotateX(5deg);
}

.tilt-card-content {
  transform: translateZ(30px);
}

/* ========== SPOTLIGHT EFFECT ========== */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(6, 182, 212, 0.15) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* ========== WAVE ANIMATION FOR SECTIONS ========== */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.wave-divider .wave-path {
  animation: waveMove 10s ease-in-out infinite;
}

@keyframes waveMove {
  0%,
  100% {
    d: path("M0,30 C150,60 350,0 500,30 C650,60 850,0 1000,30 L1000,60 L0,60 Z");
  }
  50% {
    d: path("M0,30 C150,0 350,60 500,30 C650,0 850,60 1000,30 L1000,60 L0,60 Z");
  }
}

/* ========== STAGGERED LIST ANIMATION ========== */
.stagger-list > * {
  opacity: 0;
  transform: translateX(-20px);
  animation: staggerIn 0.5s ease forwards;
}

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

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== NEON GLOW EFFECT ========== */
.neon-glow {
  text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%,
  100% {
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
  }
  50% {
    text-shadow: 0 0 2px currentColor, 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
  }
}

/* ========== ELASTIC BUTTON ========== */
.btn--elastic {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn--elastic:hover {
  transform: scale(1.05);
}

.btn--elastic:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* ========== LIQUID BUTTON ========== */
.btn--liquid {
  position: relative;
  z-index: 1;
}

.btn--liquid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn--liquid:hover::before {
  transform: scale(1.1);
  filter: blur(10px);
  opacity: 0.7;
}

/* ========== TEXT REVEAL ANIMATION ========== */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  animation: textRevealUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes textRevealUp {
  to {
    transform: translateY(0);
  }
}

/* ========== BOUNCE IN ANIMATION ========== */
.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== FLIP CARD EFFECT ========== */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* ========== CURSOR TRAIL ========== */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(59, 130, 246, 0.5));
  pointer-events: none;
  z-index: 100002;
  mix-blend-mode: screen;
  transition: transform 0.1s ease-out;
}

/* ========== CONFETTI ANIMATION ========== */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  animation: confettiFall 3s ease-out forwards;
  pointer-events: none;
  z-index: 100003;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ========== SUCCESS CHECKMARK ========== */
.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #22c55e;
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 #22c55e;
  animation: fillCheck 0.4s ease-in-out 0.4s forwards, scaleCheck 0.3s ease-in-out 0.9s both;
}

.success-checkmark .checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #22c55e;
  fill: none;
  animation: strokeCheck 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark .checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeCheck {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes fillCheck {
  100% {
    box-shadow: inset 0 0 0 30px rgba(34, 197, 94, 0.1);
  }
}

@keyframes scaleCheck {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* ========== HEARTBEAT ANIMATION ========== */
.heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.15);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.15);
  }
  70% {
    transform: scale(1);
  }
}

/* ========== TYPING CURSOR ========== */
.typing-cursor::after {
  content: "|";
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* ========== PROGRESS RING ========== */
.progress-ring__circle {
  transition: stroke-dashoffset 0.5s ease-in-out;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* ========== SHAKE ANIMATION ========== */
.shake {
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

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

/* ========== SWING ANIMATION ========== */
.swing {
  animation: swing 1s ease-in-out;
  transform-origin: top center;
}

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