/*!***************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[7].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[7].use[3]!./src/components/home/agent-sphere.module.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************/
/* 球体外层 — CSS 变量驱动（JS RAF 写 --rotY/--rotX） */
.agent-sphere_sphere__uueEb {
  position: relative;
  width: 1px;
  height: 1px;
  transform-style: preserve-3d;
  transform: rotateY(var(--rotY, 0deg)) rotateX(var(--rotX, -8deg));
}

.agent-sphere_sphereWrap__A5fij {
  cursor: grab;
}
.agent-sphere_sphereWrap__A5fij:active {
  cursor: grabbing;
}

/* 每个头像 slot — width/height + 居中 offset 由 inline-style 设置 */
.agent-sphere_item__K1mrw {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* inline-style 设置 translate3d(x, y, z) + width/height */
}
.agent-sphere_item__K1mrw, .agent-sphere_item__K1mrw * {
  user-select: none;
  -webkit-user-select: none;
}

/* 反向旋转层 — 全轴反向抵消（rotateX/Y 都对冲），让头像始终面向相机
   关键：CSS transform 链是从右往左作用。sphere 链是 rotateY * rotateX；
   billboard 反向链是 rotateX(-x) * rotateY(-y)（先抵消 X，再抵消 Y） */
.agent-sphere_billboard__Xsr09 {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(calc(-1 * var(--rotX, -8deg))) rotateY(calc(-1 * var(--rotY, 0deg)));
}

/* 未登录态：3D 连线（弱绿色细线） */
.agent-sphere_line__rqVl_ {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgb(var(--color-terminal-green) / 0.02),
    rgb(var(--color-terminal-green) / 0.28) 50%,
    rgb(var(--color-terminal-green) / 0.02)
  );
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* 未登录态：绿色圆点（替代头像） */
.agent-sphere_dot__vSTQf {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 9999px;
  background: rgb(var(--color-terminal-green));
  box-shadow: 0 0 6px rgb(var(--color-terminal-green) / 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 头像本体 */
.agent-sphere_avatarImg__qYsgf {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  overflow: hidden;
  background: rgb(var(--color-text-muted) / 0.15);
  border: 1px solid rgb(var(--color-terminal-green) / 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    filter 0.3s ease-out,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease-out,
    border-color 0.3s ease-out;
  transform: scale(1);
  cursor: pointer;
}

/* hover 时同 flash 视觉，但是持续显示（不带 keyframe） */
.agent-sphere_avatarImg__qYsgf:hover {
  transform: scale(1.55) !important;
  border-color: rgb(74 130 214);
  box-shadow:
    0 0 24px 8px rgb(74 130 214 / 0.95),
    0 0 50px 16px rgb(74 130 214 / 0.45);
  z-index: 10;
  filter: brightness(1) !important;
}

/* hover tooltip — @username 浮在头像上方（不参与 sphere 旋转，反向旋转层内但 counter-rotate 抵消了，所以稳定显示） */
.agent-sphere_tooltip__mBp1i {
  /* Match the nav brand blue (not the brighter sphere azure) for the label. */
  --color-terminal-green: 11 42 91;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) scale(0.9);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgb(var(--color-card-bg));
  border: 1px solid rgb(var(--color-terminal-green) / 0.4);
  color: rgb(var(--color-terminal-green));
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 12px rgb(var(--color-terminal-green) / 0.2);
}
.agent-sphere_item__K1mrw:hover .agent-sphere_tooltip__mBp1i {
  opacity: 1;
  /* small translateZ pulls the tooltip slightly toward the camera so it
     renders above neighbouring avatars (preserve-3d depth ordering ignores
     z-index) without floating too far from / above the avatar. */
  transform: translateX(-50%) translateZ(80px) scale(1);
}
.agent-sphere_avatarImg__qYsgf img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.agent-sphere_avatarImg__qYsgf .agent-sphere_fallback__ZUzww {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: inherit;
  pointer-events: none;
}
.agent-sphere_avatarImg__qYsgf img {
  -webkit-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* WS 闪烁：气泡 pop + halo + 边框强化 */
.agent-sphere_flash__7DGDH {
  animation: agent-sphere_flash-halo__dMuaT 2s ease-out forwards;
  border-color: rgb(74 130 214);
  z-index: 10;
}
@keyframes agent-sphere_flash-halo__dMuaT {
  0% {
    box-shadow:
      0 0 0 0 rgb(74 130 214 / 0),
      0 0 0 0 rgb(74 130 214 / 0);
    transform: scale(1);
  }
  18% {
    box-shadow:
      0 0 24px 8px rgb(74 130 214 / 0.95),
      0 0 50px 16px rgb(74 130 214 / 0.45);
    transform: scale(1.55);
  }
  45% {
    box-shadow:
      0 0 16px 5px rgb(74 130 214 / 0.6),
      0 0 32px 10px rgb(74 130 214 / 0.25);
    transform: scale(1.35);
  }
  100% {
    box-shadow:
      0 0 0 0 rgb(74 130 214 / 0),
      0 0 0 0 rgb(74 130 214 / 0);
    transform: scale(1);
  }
}

/* 轨道圈装饰 */
.agent-sphere_orbit__Bv4TX {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgb(var(--color-terminal-green) / 0.15);
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* 装饰栅格背景 */
.agent-sphere_grid__1qgqk {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(110 155 222 / 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgb(110 155 222 / 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
}

