/* ==========================================================================
   GK TANK · ANIMAÇÕES E REALCES DE PINTURA CRISTAL & OURO (SEM PISCAR)
   100% compatível com docs/UI-SEM-PISCAR.md:
   - Apenas propriedades de pintura em loop (background-position, box-shadow)
   - Entrada única com animation-fill-mode: backwards (apenas opacity)
   - Zero transform/filter/backdrop-filter/mix-blend-mode em hover ou loop
   ========================================================================== */

/* 1. Entrada suave das telas e janelas (apenas opacity + backwards) */
@keyframes cr-screen-enter {
  from {
    opacity: 0;
  }
}

body #conteudo > section,
body #conteudo > div,
body #conteudo .cr-window,
body #conteudo .player-heading,
body #conteudo .player-quicknav,
body #conteudo .player-main-grid,
body #conteudo .recharge-hero,
body #conteudo .recharge-steps,
body #conteudo .recharge-page .layout,
body #conteudo .portal-service-hero,
body #conteudo .help-access {
  animation: cr-screen-enter 240ms ease-out backwards;
}

/* 2. Realce de chegada ao navegar por âncora (#cidade, #arsenal, #novidades, #conversas) */
@keyframes cr-arrive-paint {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 214, 102, 0.72), var(--cr-shadow-panel);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 214, 102, 0.45), var(--cr-shadow-panel);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 214, 102, 0), var(--cr-shadow-panel);
  }
}

.cr-arrive {
  animation: cr-arrive-paint 1.5s ease-out backwards;
}

/* 3. Reflexo dourado contínuo nos frisos superiores dos cabeçalhos (apenas background-position) */
@keyframes cr-gold-sheen {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

body #conteudo .player-heading::before,
body #conteudo .recharge-hero::before,
body #conteudo .portal-service-hero::before {
  background: linear-gradient(
    90deg,
    rgba(242, 190, 84, 0.12) 0%,
    rgba(242, 190, 84, 0.65) 35%,
    rgba(255, 246, 208, 0.98) 50%,
    rgba(242, 190, 84, 0.65) 65%,
    rgba(242, 190, 84, 0.12) 100%
  ) !important;
  background-size: 220% 100% !important;
  animation: cr-gold-sheen 7.5s linear infinite;
}

/* 4. Pulso de aura dourada nos botões principais de ação (apenas box-shadow) */
@keyframes cr-cta-pulse {
  0%, 100% {
    box-shadow:
      inset 0 2px 0 #fff9d2,
      inset 0 -3px 0 #8a4b08,
      0 6px 16px rgba(6, 15, 34, 0.45),
      0 0 0 0 rgba(255, 210, 86, 0);
  }
  50% {
    box-shadow:
      inset 0 2px 0 #fff9d2,
      inset 0 -3px 0 #8a4b08,
      0 6px 20px rgba(242, 180, 50, 0.42),
      0 0 16px 2px rgba(255, 210, 86, 0.32);
  }
}

body #conteudo .cr-btn-gold,
body #conteudo .player-realm-card .btn-primary,
body #conteudo .player-auth-card .btn-primary,
body #conteudo .recharge-page .summary .btn-primary {
  animation: cr-cta-pulse 3.8s ease-in-out infinite;
}

/* 5. Pulso nos indicadores "Online agora" e pontos do mapa (apenas box-shadow) */
@keyframes cr-online-beacon {
  0%, 100% {
    box-shadow: 0 0 8px rgba(56, 239, 125, 0.65), 0 0 0 0 rgba(56, 239, 125, 0.45);
  }
  50% {
    box-shadow: 0 0 12px rgba(56, 239, 125, 0.95), 0 0 0 5px rgba(56, 239, 125, 0);
  }
}

body #conteudo .sq-green,
body #conteudo .player-status.is-online::before {
  animation: cr-online-beacon 2.8s ease-in-out infinite;
}

@keyframes cr-pin-beacon {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(255, 214, 102, 0.26), 0 2px 8px rgba(0, 0, 0, 0.65);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 214, 102, 0.46), 0 0 14px rgba(255, 214, 102, 0.65);
  }
}

body #conteudo .cr-pin-dot {
  animation: cr-pin-beacon 3.2s ease-in-out infinite;
}

/* 6. Transições seguras de pintura (neutraliza transition: all / transform de folhas antigas) */
body #topbar a,
body #topbar button,
body #conteudo a,
body #conteudo button,
body #conteudo .cr-card,
body #conteudo .cr-news-card,
body #conteudo .cr-Step-card,
body #conteudo .player-quicknav a,
body #conteudo .player-realm-card,
body #conteudo .recharge-page .pkg,
body #conteudo .support-thread-item,
body #conteudo .support-filter,
body #conteudo .help-channels a {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease !important;
}

body #topbar a:hover,
body #topbar button:hover,
body #topbar a:active,
body #topbar button:active,
body #conteudo a:hover,
body #conteudo button:hover,
body #conteudo a:active,
body #conteudo button:active,
body #conteudo .pkg:hover,
body #conteudo .player-quicknav a:hover,
body #conteudo .player-realm-card:hover,
body #conteudo .cr-news-card:hover {
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
