.topbar-main .ai-launcher {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  margin: 0 5px 0 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
}

.topbar-main .ai-launcher-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(155deg, #d893d9 0%, #a783ed 32%, #865bfa 64%, #5269ff 100%);
}

.topbar-main .ai-launcher-orb::before {
  content: '';
  position: absolute;
  inset: -25%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 24% 58%, rgba(55, 192, 255, .65), transparent 55%);
  animation: ai-launcher-color-flow 5.2s linear infinite;
}

.topbar-main .ai-launcher-symbol {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  transform-origin: 50% 50%;
  animation: ai-launcher-star-flip 2.6s cubic-bezier(.42, 0, .25, 1) infinite;
}

.topbar-main .ai-launcher-symbol > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2.6px;
  margin: -1.3px 0 0 -8.5px;
  border-radius: 3px;
  background: #fff;
  transform-origin: 8.5px 1.3px;
}

.topbar-main .ai-launcher-symbol > i:nth-child(2) {
  width: 17px;
  margin-left: -10.5px;
  transform-origin: 10.5px 1.3px;
  transform: rotate(110deg);
}

.topbar-main .ai-launcher-symbol > i:nth-child(3) {
  width: 13px;
  margin-left: -5.5px;
  transform-origin: 5.5px 1.3px;
  transform: rotate(55deg);
}

.topbar-main .ai-launcher-tooltip {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 50%;
  padding: 5px 9px;
  border: 1px solid rgba(55, 36, 40, .1);
  border-radius: 5px;
  background: rgba(45, 30, 34, .94);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(40, 20, 24, .16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity .16s ease, transform .16s ease;
}

.topbar-main .ai-launcher-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(55, 36, 40, .1);
  border-left: 1px solid rgba(55, 36, 40, .1);
  background: rgba(45, 30, 34, .94);
  transform: translateX(-50%) rotate(45deg);
}

.topbar-main .ai-launcher:hover .ai-launcher-tooltip,
.topbar-main .ai-launcher:focus-visible .ai-launcher-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.topbar-main .ai-launcher:hover .ai-launcher-orb {
  box-shadow: 0 0 0 3px rgba(122, 104, 231, .1);
}

.topbar-main .ai-launcher:focus-visible {
  outline: 2px solid var(--ui-primary);
  outline-offset: 4px;
}

@keyframes ai-launcher-color-flow {
  to { transform: rotate(360deg); }
}

@keyframes ai-launcher-star-flip {
  0%, 24% { transform: rotate(0deg) rotateY(0deg); }
  40% { transform: rotate(-30deg) rotateY(30deg); }
  64% { transform: rotate(150deg) rotateY(180deg); }
  82%, 100% { transform: rotate(360deg) rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .topbar-main .ai-launcher-orb::before,
  .topbar-main .ai-launcher-symbol { animation: none; }
}

@media (max-width: 820px) {
  .topbar-main .ai-launcher {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    margin: 0 2px;
  }
}
