/* 
 * MeinVerwalter
 * Animationen und Bewegungseffekte
 */

/* ===== SANFTE EINBLENDUNGEN UND BEWEGUNGEN ===== */

/* Sanftes Einblenden von unten */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Versetztes Einblenden der Elemente */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--item-index) * 0.1s);
}

/* Subtile Hover-Animationen für Karten */
.hover-float {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-float:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Elegante Buttons mit Ripple-Effekt */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn-ripple:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* Schwebende Elemente */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Dezente Hintergrundanimation */
.bg-animate {
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

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

/* Icon-Pulse Animation */
.icon-pulse {
  animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Shine-Effekt für Karten */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s;
}

.card-shine:hover::before {
  animation: shine 1.5s;
}

@keyframes shine {
  100% {
    left: 125%;
  }
}

/* Text-Animation für Hervorhebungen */
.text-gradient {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Loading-Effekte */
.loading-dots {
  display: inline-flex;
  align-items: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  margin: 0 3px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.6;
}

.loading-dots span:nth-child(1) {
  animation: dot-bounce 1.4s 0s infinite both;
}

.loading-dots span:nth-child(2) {
  animation: dot-bounce 1.4s 0.2s infinite both;
}

.loading-dots span:nth-child(3) {
  animation: dot-bounce 1.4s 0.4s infinite both;
}

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Scroll-Indikator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 3px solid;
  border-bottom: 3px solid;
  transform: rotate(45deg);
  margin: 0 0 3px;
  animation: scrollArrow 2s infinite;
}

@keyframes scrollArrow {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-10px, -10px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(10px, 10px);
  }
}

/* Parallax-Scroll-Effekt */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Feature Highlight Animation */
.feature-highlight {
  position: relative;
}

.feature-highlight::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.5s ease;
}

.feature-highlight:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Checkbox Animation */
.animated-checkbox {
  position: relative;
  width: 24px;
  height: 24px;
}

.animated-checkbox input {
  opacity: 0;
  width: 0;
  height: 0;
}

.animated-checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.animated-checkbox input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.animated-checkbox .checkmark:after {
  content: '';
  position: absolute;
  display: none;
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.animated-checkbox input:checked ~ .checkmark:after {
  display: block;
  animation: checkmark 0.3s ease forwards;
}

@keyframes checkmark {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}
