/* ═══════════════════════════════════════════════════════════
   Limooi UI 增强层
   ───────────────────────────────────────────────────────────
   1. 侧栏导航分组折叠（把 15 项压成 5 组）
   2. 星标光标 + 粒子拖尾
   3. 交互反馈细节
   完全不修改原站 DOM 结构，只在加载后重排与叠加。
   ═══════════════════════════════════════════════════════════ */

/* ── 自定义光标：隐藏系统光标 ── */
/* 自定义光标已停用，使用系统光标 */

/* 输入类元素保留系统光标，避免无法定位输入点 */
body.ll-cursor input,
body.ll-cursor textarea,
body.ll-cursor select,
body.ll-cursor [contenteditable="true"],
body.ll-cursor input[type="text"],
body.ll-cursor input[type="password"],
body.ll-cursor input[type="email"],
body.ll-cursor input[type="number"] {
  cursor: text !important;
}
body.ll-cursor select { cursor: pointer !important; }

/* ── 星标光标 ── */
#ll-star {
  position: fixed;
  left: 0; top: 0;
  width: 18px; height: 18px;
  pointer-events: none;
  z-index: 2147483647;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity .2s;
}
#ll-star svg {
  width: 100%; height: 100%;
  transform-origin: 18% 11%;
  opacity: .92;
  filter: drop-shadow(0 0 6px rgba(201,255,93,.85))
          drop-shadow(0 0 14px rgba(201,255,93,.45));
  transition: transform .18s cubic-bezier(.2,.7,.4,1);
}
#ll-star.big svg { transform: scale(1.2) rotate(-6deg); opacity: 1; }
#ll-star.click svg { transform: scale(.85) rotate(-2deg); }

/* 星标外圈脉冲 */
#ll-star::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(201,255,93,.22);
  opacity: 0;
  animation: ll-ring 2.4s ease-out infinite;
}
@keyframes ll-ring {
  0%   { transform: scale(.5); opacity: .7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── 粒子画布 ── */
#ll-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483646;
}

/* ═══ 侧栏改版 ═══════════════════════════════════════════════ */

/* 给导航留出呼吸感 */
.sidebar .nav-list {
  gap: 4px !important;
  padding-top: 4px;
}

/* 分组容器 */
.ll-group {
  margin-bottom: 6px;
}

/* 分组标题 */
.ll-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b8b85;
  cursor: pointer;
  user-select: none;
  transition: color .16s;
  border-radius: 8px;
}
.ll-group-head:hover { color: #c9ff5d; }

.ll-group-head .ll-ico {
  width: 15px;
  font-size: 12px;
  opacity: .8;
  text-align: center;
}

.ll-group-head .ll-arrow {
  margin-left: auto;
  font-size: 9px;
  opacity: .55;
  transition: transform .22s cubic-bezier(.2,.7,.4,1);
}

.ll-group.collapsed .ll-group-head .ll-arrow {
  transform: rotate(-90deg);
}

/* 折叠体 */
.ll-group-body {
  overflow: hidden;
  max-height: 800px;
  opacity: 1;
  transition: max-height .28s cubic-bezier(.2,.7,.4,1),
              opacity .2s ease,
              margin .2s ease;
}
.ll-group.collapsed .ll-group-body {
  max-height: 0;
  opacity: 0;
}

/* 组内导航项：去掉原来的大间距 */
.ll-group-body .nav-item {
  margin: 1px 0 !important;
  padding-left: 30px !important;
  position: relative;
}

/* 左侧细线，标识分组从属关系 */
.ll-group-body .nav-item::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
  transform: translateY(-50%);
  transition: all .18s;
}
.ll-group-body .nav-item:hover::before,
.ll-group-body .nav-item.active::before {
  opacity: 1;
  background: #c9ff5d;
  width: 3px; height: 10px;
  border-radius: 2px;
}

/* 当前项高亮：加一条左侧亮线 */
.ll-group-body .nav-item.active {
  background: rgba(201,255,93,.09) !important;
}

/* 隐藏原来散落的分组标题（已被 ll-group-head 取代） */
.ll-hidden-section { display: none !important; }

/* 角标微调 */
.ll-group-body .nav-item em {
  margin-left: auto;
  font-size: 10.5px;
  font-style: normal;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: #c9ff5d;
  color: #0a0908;
  font-weight: 700;
}

/* ── 交互增强：导航项悬停 ── */
.nav-item {
  transition: background .16s, color .16s, transform .16s !important;
}
.nav-item:hover {
  transform: translateX(2px);
}

/* ── 按钮按压缩放 ── */
button:active:not(:disabled),
.nav-item:active {
  transform: scale(.985);
}

/* ── 卡片悬停微抬升 ── */
.model-card:hover,
.surface-card:hover,
.asset-card:hover {
  transform: translateY(-2px);
  transition: transform .2s cubic-bezier(.2,.7,.4,1), box-shadow .2s;
}

/* ── 滚动条美化 ── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(201,255,93,.18);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(201,255,93,.38);
  background-clip: content-box;
}

/* ── 减少动效偏好 ── */
@media (prefers-reduced-motion: reduce) {
  #ll-star, #ll-particles { display: none !important; }
  body.ll-cursor, body.ll-cursor * { cursor: auto !important; }
  .ll-group-body { transition: none; }
}
