/* Navegação com reflexo de vidro e cores legíveis sobre o degradê. */
body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0 !important;
  background: linear-gradient(115deg, #a04450, #90506d 48%, #51417f) !important;
  background-size: 180% 180% !important;
  color: #fffaf9 !important;
  text-shadow: 0 1px 2px #34233b80;
  box-shadow: inset 0 1px 2px #ffffff55, inset 0 -4px 12px #30213c24, 0 5px 14px #6b40622b !important;
  animation: crystal-button-color 9s ease-in-out infinite !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  background: linear-gradient(115deg, transparent 30%, #ffffff08 41%, #ffffff14 49%, #ffffff08 57%, transparent 68%) !important;
  box-shadow: inset 0 12px 18px -14px #ffffffb0 !important;
  transform: translateX(-130%);
  animation: crystal-button-glint 6s ease-in-out infinite;
}

body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a):hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 2px #ffffff66, 0 8px 20px #6b40624a !important;
}

body :is(.site-header .site-primary-nav a[aria-current="page"], .magic-tabs a[aria-current="page"]) {
  outline: none;
  box-shadow: inset 0 2px 8px #ffffff45, 0 5px 16px #70466b55 !important;
}

/* A aba ativa também precisa manter o contraste do texto e do fundo. */
body .app-main .magic-tabs a[aria-current="page"] {
  color: #fff !important;
  background: linear-gradient(115deg, #a04450, #90506d 48%, #51417f) !important;
  background-size: 180% 180% !important;
}

body .app-main .magic-tabs a[aria-current="page"] :is(span, svg) {
  color: inherit !important;
}

body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a):focus-visible {
  outline: 3px solid #46366f;
  outline-offset: 3px;
}

body .site-header .site-primary-nav a span,
body .site-header .site-menu-button span { color: inherit !important; }

@keyframes crystal-button-color {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes crystal-button-glint {
  0%, 28% { transform: translateX(-130%); }
  55%, 100% { transform: translateX(130%); }
}

@media (prefers-reduced-motion: reduce) {
  body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a) {
    animation: none !important;
    transition: none !important;
  }
  body :is(.site-header .site-primary-nav a, .site-header .site-account, .site-header .site-menu-button, .magic-tabs a)::before {
    animation: none;
    transform: none;
    opacity: .35;
  }
}
