/* ═══════════════════════════════════════════════════════════
   animaciones.css — Keyframes globales de Ean Elemental
   Optimizado para Safari iOS: sin animaciones continuas en móvil
═══════════════════════════════════════════════════════════ */

@keyframes girar-borde {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulso-hud {
  0%   { box-shadow: 0 0 8px rgba(34,211,238,0.3); }
  50%  { box-shadow: 0 0 20px rgba(34,211,238,0.7); }
  100% { box-shadow: 0 0 8px rgba(34,211,238,0.3); }
}

@keyframes ficha-aparece {
  0%   { opacity: 0; transform: scale(0.88) translateY(24px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ficha-aparece-mobile {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes rebote-nivel {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes deslizar-abajo {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes hex-aparece {
  0%   { opacity: 0; transform: translateZ(0) scale(0.75); }
  80%  { opacity: 1; transform: translateZ(0) scale(1.04); }
  100% { opacity: 1; transform: translateZ(0) scale(1); }
}

@keyframes hex-aparece-mobile {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes estrella-brilla {
  0%   { opacity: 0; transform: scale(0.5) rotate(-20deg); }
  60%  { opacity: 1; transform: scale(1.15) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes score-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes neon-pulse {
  0%   { box-shadow: 0 0 6px rgba(34,211,238,0.4),  0 0 18px rgba(34,211,238,0.2); }
  50%  { box-shadow: 0 0 14px rgba(34,211,238,0.8), 0 0 32px rgba(34,211,238,0.4); }
  100% { box-shadow: 0 0 6px rgba(34,211,238,0.4),  0 0 18px rgba(34,211,238,0.2); }
}

@keyframes rgb-cycle {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes rgb-border {
  0%   { border-color: #ff0080; }
  16%  { border-color: #ff8c00; }
  33%  { border-color: #ffff00; }
  50%  { border-color: #00ff88; }
  66%  { border-color: #00cfff; }
  83%  { border-color: #a855f7; }
  100% { border-color: #ff0080; }
}

@keyframes leyenda-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* Shimmer carta: solo PC */
@media (hover: hover) and (pointer: fine) {
  .carta__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      105deg,
      transparent 40%,
      rgba(255,255,255,0.04) 50%,
      transparent 60%
    );
    background-size: 200% 100%;
    animation: shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
  }
}

/* ── Optimizaciones móvil / Safari iOS ──────────────────── */
@media (hover: none) {
  .hex {
    animation-name: hex-aparece-mobile !important;
    animation-duration: 0.2s !important;
    animation-delay: 0ms !important;
  }
  .ficha-contenedor {
    animation-name: ficha-aparece-mobile !important;
    animation-duration: 0.2s !important;
  }
  .carta::before        { animation: none !important; }
  .carta__visual::after { display: none !important; }
  .estrella {
    animation-duration: 0.1s !important;
    animation-delay: 0ms !important;
  }
}

/* ── Reducción de movimiento ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}