/* ========== 设置弹窗样式 ========== */
/* 浅色精致卡片风：白底毛玻璃 + 16px 圆角 */

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.35);
  animation: fadeIn var(--duration-normal) var(--ease-smooth) both;
}

.settings-modal {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-xl);
  animation: fadeInUp var(--duration-normal) var(--ease-smooth) both;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.settings-header h2 {
  font-size: var(--font-2xl);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.settings-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: var(--font-lg);
  transition: 
    color var(--duration-normal) var(--ease-smooth),
    background var(--duration-normal) var(--ease-smooth);
}

.settings-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.settings-group h3 {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-subtle);
}

.settings-row:first-child {
  border-top: none;
}

.settings-row label {
  font-size: var(--font-md);
  color: var(--text-primary);
}

/* ---- Toggle 开关 ---- */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-default);
  border-radius: 22px;
  transition: background var(--duration-normal) var(--ease-smooth);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--brand);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--text-primary);
}
