/* 用户中心页面样式 */

.user-page {
  display: flex;
  gap: 30px;
  padding: 30px 0;
}

/* 左侧边栏 */
.sidebar {
  width: 280px;
  flex-shrink: 0;
}

.user-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.user-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  position: relative;
  overflow: hidden;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-avatar-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  transform: translateY(30px);
}

.user-avatar-large:hover .upload-avatar-btn {
  transform: translateY(0);
}

.user-name {
  font-size: 20px;
  margin: 0 0 5px;
}

.user-email {
  color: #606266;
  font-size: 14px;
  margin: 0;
}

.side-menu {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.menu-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.menu-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

.menu-item.active {
  color: #1890ff;
  background-color: #e6f7ff;
  font-weight: 500;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #1890ff;
}

.menu-item i {
  margin-right: 10px;
  font-size: 18px;
}

.notification-badge {
  margin-left: auto;
}

/* 右侧内容区域 */
.content-area {
  flex: 1;
  min-width: 0;
}

.content-panel {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 18px;
  margin: 0;
}

.panel-body {
  padding: 20px;
}

/* 空状态 */
.empty-state {
  padding: 50px 0;
  text-align: center;
}

.empty-icon {
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
}

/* 通知列表 */
.notification-list {
  border-radius: 4px;
  overflow: hidden;
}

.notification-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fff;
  transition: all 0.3s;
}

.notification-item:hover {
  background-color: #f5f7fa;
}

.notification-item.unread {
  background-color: #e6f7ff;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.notification-icon.system {
  background-color: #e6f7ff;
  color: #1890ff;
}

.notification-icon.success {
  background-color: #f6ffed;
  color: #52c41a;
}

.notification-icon.warning {
  background-color: #fffbe6;
  color: #faad14;
}

.notification-icon.error {
  background-color: #fff2f0;
  color: #f5222d;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 500;
  margin-bottom: 5px;
}

.notification-message {
  color: #606266;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 5px;
}

.notification-time {
  color: #999;
  font-size: 12px;
}

.notification-actions {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.notification-actions .el-button + .el-button {
  margin-left: 8px;
}

/* 头像上传 */
.avatar-uploader {
  text-align: center;
}

.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 178px;
  height: 178px;
  margin: 0 auto;
}

.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}

.avatar-preview {
  width: 178px;
  height: 178px;
  display: block;
  object-fit: cover;
}

.upload-tip {
  text-align: center;
  color: #909399;
  font-size: 12px;
  margin-top: 10px;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .user-page {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .notification-item {
    flex-direction: column;
  }
  
  .notification-icon {
    margin-bottom: 10px;
  }
  
  .notification-actions {
    margin-left: 0;
    margin-top: 10px;
    justify-content: flex-end;
    width: 100%;
  }
}
