/* 设置页面样式 - settings.css */

/* 主要内容区域 */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: #f8f9fa;
}

/* 页面标题 */
.top-header {
  height: 77px;
  min-height: 77px;
  max-height: 77px;
  padding: 24px 24px 0 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

/* 设置容器 */
.settings-container {
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

/* 设置区块 */
.settings-section {
  margin-bottom: 32px;
  width: 566px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 16px 0;
}

/* 用户信息卡片 */
.user-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.user-info-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.user-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a9eff, #00d4aa);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-initial-large {
  color: white;
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-display-name {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.user-name-edit-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.user-name-edit-btn:hover {
  background: #f8f9fa;
}

.chevron-icon {
  width: 20px;
  height: 20px;
  color: #6c757d;
}

/* 账号绑定列表 */
.account-bindings {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.binding-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f1f3f4;
  gap: 16px;
}

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

.binding-label {
  font-size: 16px;
  font-weight: 500;
  color: #212529;
  width: 60px;
  flex-shrink: 0;
}

.binding-value {
  flex: 1;
  font-size: 16px;
  color: #495057;
}

.binding-value-secondary {
  color: #6c757d;
}

.binding-value-placeholder {
  color: #adb5bd;
}

/* 绑定操作按钮 */
.binding-action-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  font-weight: 500;
}

.binding-action-btn.update {
  color: #20c997;
}

.binding-action-btn.update:hover {
  background: #e6fffa;
}

.binding-action-btn.bind {
  color: #20c997;
}

.binding-action-btn.bind:hover {
  background: #e6fffa;
}

.binding-action-btn.unbind {
  color: #20c997;
  margin-right: 8px;
}

.binding-action-btn.unbind:hover {
  background: #e6fffa;
}

/* 信息链接 */
.info-links {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

.info-link-item:hover {
  background: #f8f9fa;
}

.info-link-text {
  font-size: 16px;
  color: #495057;
}

/* 退出登录区域 */
.logout-section {
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
}

.logout-button {
  display: inline-block;
  background: none;
  border: none;
  color: #dc3545;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.logout-button:hover {
  background: #fff5f5;
  color: #dc3545;
  text-decoration: none;
}

/* 编辑个人信息弹层 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal-container {
  background: white;
  border-radius: 12px;
  width: 480px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background: #f8f9fa;
}

.close-icon {
  width: 20px;
  height: 20px;
  color: #6c757d;
}

.modal-content {
  padding: 24px;
}

/* 头像上传区域 */
.avatar-upload-section {
  margin-bottom: 32px;
}

.avatar-label {
  font-size: 14px;
  font-weight: 500;
  color: #212529;
  margin-bottom: 16px;
}

.avatar-label::before {
  content: "*";
  color: #dc3545;
  margin-right: 4px;
}

.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a9eff, #00d4aa);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-initial-preview {
  color: white;
  font-size: 32px;
  font-weight: 600;
  text-transform: uppercase;
}

.avatar-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.upload-buttons {
  display: flex;
  gap: 12px;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.upload-btn.primary {
  background: #4a9eff;
  color: white;
}

.upload-btn.primary:hover {
  background: #3a8eef;
}

.upload-btn.secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.upload-btn.secondary:hover {
  background: #e9ecef;
}

.upload-icon {
  width: 16px;
  height: 16px;
}

.upload-hint {
  font-size: 12px;
  color: #6c757d;
}

/* 昵称输入区域 */
.nickname-section {
  margin-bottom: 24px;
}

.nickname-label {
  font-size: 14px;
  font-weight: 500;
  color: #212529;
  margin-bottom: 12px;
}

.nickname-label::before {
  content: "*";
  color: #dc3545;
  margin-right: 4px;
}

.nickname-input-wrapper {
  position: relative;
}

.nickname-input {
  width: 100%;
  padding: 12px 60px 12px 16px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 16px;
  color: #212529;
  background: white;
  transition: border-color 0.2s;
}

.nickname-input:focus {
  border-color: #4a9eff;
  outline: none;
}

.char-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6c757d;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.btn-cancel, .btn-save {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-cancel {
  background: #f8f9fa;
  color: #495057;
}

.btn-cancel:hover {
  background: #e9ecef;
}

.btn-save {
  background: #20c997;
  color: white;
}

.btn-save:hover {
  background: #1ba085;
}


/* 响应式设计 */
@media (max-width: 768px) {
  .settings-container {
    padding: 16px;
  }
  
  .top-header {
    padding: 16px 16px 0 16px;
  }
  
  .binding-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .binding-label {
    width: auto;
  }
  
  .binding-action-btn {
    align-self: flex-end;
  }
  
  .modal-container {
    width: 90%;
    margin: 0 16px;
  }
  
  .avatar-upload-area {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .upload-buttons {
    justify-content: center;
  }
}