/**
 * ============================================================
 *  settings.css — Settings 设置 App 样式表
 * ============================================================
 *  使用通用安全区域架构，演示灰色主题适配
 * ============================================================
 */

/* ——————————————————————————————————————————————
 *  根容器（继承通用架构）
 * —————————————————————————————————————————————— */

.settings-app-root {
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

/* ——————————————————————————————————————————————
 *  Header（使用通用架构类）
 * —————————————————————————————————————————————— */

.settings-header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.settings-header-content {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.settings-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #007aff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.settings-back-btn svg {
  width: 12px;
  height: 20px;
}

.settings-title {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  letter-spacing: -0.3px;
}

.settings-placeholder {
  width: 60px; /* 占位，保持标题居中 */
}

/* ——————————————————————————————————————————————
 *  Content（使用通用架构类）
 * —————————————————————————————————————————————— */

.settings-content {
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-area-bottom)); /* 底部安全区域 */
}

/* ——————————————————————————————————————————————
 *  用户信息卡片
 * —————————————————————————————————————————————— */

.settings-user-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}

.user-id {
  font-size: 13px;
  color: #999;
}

.user-edit-btn {
  padding: 8px 16px;
  background: #f5f5f7;
  color: #007aff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.user-edit-btn:active {
  background: #e8e8ea;
}

/* ——————————————————————————————————————————————
 *  设置分组
 * —————————————————————————————————————————————— */

.settings-group {
  margin-bottom: 24px;
}

.settings-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.settings-list {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ——————————————————————————————————————————————
 *  设置项
 * —————————————————————————————————————————————— */

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:active {
  background: #f5f5f7;
}

.settings-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.settings-item-label {
  flex: 1;
  font-size: 16px;
  color: #000;
  font-weight: 400;
}

.settings-item-value {
  font-size: 15px;
  color: #8e8e93;
  margin-right: 4px;
}

.settings-item-arrow {
  color: #c7c7cc;
  font-size: 20px;
  font-weight: 300;
}

/* ——————————————————————————————————————————————
 *  Toggle 开关
 * —————————————————————————————————————————————— */

.settings-item-toggle {
  position: relative;
}

.settings-item-toggle input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  display: block;
  width: 51px;
  height: 31px;
  background: #e5e5ea;
  border-radius: 31px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.settings-item-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: #34c759;
}

.settings-item-toggle input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(20px);
}

/* ——————————————————————————————————————————————
 *  退出登录按钮
 * —————————————————————————————————————————————— */

.settings-logout-container {
  margin-top: 32px;
  padding-bottom: 20px;
}

.settings-logout-btn {
  width: 100%;
  padding: 16px;
  background: #ffffff;
  color: #ff3b30;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  -webkit-tap-highlight-color: transparent;
}

.settings-logout-btn:active {
  background: #f5f5f7;
}
