
/* 现代风格右上角头像菜单 */
#avatar-menu-root {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 9999;
}

/* 头像圆点按钮 */
.avatar-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-trigger:hover {
  transform: scale(1.05);
  background: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  text-transform: uppercase;
}

/* 弹出菜单卡片 */
.avatar-menu {
  position: absolute;
  top: 54px;
  right: 0;
  min-width: 180px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.avatar-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  padding: 10px 20px;
  color: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}

.menu-username {
  font-weight: 600;
  color: white;
  pointer-events: none;
}

.menu-icon {
  width: 18px;
  opacity: 0.8;
}

/* 通知图标 */
#notification-root {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-right: 12px;
}

.notification-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.notification-badge.show {
  display: flex;
}

/* 通知面板 */
.notification-panel {
  display: none;
  position: absolute;
  top: 54px;
  right: 60px;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 9999;
  padding: 8px 0;
}

.notification-panel.open {
  display: block;
}

.notification-header {
  padding: 10px 16px;
  color: #f1f5f9;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header-title {
  font-size: 0.95rem;
}

.mark-all-read-btn {
  background: transparent;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 8px;
}

.mark-all-read-btn:hover {
  background: rgba(37, 99, 235, 0.1);
}

.notification-list {
  min-height: 50px;
}

.notification-item {
  padding: 10px 16px;
  color: #e2e8f0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

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

.notification-message {
  flex: 1;
  line-height: 1.4;
}

.mark-read-btn {
  background: transparent;
  border: 1px solid #2563eb;
  color: #2563eb;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.mark-read-btn:hover {
  background: rgba(37, 99, 235, 0.1);
}

.notification-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  #avatar-menu-root {
    top: 0.75rem;
    right: 1rem;
  }
  .avatar-trigger {
    width: 40px;
    height: 40px;
  }
  .notification-panel {
    right: 10px;
    width: 280px;
  }
}

