/* V36.4 — Linha de comandos: todos os controles do topo seguem o botão Surpresa. */
:root {
  --xtor-nav-ice: #edfaff;
  --xtor-nav-cyan: #55dfff;
  --xtor-nav-blue: #087cbc;
  --xtor-nav-deep: #031527;
  --xtor-nav-gold: #eeb065;
}

.topbar {
  grid-template-columns: 188px auto auto minmax(0, 1fr);
  justify-content: start;
  gap: clamp(14px, 1.8vw, 28px);
}

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, .9vw, 13px);
}

/* A cápsula, a tipografia e a profundidade são as mesmas em todos os comandos. */
.topbar #primary-navigation a,
.topbar__surprise,
.topbar .search > button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(67, 219, 255, .62);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 87, 124, .38) 0%, rgba(6, 34, 57, .78) 48%, rgba(2, 14, 29, .96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(229, 252, 255, .25),
    inset 0 -11px 17px rgba(0, 6, 16, .42),
    0 7px 15px rgba(0, 0, 0, .28),
    0 0 12px rgba(39, 201, 247, .13);
  color: var(--xtor-nav-ice) !important;
  -webkit-text-fill-color: var(--xtor-nav-ice) !important;
  -webkit-text-stroke: 0 !important;
  font-family: var(--xtor-wordmark-font) !important;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 900 !important;
  letter-spacing: .015em;
  line-height: 1;
  text-rendering: geometricPrecision;
  text-shadow:
    0 1px 0 rgba(5, 77, 111, .96),
    0 2px 0 rgba(1, 20, 36, .95),
    0 0 7px rgba(77, 220, 255, .32) !important;
  transform: perspective(320px) rotateX(4deg) translateZ(0);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.topbar #primary-navigation a {
  min-width: 78px;
  padding: 0 clamp(12px, 1.05vw, 17px);
}

.topbar__surprise {
  padding: 0 16px;
}

.topbar .search {
  min-height: 42px;
}

.topbar .search > button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 21px;
  font-weight: 900;
}

.topbar #primary-navigation a::before,
.topbar__surprise::before,
.topbar .search > button::before {
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255, 255, 255, .16), transparent 28%, transparent 72%, rgba(238, 176, 101, .14));
  content: "";
  pointer-events: none;
}

.topbar #primary-navigation a::after {
  right: 16%;
  bottom: 5px;
  left: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--xtor-nav-cyan) 30%, var(--xtor-nav-gold) 70%, transparent);
  box-shadow: 0 0 8px rgba(80, 223, 255, .7);
}

.topbar #primary-navigation a:hover,
.topbar #primary-navigation a:focus-visible,
.topbar #primary-navigation a.is-active,
.topbar__surprise:hover,
.topbar__surprise:focus-visible,
.topbar .search > button:hover,
.topbar .search > button:focus-visible {
  border-color: rgba(150, 241, 255, .94);
  background:
    linear-gradient(180deg, rgba(45, 139, 182, .58) 0%, rgba(8, 59, 94, .88) 48%, rgba(3, 19, 36, .98) 100%);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(241, 254, 255, .38),
    inset 0 -12px 20px rgba(0, 13, 29, .45),
    0 10px 20px rgba(0, 0, 0, .32),
    0 0 19px rgba(49, 211, 255, .31);
  outline: none;
  text-shadow:
    0 1px 0 rgba(8, 88, 128, 1),
    0 2px 0 rgba(1, 23, 39, .96),
    0 0 9px rgba(137, 238, 255, .58) !important;
  transform: perspective(320px) rotateX(2deg) translate3d(0, -2px, 8px);
}

.topbar #primary-navigation a:hover::after,
.topbar #primary-navigation a:focus-visible::after,
.topbar #primary-navigation a.is-active::after {
  transform: scaleX(1);
}

.topbar__tools {
  margin-left: 0;
  gap: 9px;
}

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 142px auto auto minmax(0, 1fr); gap: 13px; }
  .topbar nav { gap: 7px; }
  .topbar #primary-navigation a { min-width: 0; padding: 0 12px; }
  .topbar__surprise { padding: 0 13px; }
}

@media (max-width: 850px) {
  .topbar { grid-template-columns: 102px auto auto minmax(0, 1fr); gap: 9px; }
  .topbar #primary-navigation a,
  .topbar__surprise,
  .topbar .search > button {
    min-height: 38px;
    font-size: 11px;
  }
  .topbar .search,
  .topbar .search > button { min-height: 38px; }
  .topbar .search > button { width: 38px; min-width: 38px; font-size: 18px; }
  .topbar #primary-navigation a { padding: 0 10px; }
  .topbar__surprise { padding: 0 11px; }
}

@media (max-width: 720px) {
  .topbar nav {
    display: none;
    gap: 8px;
    padding: 11px;
  }
  .topbar nav.is-open { display: flex; }
  .topbar #primary-navigation a {
    justify-content: flex-start;
    min-height: 43px;
    padding: 0 14px;
  }
  .topbar .search > button,
  .topbar__surprise {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
  }
  .topbar__surprise span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar #primary-navigation a,
  .topbar__surprise,
  .topbar .search > button { transition: none; }
}
