/* 全局样式重置 + 强制苹果字体 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 强制苹果字体栈：优先加载苹果原生字体，其他设备模拟苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei Light", "Microsoft YaHei", sans-serif !important;
  /* 强制字体渲染方式（苹果风格） */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: #fff;
  color: #333;
  font-size: 16px;
  /* 再次强调苹果字体，确保覆盖 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 顶部导航栏（恢复原有样式 + 强制苹果字体） */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background-color: #fff;
  border-bottom: none;
  position: relative;
  height: 48px; /* 标准移动端导航栏高度 */
}

/* 缩小版原生返回键（恢复原有大小） */
.back-btn {
  width: 44px;
  height: 48px;
  position: relative;
  cursor: pointer;
}
.back-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transition: all 0.2s ease;
}
.back-btn:hover::after {
  border-color: #ff3b30;
}

.title {
  font-size: 18px;
  font-weight: 500;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* 强制苹果字体权重 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif !important;
}

.manage-btn {
  font-size: 16px;
  color: #333;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}
.manage-btn:hover {
  color: #ff3b30;
}

/* 账号列表容器（恢复原有样式） */
.account-list {
  padding: 5px 18px 10px;
}

/* 单个账号项（保留间距调整，恢复原有布局） */
.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-bottom: none;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background-color 0.2s ease;
}
.account-item:hover {
  background-color: #f8f8f8;
}

/* 第二个账号单独上移（保留间距调整） */
.account-item[data-id="2"] {
  margin-top: -2px;
  margin-bottom: 5px;
}

/* 账号头像（恢复放大后的大小） */
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.account-info {
  flex: 1;
}

/* 用户名：轻微加粗（400→500，不突兀） */
.username {
  font-size: 16px;
  font-weight: 500; /* 原400，改为500（轻微加粗），600是较粗，700是特粗 */
  margin-bottom: 2px;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

.fans {
  font-size: 14px;
  color: #999;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 选中状态（对勾）- 抖音红 + 去掉重影/阴影 */
.checkmark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #fe2c55; /* 抖音切换账号对勾专属红 */
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  font-weight: 600;
  box-shadow: none; /* 彻底去掉重影/阴影，边缘干净 */
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 未选中状态（单选框）- 保留优化 */
.radio {
  width: 22px;
  height: 22px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 选中/未选中状态控制 */
.account-item.active .checkmark {
  display: flex;
}
.account-item.active .radio {
  display: none;
}
.account-item:not(.active) .checkmark {
  display: none;
}
.account-item:not(.active) .radio {
  display: block;
}

/* 添加账号按钮（恢复原有样式） */
.add-account {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  margin-top: 5px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}
.add-account:hover {
  background-color: #f8f8f8;
}

/* 加号按钮样式（保留原有调整） */
.add-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #a19d9d; /* 灰白色 */
  font-size: 42px;
  font-weight: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  line-height: 1;
  padding-bottom: 5px;
  transform: translateY(-3px);
  transition: background-color 0.2s ease;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}
.add-btn:hover {
  background-color: #eeeeee;
}

/* 添加或注册新账号文字：向上移动 + 轻微加粗 */
.add-text {
  font-size: 16px;
  color: #000;
  font-weight: 500; /* 原400，改为500（轻微加粗），和用户名保持一致 */
  transform: translateY(-6px); /* 向上移动6px */
  display: inline-block; /* 必须加这个，否则transform不生效 */
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* ========== 仅美化弹窗部分 + 强制苹果字体 ========== */
/* 弹窗样式 - 深度美化 */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 92%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px; /* 超大圆角 */
  box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* 多层阴影 */
  z-index: 1001;
  display: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 弹性动画 */
  overflow: hidden;
  border: 1px solid #f0f0f0;
}
.modal.show {
  display: block;
  transform: translate(-50%, -50%) scale(1);
}

/* 弹窗头部 - 渐变背景 + 磨砂感 */
.modal-header {
  padding: 20px 24px;
  border-bottom: none;
  background: linear-gradient(135deg, #fff, #fafafa);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif !important;
}

/* 关闭按钮 - 圆形交互 */
.close-modal {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  background-color: #f5f5f5;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}
.close-modal:hover {
  background-color: #ff3b301a;
  color: #ff3b30;
  transform: rotate(90deg); /* 旋转动效 */
}

/* 弹窗主体 - 宽松布局 */
.modal-body {
  padding: 24px;
  background-color: #fff;
}

.form-group {
  margin-bottom: 24px;
}
.form-group:last-child {
  margin-bottom: 0;
}

/* 头像组特殊样式 */
.avatar-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  color: #333;
  font-weight: 500;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 头像上传区域 - 深度美化 */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-preview-wrapper {
  position: relative;
}

.preview-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.preview-img:hover {
  border-color: #ff3b30;
  transform: scale(1.05);
}

/* 头像提示文字 */
.avatar-tip {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 上传按钮 - 渐变 + 阴影 */
.upload-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  background: linear-gradient(135deg, #f5f5f5, #eeeeee);
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-weight: 500;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}
.upload-btn:hover {
  background: linear-gradient(135deg, #eeeeee, #e5e5e5);
  color: #ff3b30;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* 输入框容器 - 优化样式 */
.input-wrapper {
  position: relative;
}
.form-input {
  width: 100%;
  outline: none;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s ease;
  background-color: #fafafa;
  color: #222;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}
.form-input:focus {
  border-color: #ff3b30;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,59,48,0.1);
  transform: translateY(-1px);
}
.form-input::placeholder {
  color: #cccccc;
  font-size: 15px;
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

/* 弹窗底部 - 渐变 + 分隔线 */
.modal-footer {
  padding: 20px 24px;
  border-top: none;
  background: linear-gradient(135deg, #fafafa, #fff);
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  position: relative;
}
.modal-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
}

/* 按钮样式 - 深度美化 */
.cancel-btn, .confirm-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  /* 强制苹果字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
}

.cancel-btn {
  background: linear-gradient(135deg, #f5f5f5, #eeeeee);
  color: #666;
}
.cancel-btn:hover {
  background: linear-gradient(135deg, #eeeeee, #e5e5e5);
  color: #333;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.confirm-btn {
  background: linear-gradient(135deg, #ff3b30, #ff5749);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.confirm-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.6s ease;
}
.confirm-btn:hover {
  background: linear-gradient(135deg, #e6352b, #ff4a3f);
  box-shadow: 0 4px 12px rgba(255,59,48,0.2);
  transform: translateY(-1px);
}
.confirm-btn:hover::after {
  left: 100%;
}
.confirm-btn:active {
  transform: translateY(0);
}

/* 遮罩层 - 渐变 + 动效 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5));
  z-index: 1000;
  display: none;
  transition: background 0.3s ease;
}
.overlay.show {
  display: block;
}