:root {
  --bg0: #07060d;
  --bg1: #0b0717;
  --panel: rgba(16, 14, 26, 0.7);
  --panel2: rgba(16, 14, 26, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.6);
  --muted2: rgba(255, 255, 255, 0.42);
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --danger: #ef4444;
  --radius: 18px;
  --starlink-avatar-size: 40px;
  --starlink-loading-offset: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 50% -120px, rgba(139, 92, 246, 0.35), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(99, 102, 241, 0.22), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  transition: grid-template-columns 0.3s ease;
}

.app.left-collapsed {
  grid-template-columns: 0 1fr 320px;
}

.app.right-collapsed {
  grid-template-columns: 280px 1fr 0;
}

.app.both-collapsed {
  grid-template-columns: 0 1fr 0;
}

/* 侧边面板 */
.left-panel,
.right-panel {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.left-panel {
  border-right: 1px solid var(--border);
}

.right-panel {
  border-left: 1px solid var(--border);
}

.app.left-collapsed .left-panel {
  width: 0;
  opacity: 0;
  border: none;
}

.app.right-collapsed .right-panel {
  width: 0;
  opacity: 0;
  border: none;
}

.panel-toggle {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 80px;
  background: rgba(16, 14, 26, 0.95);
  border: 2px solid var(--accent);
  color: var(--text);
  cursor: pointer;
  z-index: 1000;
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: opacity 0.5s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.panel-toggle.auto-dimmed {
  opacity: 0.25;
}

.panel-toggle:hover,
.panel-toggle:active {
  opacity: 1 !important;
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--accent2);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.7);
  transform: translateY(-50%) scale(1.05);
}

.toggle-icon {
  transition: transform 0.3s ease;
  display: inline-block;
  font-weight: bold;
  color: var(--accent2);
}

.left-toggle {
  left: 280px;
  border-radius: 0 12px 12px 0;
}

.left-toggle .toggle-icon {
  display: block;
}

.right-toggle {
  right: 320px;
  border-radius: 12px 0 0 12px;
}

.right-toggle .toggle-icon {
  display: block;
}

/* 收起状态下的展开按钮 - 左侧 */
.app.left-collapsed .left-panel {
  width: 0;
  pointer-events: none;
  overflow: visible;
  background: transparent;
  border: none;
}

.app.left-collapsed .left-panel .panel-content {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.app.left-collapsed .left-toggle {
  left: 0;
  animation: togglePulse 2s ease-in-out infinite;
}

.app.left-collapsed .left-toggle .toggle-icon {
  transform: rotate(180deg);
}

.app.left-collapsed .left-toggle:hover {
  animation: none;
}

/* 收起状态下的展开按钮 - 右侧 */
.app.right-collapsed .right-panel {
  width: 0;
  pointer-events: none;
  overflow: visible;
  background: transparent;
  border: none;
}

.app.right-collapsed .right-panel .panel-content {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.app.right-collapsed .right-toggle {
  right: 0;
  animation: togglePulse 2s ease-in-out infinite;
}

.app.right-collapsed .right-toggle .toggle-icon {
  transform: rotate(180deg);
}

.app.right-collapsed .right-toggle:hover {
  animation: none;
}



.panel-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
}

.panel-header h3 {
  color: var(--accent2);
  font-size: 18px;
  font-weight: 800;
  flex: 1;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-icon__glyph {
  display: inline-block;
  line-height: 1;
}

.btn-icon:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
}

.btn-icon.is-refreshing {
  position: relative;
}

@keyframes starlinkRefreshSpin {
  0% {
    transform: scale(1);
    opacity: 0.78;
    filter: drop-shadow(0 0 0 rgba(139, 92, 246, 0));
  }

  50% {
    transform: scale(1.16);
    opacity: 1;
    filter: drop-shadow(0 0 7px rgba(139, 92, 246, 0.6));
  }

  100% {
    transform: scale(1);
    opacity: 0.78;
    filter: drop-shadow(0 0 0 rgba(139, 92, 246, 0));
  }
}

.btn-icon.is-refreshing::after {
  content: none;
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  animation: starlinkRefreshSpin 0.9s linear infinite;
  pointer-events: none;
}

.btn-icon.is-refreshing .btn-icon__glyph {
  animation: starlinkRefreshSpin 1.1s ease-in-out infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

/* 网络统计 */
.network-stats {
  background: var(--panel2);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 10px;
}

.network-stats h4 {
  color: var(--accent2);
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.user-avatar-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  border-color: var(--accent2);
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-value {
  color: var(--accent2);
  font-weight: 800;
  font-size: 18px;
}

/* 用户搜索 */
.search-section {
  background: var(--panel2);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.search-section h4 {
  color: var(--accent2);
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active,
.search-input:autofill,
.search-input:-moz-autofill {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.25) inset !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.25) inset !important;
  background-color: rgba(0, 0, 0, 0.25) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active,
.search-input:autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.25) inset, 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.25) inset, 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  border-color: var(--accent) !important;
}

.btn-search {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(139, 92, 246, 0.2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
  align-self: center;
  width: min(220px, 70%);
}

.btn-search:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.search-results-list .search-result-item {
  flex: 0 0 auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.search-result-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.search-result-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.search-result-item.disabled:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--border);
}

.search-result-item.selected {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
}

.search-result-check {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: transparent;
  transition: all 0.2s ease;
}

.search-result-item.selected .search-result-check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.search-result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: contain;
  object-position: center;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: 14px;
  color: var(--muted2);
  margin-bottom: 2px;
}

.search-result-status {
  font-size: 14px;
  color: var(--muted);
}

.search-result-status.is-online {
  color: #facc15;
}

mark.search-highlight {
  background: rgba(139, 92, 246, 0.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

.btn-add-friend {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add-friend:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: scale(1.05);
}

.btn-add-friend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 搜索操作按钮 */
.search-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-view-selected {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-view-selected:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.5));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-view-selected:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 添加好友按钮 */
.starlink-super-section {
  padding: 15px;
  margin-top: auto;
}

.btn-starlink-super {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
  border: 2px solid var(--accent);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-starlink-super:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-starlink-super:active:not(:disabled) {
  transform: translateY(0);
}

.btn-starlink-super:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
}

.starlink-icon {
  font-size: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.starlink-text {
  letter-spacing: 0.5px;
}



/* 中间网络画布 */
.network-canvas {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.network-canvas::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../../../ui/boltweb/images/boltWEB3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

#networkCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.starlink-loading-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(var(--starlink-loading-offset));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 200;
}

body.starlink-loading .starlink-loading-hint {
  opacity: 1;
}

.starlink-loading-spinner {
  width: calc(var(--starlink-avatar-size) + 44px);
  height: calc(var(--starlink-avatar-size) + 44px);
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-right-color: rgba(167, 139, 250, 0.55);
  animation: starlinkCoreSpin 0.9s linear infinite;
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.5));
}

.starlink-loading-text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(167, 139, 250, 0.95);
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
}

@keyframes starlinkCoreSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.network-canvas-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 12, 20, 0.55);
  border: 1px solid rgba(139, 92, 246, 0.35);
  backdrop-filter: blur(10px);
  z-index: 300;
  pointer-events: auto;
}

.netctrl-btn {
  height: 34px;
  min-width: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.netctrl-btn:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.55);
  transform: translateY(-1px);
}

.netctrl-btn:active {
  transform: translateY(0);
}

.netctrl-btn.netctrl-wide {
  min-width: 64px;
}

.netctrl-scale {
  min-width: 56px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 6px;
}

/* 好友请求角标 */
.starlink-notify-bubbles {
  position: fixed;
  top: 20px;
  right: 360px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.friend-request-badge {
  position: relative;
  background: var(--danger);
  color: white;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-request-badge::before {
  content: '🔔';
  font-size: 16px;
}

.friend-request-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.7);
}

.incoming-transfer-badge {
  position: relative;
  background: var(--accent);
  color: white;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.45);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.incoming-transfer-badge::before {
  content: '📥';
  font-size: 16px;
}

.incoming-transfer-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.65);
}

/* 用户节点样式 */
.user-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.user-node:hover {
  z-index: 20;
}

.user-node:hover .user-node-avatar {
  transform: none;
}

.user-node-avatar-wrap {
  position: relative;
  width: var(--starlink-avatar-size);
  height: var(--starlink-avatar-size);
  border-radius: 50%;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.user-node-avatar-wrap:hover {
  transform: scale(1.2);
}

.user-node.incoming-transfer .user-node-avatar-wrap::before,
.user-node.incoming-transfer .user-node-avatar-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.8);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  animation: starlinkWaveOut 3.2s ease-out infinite;
}

.user-node.incoming-transfer .user-node-avatar-wrap::after {
  animation-delay: 1.6s;
}

.user-node.pending:not(.placeholder) .user-node-avatar-wrap::before,
.user-node.pending:not(.placeholder) .user-node-avatar-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.8);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  animation: starlinkWaveOut 3.2s ease-out infinite;
}

.user-node.pending:not(.placeholder) .user-node-avatar-wrap::after {
  animation-delay: 1.6s;
}

@keyframes starlinkWaveOut {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.85;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.6);
    opacity: 0;
  }
}

.user-node-avatar-btn {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  display: block;
}

.pending-orbit {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  animation: pendingOrbitSpin 2.8s linear infinite;
}

.user-node.pending .pending-orbit {
  display: block;
}

.pending-orbit-btn {
  --orbit-radius: 44px;
  --orbit-angle: 0deg;
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(var(--orbit-angle)) translate(var(--orbit-radius)) rotate(calc(-1 * var(--orbit-angle)));
  pointer-events: auto;
  border: 1px solid;
  background: rgba(16, 14, 26, 0.92);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.pending-orbit-btn .orbit-label {
  display: inline-block;
  animation: pendingOrbitSpin 2.8s linear infinite reverse;
  transform-origin: center;
}

.pending-orbit-btn.orbit-approve {
  --orbit-angle: 40deg;
  border-color: #00ff7f;
  color: #00ff7f;
}

.pending-orbit-btn.orbit-reject {
  --orbit-angle: 220deg;
  border-color: var(--danger);
  color: var(--danger);
}

.pending-orbit-btn:hover {
  transform: rotate(var(--orbit-angle)) translate(calc(var(--orbit-radius) + 2px)) rotate(calc(-1 * var(--orbit-angle))) scale(1.03);
}

@keyframes pendingOrbitSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.user-node-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--accent);
  object-fit: contain;
  object-position: center;
  background: var(--panel);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
  transition: all 0.3s ease;
}

.user-node.pending .user-node-avatar {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  filter: grayscale(70%) brightness(0.7);
}

.user-node.placeholder {
  cursor: default;
}

.user-node.placeholder[data-user-id=""] {
  display: none;
}

.user-node.placeholder[data-user-id]:not([data-user-id=""]) {
  cursor: grab;
}

.user-node.placeholder .user-node-name {
  display: none;
}

.user-node.placeholder .user-node-avatar-wrap {
  width: 10px;
  height: 10px;
}

.user-node.placeholder[data-user-id]:not([data-user-id=""]) .user-node-avatar-wrap {
  width: var(--starlink-avatar-size);
  height: var(--starlink-avatar-size);
}

.user-node.placeholder[data-user-id]:not([data-user-id=""]) .user-node-name {
  display: block;
}

.user-node.placeholder[data-user-id]:not([data-user-id=""]) .user-node-avatar {
  border: 1px solid var(--accent);
  background: var(--panel);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
  filter: none;
}

.user-node.placeholder .user-node-avatar {
  border: 0;
  background: rgba(139, 92, 246, 0.85);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.45);
  animation: none;
  transform-origin: center;
  filter: none;
}

body.starlink-attention .user-node.placeholder .user-node-avatar {
  animation: placeholderDotPulse 1.1s ease-in-out infinite;
}

body.starlink-loading .user-node.placeholder .user-node-avatar {
  animation: placeholderDotPulse 1.1s ease-in-out infinite;
}

.user-node.placeholder[data-slot-index="0"] .user-node-avatar {
  animation-delay: 0s;
}

.user-node.placeholder[data-slot-index="1"] .user-node-avatar {
  animation-delay: 0.1s;
}

.user-node.placeholder[data-slot-index="2"] .user-node-avatar {
  animation-delay: 0.2s;
}

.user-node.placeholder[data-slot-index="3"] .user-node-avatar {
  animation-delay: 0.3s;
}

.user-node.placeholder[data-slot-index="4"] .user-node-avatar {
  animation-delay: 0.4s;
}

.user-node.placeholder[data-slot-index="5"] .user-node-avatar {
  animation-delay: 0.5s;
}

.user-node.placeholder[data-slot-index="6"] .user-node-avatar {
  animation-delay: 0.6s;
}

.user-node.placeholder[data-slot-index="7"] .user-node-avatar {
  animation-delay: 0.7s;
}

.user-node.placeholder[data-slot-index="8"] .user-node-avatar {
  animation-delay: 0.8s;
}

@keyframes placeholderDotPulse {

  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.user-node-name {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: color 0.3s ease;
}

.user-node.pending .user-node-name {
  color: var(--muted);
}

.user-node.temp .user-node-avatar {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.user-node.temp .user-node-name {
  color: rgba(255, 215, 0, 0.9);
}

.user-node-actions {
  display: none;
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 14, 26, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.user-node:hover .user-node-actions {
  display: flex;
}

.user-node-actions button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.user-node-actions .btn-approve {
  border-color: #00ff7f;
  background: rgba(0, 255, 127, 0.1);
  color: #00ff7f;
}

.user-node-actions .btn-approve:hover {
  background: rgba(0, 255, 127, 0.2);
  transform: scale(1.05);
}

.user-node-actions .btn-reject {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.user-node-actions .btn-reject:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
}

.center-user {
  position: absolute;
  text-align: center;
  z-index: 100;
  cursor: grab;
  user-select: none;
  transition: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.center-user.dragging {
  cursor: grabbing;
  transition: none;
}

.center-user.position-locked {
  cursor: not-allowed;
}

.center-user img {
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.user-circle {
  position: relative;
  width: var(--starlink-avatar-size);
  height: var(--starlink-avatar-size);
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: visible;
  background: var(--panel);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.55);
  animation: none;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.user-circle:hover {
  transform: scale(1.2);
}

body.starlink-attention .user-circle {
  animation: pulse 2s infinite;
}

body.starlink-loading .user-circle {
  animation: none;
}

body.starlink-loading .user-circle.main-user {
  animation: pulse 3.2s infinite;
}

body.starlink-loading .user-name,
body.starlink-loading .user-node-name,
body.starlink-loading .pending-orbit {
  display: none;
}

body:not(.starlink-authed) .center-user {
  opacity: 1;
  pointer-events: auto;
}

body.starlink-loading .center-user {
  opacity: 1;
  pointer-events: none;
}

body:not(.starlink-authed) .user-node {
  display: none;
}

.user-circle.main-user::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--starlink-avatar-size) * 2.2);
  height: calc(var(--starlink-avatar-size) * 2.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
  border: 0;
  opacity: 0;
  filter: none;
  pointer-events: none;
}

body.starlink-loading .user-circle.main-user::after {
  display: none;
}

.user-circle.main-user::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--starlink-avatar-size) * 3);
  height: calc(var(--starlink-avatar-size) * 3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
  border: 0;
  opacity: 0;
  filter: none;
  pointer-events: none;
}

body.starlink-loading .user-circle.main-user::before {
  display: none;
}

@keyframes starlinkCoreBreath {
  0% {
    transform: translate(-50%, -50%) scale(0.985);
    opacity: 0.72;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.015);
    opacity: 0.95;
  }

  100% {
    transform: translate(-50%, -50%) scale(0.985);
    opacity: 0.72;
  }
}

body:not(.starlink-authed) .user-circle.main-user::after {
  display: none;
}

.user-circle-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.starlink-avatar-loading-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.starlink-avatar-loading-orbit__dash {
  fill: none;
  stroke: none;
  display: none;
}

.starlink-avatar-loading-orbit__dots {
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

.starlink-avatar-loading-orbit__dots circle {
  fill: none;
  stroke: rgba(167, 139, 250, 0.95);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  opacity: 0.9;
}

.user-circle[data-avatar-loading="1"] .starlink-avatar-loading-orbit {
  opacity: 1;
  animation: starlinkAvatarLoadingBreath 1.35s ease-in-out infinite;
}

.user-circle[data-avatar-loading="1"] .starlink-avatar-loading-orbit__dash {
  display: none;
}

.user-circle[data-avatar-loading="1"] .starlink-avatar-loading-orbit__dots {
  animation: starlinkAvatarLoadingOrbitSpin 12s linear infinite;
}

@keyframes starlinkAvatarLoadingBreath {
  0% {
    transform: translate(-50%, -50%) scale(0.985);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.28));
  }

  50% {
    transform: translate(-50%, -50%) scale(1.03);
    filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.55));
  }

  100% {
    transform: translate(-50%, -50%) scale(0.985);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.28));
  }
}

@keyframes starlinkAvatarLoadingDash {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -60;
  }
}

@keyframes starlinkAvatarLoadingOrbitSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.user-circle.main-user {
  width: var(--starlink-avatar-size);
  height: var(--starlink-avatar-size);
  border-width: 2px;
}

.user-circle-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.user-name {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
  text-align: center;
  width: 100%;
  display: block;
}

.starlink-avatar-preview-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5000;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.starlink-avatar-preview-tooltip.active {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.starlink-avatar-preview-tooltip img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(16, 14, 26, 0.95);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
  }

  50% {
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.9);
  }
}

@keyframes togglePulse {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  }

  50% {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
  }
}

/* 圆形菜单 */
.circular-menu {
  position: absolute;
  --menu-radius: 110px;
  --menu-item-size: 26px;
  top: 50%;
  left: 50%;
  display: none;
  z-index: 500;
  width: 0;
  height: 0;
  pointer-events: none;
}

.circular-menu.active {
  display: block;
}

.circular-menu-item[hidden] {
  display: none !important;
}

.circular-menu-item {
  position: absolute;
  width: var(--menu-item-size);
  height: var(--menu-item-size);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(99, 102, 241, 0.9));
  border: 2px solid var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
  opacity: 0;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) translate(var(--menu-x, 0px), var(--menu-y, 0px)) scale(0);
  pointer-events: auto;
}

.circular-menu.active .circular-menu-item {
  opacity: 1;
  transform: translate(-50%, -50%) translate(var(--menu-x, 0px), var(--menu-y, 0px)) scale(1);
}

.circular-menu-item:hover {
  transform: translate(-50%, -50%) translate(var(--menu-x, 0px), var(--menu-y, 0px)) scale(1.2);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.7);
  background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(99, 102, 241, 1));
}

.circular-menu-item svg {
  width: 14px;
  height: 14px;
  fill: white;
}

.circular-menu-item.menu-item-lock {
  border-color: rgba(234, 179, 8, 0.9);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.75), rgba(245, 158, 11, 0.7));
}

.circular-menu-item.menu-item-danger {
  border-color: rgba(239, 68, 68, 0.95);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(220, 38, 38, 0.8));
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
}

.circular-menu-item.menu-item-danger:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 0.95));
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.7);
}

.circular-menu-item.menu-item-lock.locked {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.75), rgba(22, 163, 74, 0.7));
}

.menu-tooltip {
  position: absolute;
  left: 50%;
  top: 120%;
  transform: translateX(-50%);
  background: rgba(16, 14, 26, 0.95);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 1s;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.circular-menu-item:hover .menu-tooltip {
  opacity: 1;
  transition-delay: 1s;
}

@keyframes approveFlash {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  25% {
    transform: translate(-50%, -50%) scale(1.2);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }

  75% {
    transform: translate(-50%, -50%) scale(1.15);
  }
}

/* 右侧分享面板 */
.btn-refresh-share {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(37, 99, 235, 0.45));
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-refresh-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-share-main {
  padding: 5.2px 10.4px;
  border-radius: 6.5px;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.45));
  color: var(--text);
  cursor: pointer;
  font-size: 9.1px;
  font-weight: 800;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-share-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.right-panel .panel-header .btn-refresh-share,
.right-panel .panel-header .btn-share-main,
.right-panel .panel-header .btn-share-danger {
  padding: 6px 12px;
  border-radius: 7.5px;
  font-size: 10.5px;
}

.right-panel .panel-header .btn-refresh-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
}

.right-panel .panel-header .btn-share-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.35);
}

.right-panel .panel-header .btn-share-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.2);
}

.share-tabs-inline {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.share-tab-inline {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
  flex: 1;
}

.share-tab-inline.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

.share-tab-inline:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

.share-section {
  display: none;
  flex: 1;
  min-height: 0;
}

.share-section.active {
  display: flex;
  flex-direction: column;
}

.share-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-checkbox-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
  position: relative;
}

.share-checkbox-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.share-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.share-item-delete {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s ease;
  flex: 0 0 auto;
}

.share-checkbox-item:hover .share-item-delete,
.share-checkbox-item:focus-within .share-item-delete {
  opacity: 1;
  pointer-events: auto;
}

.share-item-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.share-checkbox-info {
  flex: 1;
  min-width: 0;
}

.share-checkbox-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 14px;
}

.share-checkbox-meta {
  font-size: 14px;
  color: var(--muted);
}

.share-checkbox-icon {
  font-size: 20px;
  opacity: 0.7;
}

/* 右侧设置 */
.user-settings {
  margin-bottom: 30px;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.setting-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.display-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.display-name-row .setting-input {
  flex: 1;
  width: auto;
}

.hide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hide-toggle:hover {
  border-color: var(--accent);
}

.hide-toggle input {
  display: none;
}

.hide-toggle-track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  transition: all 0.2s ease;
}

.hide-toggle-track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.hide-toggle input:checked+.hide-toggle-track {
  border-color: rgba(0, 255, 127, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 255, 127, 0.12);
}

.hide-toggle input:checked+.hide-toggle-track::after {
  left: 18px;
  background: #00ff7f;
}

.hide-toggle-text {
  font-size: 14px;
  font-weight: 800;
  opacity: 0.9;
}

.hide-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted2);
}

.setting-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.setting-input:-webkit-autofill,
.setting-input:-webkit-autofill:hover,
.setting-input:-webkit-autofill:focus,
.setting-input:-webkit-autofill:active,
.setting-input:autofill,
.setting-input:-moz-autofill {
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.18) inset !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.18) inset !important;
  background-color: rgba(0, 0, 0, 0.18) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.setting-input:-webkit-autofill:focus,
.setting-input:-webkit-autofill:active,
.setting-input:autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.18) inset, 0 0 0 4px rgba(139, 92, 246, 0.14) !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.18) inset, 0 0 0 4px rgba(139, 92, 246, 0.14) !important;
  border-color: var(--accent) !important;
}

.setting-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

.setting-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.settings-left,
.settings-right {
  display: flex;
  flex-direction: column;
}

.settings-right {
  justify-content: flex-start;
}

.avatar-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.avatar-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--border);
  transition: all 0.2s ease;
  object-fit: contain;
  object-position: center;
  background: var(--panel2);
}

.avatar-option:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.avatar-option.selected {
  border-color: #00ff7f;
  box-shadow: 0 0 15px rgba(0, 255, 127, 0.6);
  transform: scale(1.05);
}

.avatar-upload-section {
  margin-top: 10px;
}

.upload-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 200px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.upload-area:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.05);
}

.upload-area.has-image {
  border-style: solid;
  border-color: var(--accent);
}

.upload-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.upload-icon {
  font-size: 32px;
  opacity: 0.7;
}

.upload-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.upload-hint {
  font-size: 14px;
  color: var(--muted);
}

.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

.name-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted2);
}

@media (max-width: 768px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .avatar-selector {
    grid-template-columns: repeat(5, 1fr);
  }

  .upload-area {
    max-width: 150px;
  }
}

.btn-save {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.45));
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  transition: all 0.2s ease;
  position: relative;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-save.is-saving {
  padding-right: 46px;
}

.btn-save.is-saving::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: btnSaveSpin 0.9s linear infinite;
}

@keyframes btnSaveSpin {
  to {
    transform: rotate(360deg);
  }
}



/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* 个人设置弹框 */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.settings-modal.active {
  display: flex;
}

.settings-content {
  width: min(600px, 100%);
  max-height: 80vh;
  background: linear-gradient(180deg, rgba(18, 14, 30, 0.96), rgba(10, 8, 16, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent2);
}

.settings-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.settings-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 分享面板 */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-modal.active {
  display: flex;
}

.share-content {
  width: min(800px, 100%);
  max-height: 80vh;
  background: linear-gradient(180deg, rgba(18, 14, 30, 0.96), rgba(10, 8, 16, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.share-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-share-danger {
  padding: 5.2px 10.4px;
  border-radius: 6.5px;
  border: 1px solid var(--danger);
  background: rgba(239, 68, 68, 0.12);
  color: var(--text);
  cursor: pointer;
  font-size: 9.1px;
  font-weight: 800;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-share-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.25);
}

.confirm-content {
  width: min(520px, 100%);
}

.confirm-message {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.6;
  padding: 6px 2px 14px;
  white-space: pre-wrap;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.share-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent2);
}

.share-close {
  width: 41.6px;
  height: 41.6px;
  border-radius: 10.4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  display: grid;
  place-items: center;
}

.share-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.share-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.share-tab {
  padding: 10.4px 20.8px;
  border-radius: 10.4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.3em;
  transition: all 0.2s ease;
}

.share-tab.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

.share-tab-content {
  display: none;
}

.share-tab-content.active {
  display: block;
}

.share-item {
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.share-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.share-item-info {
  flex: 1;
  min-width: 0;
}

.share-item-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.share-item-meta {
  font-size: 14px;
  color: var(--muted);
}

.share-item-actions {
  display: flex;
  gap: 8px;
}

.btn-share-toggle {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-share-toggle.shared {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--accent2);
}

.btn-share-toggle:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
}

/* 响应式 */
@media (max-width: 1200px) {
  .app {
    grid-template-columns: 240px 1fr 280px;
  }

  .starlink-notify-bubbles {
    right: 300px;
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
  }

  .left-panel,
  .right-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 100;
    width: 280px;
  }

  .left-panel {
    left: -280px;
  }

  .right-panel {
    right: -320px;
  }

  .app.left-collapsed .left-panel {
    left: 0;
  }

  .app.right-collapsed .right-panel {
    right: 0;
  }

  .center-user {
    top: 50%;
  }

  .user-circle.main-user {
    width: 40px;
    height: 40px;
  }

  .user-node-avatar-wrap {
    width: 40px;
    height: 40px;
  }

  .user-node-name {
    font-size: 14px;
  }

  .starlink-notify-bubbles {
    top: 10px;
    right: 10px;
    gap: 8px;
  }

  .friend-request-badge,
  .incoming-transfer-badge {
    padding: 6px 12px;
    font-size: 14px;
  }
}

@keyframes slideRight {

  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }

  50% {
    transform: translateX(5px);
    opacity: 0.5;
  }
}

@keyframes slideLeft {

  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }

  50% {
    transform: translateX(-5px);
    opacity: 0.5;
  }
}

.app.left-collapsed .left-toggle .toggle-icon {
  display: none;
}

.app.right-collapsed .right-toggle .toggle-icon {
  display: none;
}

.user-info-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.user-info-modal.active {
  display: flex;
}

.user-info-content {
  width: min(560px, 100%);
  max-height: 80vh;
  background: linear-gradient(180deg, rgba(18, 14, 30, 0.96), rgba(10, 8, 16, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.user-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.user-info-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent2);
}

.user-info-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.user-info-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

.user-info-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-info-body.avatar-viewer-body {
  padding: 24px;
  justify-content: center;
  align-items: center;
}

.avatar-viewer {
  width: 100%;
  display: grid;
  place-items: center;
}

.avatar-viewer-img {
  width: min(360px, 88vw);
  height: min(360px, 88vw);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.user-info-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
}

.user-info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.5);
}

.user-info-name {
  font-size: 16px;
  font-weight: 900;
}

.user-info-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.user-info-bio {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
  opacity: 0.85;
  line-height: 1.5;
  white-space: pre-wrap;
}

.user-info-bio--empty {
  color: var(--muted);
  opacity: 0.8;
}

.friends-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.friends-modal.active {
  display: flex;
}

.friends-content {
  width: min(860px, 100%);
  max-height: 80vh;
  background: linear-gradient(180deg, rgba(18, 14, 30, 0.96), rgba(10, 8, 16, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.friends-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent2);
}

.friends-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.friends-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

.friends-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.friends-target {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.friends-target-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friends-target-pair-sep {
  color: var(--muted);
  font-weight: 900;
  opacity: 0.8;
}

.friends-target-avatar-btn {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.friends-target-avatar-btn:hover .friends-target-avatar {
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.friends-target-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.friends-target-name {
  font-size: 16px;
  font-weight: 800;
}

.friends-target-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.friends-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.friend-tag {
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.16);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.friend-tag:hover {
  transform: translateY(-1px);
  background: rgba(139, 92, 246, 0.24);
  border-color: rgba(167, 139, 250, 0.6);
}

.friend-detail {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
}

.friend-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-detail-header--pair {
  align-items: flex-start;
}

.friend-detail-avatars {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friend-detail-pair-sep {
  color: var(--muted);
  font-weight: 900;
  opacity: 0.8;
  margin-top: 16px;
}

.friend-detail-avatar-btn {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.friend-detail-avatar-btn:hover .friend-detail-avatar {
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.friend-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.friend-detail-name {
  font-size: 16px;
  font-weight: 900;
}

.friend-detail-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.friend-detail-bio {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
  opacity: 0.85;
  line-height: 1.5;
  white-space: pre-wrap;
}

.friend-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-friend-action {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: rgba(139, 92, 246, 0.18);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.user-info-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-info-actions .btn-friend-action {
  width: 100%;
}

.btn-friend-action:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.btn-friend-action.secondary {
  border-color: var(--border2);
  background: rgba(255, 255, 255, 0.04);
}

.btn-friend-action.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-friend-action.danger {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.btn-friend-action.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

.btn-view-friends {
  margin-top: 10px;
}

.search-result-item.jump-highlight {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

.friends-quota {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.friends-quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.friends-quota-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.friends-quota-admin {
  display: none;
  align-items: center;
  gap: 8px;
}

.friends-quota-input {
  width: 110px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.friends-quota-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.friends-quota-save {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(139, 92, 246, 0.2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.friends-quota-save:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

/* 好友请求项样式 */
.friend-request-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.friend-request-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.friend-request-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
  border: 2px solid rgba(139, 92, 246, 0.5);
}

.friend-request-info {
  flex: 1;
  min-width: 0;
}

.friend-request-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.friend-request-time {
  font-size: 13px;
  color: var(--muted);
}

.friend-request-actions {
  display: flex;
  gap: 8px;
}

.btn-approve-request,
.btn-reject-request {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-approve-request {
  border-color: #00ff7f;
  background: rgba(0, 255, 127, 0.1);
  color: #00ff7f;
}

.btn-approve-request:hover {
  background: rgba(0, 255, 127, 0.2);
  transform: scale(1.05);
}

.btn-reject-request {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.btn-reject-request:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
}

.empty-state-small {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 14px;
}