/* ===== 全局重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0a0a0f;
  color: #fff;
  min-height: 100vh;
}

/* ===== 滚动条（全局统一） ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: 76px;
  background: #0d0d14;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 99;
}

/* 侧栏 logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 导航区域（垂直居中） */
.sidebar-nav {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 16px 6px;
}

.sidebar-nav-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 导航按钮 */
.nav-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: rgba(255, 255, 255, 0.4);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #c4b5fd;
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #a855f7, #6366f1);
  border-radius: 0 2px 2px 0;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.nav-btn.active svg {
  color: #a78bfa;
}

.nav-btn span {
  font-size: 10px;
  font-weight: 500;
}

/* 底部用户区域 */
.sidebar-bottom {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 会员积分 */
.member-credits {
  display: flex;
  align-items: center;
  gap: 6px;
}
.member-credits svg {
  width: 14px;
  height: 14px;
  color: #22d3ee;
}
.member-credits span {
  font-size: 11px;
  font-weight: 700;
  color: #67e8f9;
}

/* 会员等级 */
.member-level {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.15), rgba(249, 115, 22, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.member-level svg {
  width: 12px;
  height: 12px;
  color: #fbbf24;
}
.member-level span {
  font-size: 10px;
  font-weight: 600;
  color: #fcd34d;
}

/* 头像 */
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-avatar svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* 登录按钮（未登录状态） */
.login-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #8b5cf6;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

/* 菜单触发图标（☰） */
.icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: center;
  font-size: 18px;
  line-height: 24px;
}

/* ===== 底部菜单弹窗 ===== */
.menu-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.menu-content {
  width: 280px;
  background: #12121c;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item {
  padding: 12px;
  text-align: center;
  color: #ddd;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 4px;
}

.menu-item:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}