/* ============================================================
   INTERAKTIVNÍ ANIMACE - ROZŠÍŘENÍ
   Optimalizováno pro desktop i mobilní zařízení
   ============================================================ */

/* Redukce pohybu pro slabší zařízení */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   PULZUJÍCÍ ČÁSTICE V POZADÍ
   ============================================================ */

.animated-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(232, 165, 212, 0.8), rgba(201, 58, 138, 0.4));
  border-radius: 50%;
  animation: particleFloat 12s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-duration: 12s; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 60%; animation-duration: 14s; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-duration: 16s; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; top: 80%; animation-duration: 13s; animation-delay: 1s; }
.particle:nth-child(5) { left: 50%; top: 30%; animation-duration: 15s; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; top: 70%; animation-duration: 14s; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; top: 50%; animation-duration: 17s; animation-delay: 2s; }
.particle:nth-child(8) { left: 80%; top: 20%; animation-duration: 12s; animation-delay: 4s; }
.particle:nth-child(9) { left: 90%; top: 60%; animation-duration: 16s; animation-delay: 1s; }
.particle:nth-child(10) { left: 15%; top: 85%; animation-duration: 18s; animation-delay: 3s; }

@keyframes particleFloat {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.3;
  }
  25% {
    transform: translate(15px, -30px) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-20px, 40px) scale(0.9);
    opacity: 0.4;
  }
  75% {
    transform: translate(30px, -20px) scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.3;
  }
}

/* ============================================================
   INTERAKTIVNÍ KARTIČKY S VÍCE EFEKTY
   ============================================================ */

.interactive-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 28px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.interactive-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 30%, rgba(232, 165, 212, 0.15), transparent 35%),
              radial-gradient(circle at 70% 70%, rgba(201, 58, 138, 0.1), transparent 40%);
  animation: orbFloat 12s ease-in-out infinite;
  z-index: 0;
}

.interactive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(232, 165, 212, 0.1) 50%, transparent 100%);
  animation: liquidShimmer 4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.interactive-card > * {
  position: relative;
  z-index: 2;
}

.interactive-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(201, 58, 138, 0.25),
              inset 0 0 0 1px rgba(255, 255, 255, 0.2),
              0 0 40px rgba(201, 58, 138, 0.15);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.interactive-card:hover::after {
  opacity: 1;
}

/* ============================================================
   PULSUJÍCÍ TLAČÍTKA S GLOWEM
   ============================================================ */

.pulse-button {
  position: relative;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(201, 58, 138, 0.4), rgba(232, 165, 212, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(201, 58, 138, 0.3);
}

.pulse-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: waveFlow 3s ease-in-out infinite;
  z-index: 1;
}

.pulse-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(232, 165, 212, 0.4), transparent 70%);
  animation: glowPulse 2s ease-in-out infinite;
  z-index: 0;
}

.pulse-button span {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.pulse-button:hover {
  background: linear-gradient(135deg, rgba(201, 58, 138, 0.6), rgba(232, 165, 212, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(201, 58, 138, 0.5),
              inset 0 0 20px rgba(232, 165, 212, 0.2);
}

.pulse-button:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(201, 58, 138, 0.3);
}

/* ============================================================
   VLNÍCÍ SE PODKLADY
   ============================================================ */

.wave-background {
  position: relative;
  background: linear-gradient(135deg, rgba(201, 58, 138, 0.1), rgba(232, 165, 212, 0.08));
  overflow: hidden;
}

.wave-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(232, 165, 212, 0.1) 25%, transparent 50%),
    linear-gradient(90deg, transparent 20%, rgba(201, 58, 138, 0.08) 45%, transparent 70%);
  animation: waveFlow 6s linear infinite;
  pointer-events: none;
}

/* ============================================================
   FLOATING IKONY S ORBEM
   ============================================================ */

.floating-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 28px;
  animation: floatIcon 4s ease-in-out infinite;
}

.floating-icon::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(232, 165, 212, 0.3), transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

/* ============================================================
   TŘPYTIVÉ EFEKTY
   ============================================================ */

.shimmer-text {
  background: linear-gradient(90deg, 
    #fff 0%, 
    rgba(232, 165, 212, 0.6) 25%, 
    rgba(201, 58, 138, 0.6) 50%, 
    rgba(232, 165, 212, 0.6) 75%, 
    #fff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerShift 3s linear infinite;
}

@keyframes shimmerShift {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   RADIÁLNÍ VLNY
   ============================================================ */

.radial-wave {
  position: relative;
}

.radial-wave::before {
  content: "";
  position: absolute;
  inset: 50%;
  width: 100px;
  height: 100px;
  margin: -50px 0 0 -50px;
  border: 1px solid rgba(232, 165, 212, 0.3);
  border-radius: 50%;
  animation: radialsWave 3s ease-out infinite;
  pointer-events: none;
}

@keyframes radialsWave {
  0% {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    opacity: 1;
  }
  100% {
    width: 400px;
    height: 400px;
    margin: -200px 0 0 -200px;
    opacity: 0;
  }
}

/* ============================================================
   ANIMOVANÉ HVĚZDIČKY
   ============================================================ */

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(232, 165, 212, 0.4));
  border-radius: 50%;
  animation: starTwinkle 3s ease-in-out infinite;
}

.star::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(232, 165, 212, 0.6);
  animation: starGlow 2s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes starGlow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(232, 165, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(201, 58, 138, 0.6);
  }
}

/* ============================================================
   ANIMOVANÉ PODKRESLENÍ
   ============================================================ */

.underline-animation {
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

.underline-animation::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(201, 58, 138, 0.8), rgba(232, 165, 212, 0.6));
  animation: underlineExpand 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  box-shadow: 0 0 10px rgba(201, 58, 138, 0.4);
}

@keyframes underlineExpand {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ============================================================
   ROTUJÍCÍ PRVKY
   ============================================================ */

.rotating-element {
  animation: smoothRotate 20s linear infinite;
}

@keyframes smoothRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================================
   OPTIMALIZACE PRO MOBILY
   ============================================================ */

@media (max-width: 768px) {
  .particle {
    width: 2px;
    height: 2px;
    opacity: 0.5 !important;
  }

  .interactive-card {
    padding: 20px;
  }

  .interactive-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .floating-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .pulse-button {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  /* Snížení frekvence animací na mobilu */
  .particle {
    animation-duration: 18s;
  }

  .interactive-card::before {
    animation-duration: 18s;
  }

  .interactive-card::after {
    animation-duration: 6s;
  }

  .floating-icon {
    animation-duration: 6s;
  }

  .pulse-button::after {
    animation-duration: 3s;
  }
}

@media (max-width: 480px) {
  .particle {
    width: 1px;
    height: 1px;
    opacity: 0.3 !important;
  }

  .animated-particles {
    opacity: 0.3;
  }

  .interactive-card {
    padding: 16px;
  }

  .interactive-card:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 10px 20px rgba(201, 58, 138, 0.15) !important;
  }

  .floating-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .pulse-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  /* Vypnutí některých efektů na velmi malých zařízeních */
  .interactive-card::after {
    display: none;
  }

  .pulse-button::before {
    display: none;
  }

  .radial-wave::before {
    display: none;
  }
}

/* ============================================================
   DARK MODE VARIANTA
   ============================================================ */

@media (prefers-color-scheme: dark) {
  .interactive-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .interactive-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .pulse-button {
    background: linear-gradient(135deg, rgba(201, 58, 138, 0.3), rgba(232, 165, 212, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .pulse-button:hover {
    background: linear-gradient(135deg, rgba(201, 58, 138, 0.5), rgba(232, 165, 212, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
}

/* ============================================================
   ACCESSIBILITY - Zajištění čitelnosti
   ============================================================ */

@media (prefers-contrast: more) {
  .interactive-card {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }

  .pulse-button {
    border: 2px solid rgba(201, 58, 138, 0.6);
  }

  .shimmer-text {
    background-color: rgba(201, 58, 138, 0.8);
    -webkit-text-fill-color: white;
  }
}
