/* =========================================================================
   settings.css —— 设置抽屉 (WS-04A)
   右侧滑入；桌面 360px / 移动端 100% 宽；遮罩模糊；关闭：× / 遮罩 / ESC
   ========================================================================= */

.settings-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, .55);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
  z-index: 55;
}
.settings-mask.show { opacity: 1; visibility: visible; }

.settings-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 360px;
  max-width: 100%;
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.22, .61, .36, 1);
  z-index: 56;
  display: flex;
  flex-direction: column;
}
.settings-drawer.open { transform: translateX(0); }

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.settings-title { font-family: var(--mono); letter-spacing: 2px; color: var(--amber); font-size: 16px; }
.settings-close {
  width: 44px; height: 44px;       /* ≥44px 触控 */
  border: 1px solid var(--line);
  background: #0d1722;
  border-radius: 8px;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.settings-close:hover { border-color: var(--cyan); color: var(--cyan); }

.settings-body { flex: 1; overflow: auto; padding: 8px 18px 20px; }
.set-group { border-bottom: 1px solid var(--line); padding: 14px 0; }
.set-group h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: 2px; color: var(--dim); font-weight: 600; }

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;              /* ≥44px 触控热区 */
  padding: 4px 0;
}
.set-row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.set-row span { color: var(--ink); font-size: 14px; }
.set-row b { color: var(--cyan); font-family: var(--mono); }

/* 切换开关 */
.switch { position: relative; display: inline-block; width: 54px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: #1a2735;
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  left: 3px; top: 3px;
  background: #7d90a3;
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.switch input:checked + .slider { background: linear-gradient(90deg, #2a8fd6, var(--cyan)); border-color: var(--cyan); }
.switch input:checked + .slider::before { transform: translateX(22px); background: #fff; }

/* 音量滑块 */
.range {
  -webkit-appearance: none; appearance: none;
  width: 160px; max-width: 55%;
  height: 6px;
  border-radius: 3px;
  background: #1a2735;
  border: 1px solid var(--line);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid #0c1620;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(70, 214, 224, .15);
}
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid #0c1620;
  cursor: pointer;
}

.set-about { color: var(--dim); font-size: 13px; line-height: 1.9; }
.set-ver { color: var(--amber); font-family: var(--mono); margin-top: 2px; }
.set-feedback { margin-top: 6px; font-size: 12px; color: #516274; }

@media (max-width: 560px) {
  .settings-drawer { width: 100%; }
}
