/* ===== Dock 侧边栏 ===== */ #dock { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; background: rgba(3, 7, 18, 0.7); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 16px; } .dock-item { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-secondary); text-decoration: none; transition: all 0.25s ease; position: relative; } .dock-item:hover, .dock-item.active { color: var(--cyan-light); background: rgba(6, 182, 212, 0.15); transform: scale(1.15); } .dock-item svg { width: 18px; height: 18px; } .dock-separator { width: 20px; height: 1px; background: var(--border); margin: 4px 0; } /* 用户头像样式 */ .dock-user-avatar { position: relative; cursor: pointer; flex-direction: column; gap: 4px; } .dock-user-avatar svg { color: var(--cyan); } .dock-user-avatar:hover { color: var(--cyan-light); background: rgba(6, 182, 212, 0.15); transform: scale(1.15); } /* 称号徽章 */ .user-title-badge { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 600; padding: 1px 4px; border-radius: 4px; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3); pointer-events: none; } /* 用户菜单按钮样式 */ .dock-user-menu-btn { position: relative; cursor: pointer; } .dock-user-menu-btn svg { color: var(--text-secondary); } .dock-user-menu-btn:hover { color: var(--cyan-light); background: rgba(6, 182, 212, 0.15); transform: scale(1.15); } /* Tooltip */ .dock-item::before { content: attr(data-tooltip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%) scale(0.9); padding: 4px 8px; border-radius: 4px; background: #1f2937; border: 1px solid var(--border); color: #fff; font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.2s ease; } .dock-item:hover::before { opacity: 1; transform: translateY(-50%) scale(1); } /* 响应式 */ @media (max-width: 768px) { #dock { right: auto; left: 50%; top: auto; bottom: 12px; transform: translateX(-50%); flex-direction: row; gap: 4px; padding: 8px 12px; } .dock-separator { width: 1px; height: 20px; margin: 0 4px; } .dock-item::before { right: auto; top: auto; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(0.9); } .dock-item:hover::before { transform: translateX(-50%) scale(1); } }