/* Floating hint that points users to the benchmark results further down the
   page. Shared by the chat and arena pages; hidden until the benchmark block
   is still below the fold. */

.qx-scroll-hint {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel, #0d0a08);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease, bottom 0.2s ease;
}

.qx-scroll-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  /* Gentle bob so the hint reads as an invitation rather than furniture. */
  animation: qxScrollHintFloat 2.8s ease-in-out infinite;
}

/* Sweep of light across the pill, drawing the eye back every few seconds. */
.qx-scroll-hint::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 138, 0, 0.28) 50%, transparent 65%);
  opacity: 0;
  pointer-events: none;
}

.qx-scroll-hint.is-visible::before {
  animation: qxScrollHintSheen 3.6s ease-in-out infinite;
}

/* Hover feedback avoids `transform` on the pill itself: the float animation
   owns that property and would override it. Scale the dot instead. */
.qx-scroll-hint:hover {
  border-color: var(--orange);
  box-shadow: 0 14px 34px rgba(255, 77, 0, 0.28);
  animation-play-state: paused;
}

.qx-scroll-hint:hover .qx-scroll-hint-dot {
  transform: scale(1.12);
}

.qx-scroll-hint:active .qx-scroll-hint-dot {
  transform: scale(0.94);
}

.qx-scroll-hint:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.qx-scroll-hint-text {
  white-space: nowrap;
}

.qx-scroll-hint-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--orange), var(--orange-2, #ff8a00));
  color: #15110a;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

/* Pulse ring that draws the eye without moving layout. */
.qx-scroll-hint-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: qxScrollHintPulse 2s ease-out infinite;
}

.qx-scroll-hint-dot svg {
  width: 16px;
  height: 16px;
  display: block;
  animation: qxScrollHintBounce 1.6s ease-in-out infinite;
}

@keyframes qxScrollHintPulse {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  70% {
    opacity: 0;
    transform: scale(1.75);
  }
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

@keyframes qxScrollHintBounce {
  0%, 100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes qxScrollHintFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes qxScrollHintSheen {
  0%, 55% {
    opacity: 0;
    transform: translateX(-120%);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@media (max-width: 640px) {
  .qx-scroll-hint {
    right: 14px;
    bottom: 16px;
    padding: 6px;
  }
  .qx-scroll-hint-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qx-scroll-hint-dot::after,
  .qx-scroll-hint-dot svg,
  .qx-scroll-hint.is-visible,
  .qx-scroll-hint.is-visible::before {
    animation: none;
  }
  .qx-scroll-hint {
    transition: opacity 0.2s ease;
    transform: none;
  }
}
