/* ===== 个人设置（settings.html 专用 · 分栏导航风格） ===== */

.set-view {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- 左侧导航栏 ---------- */

.set-rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 300px;
  flex: none;
  padding: 34px 24px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 255, 0.86));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.rail-beam {
  position: absolute;
  top: -45%;
  left: 0;
  width: 100%;
  height: 45%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.07) 42%, rgba(56, 189, 248, 0.12) 50%, rgba(56, 189, 248, 0.07) 58%, transparent 100%);
  animation: rail-scan 8s linear infinite;
}

@keyframes rail-scan {
  0% { top: -45%; }
  100% { top: 130%; }
}

.rail-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  pointer-events: none;
}

.rail-glow-a {
  width: 210px;
  height: 210px;
  top: -70px;
  left: -70px;
  background: rgba(56, 189, 248, 0.2);
  animation: rail-float 9s ease-in-out infinite;
}

.rail-glow-b {
  width: 240px;
  height: 240px;
  bottom: -90px;
  right: -90px;
  background: rgba(139, 92, 246, 0.16);
  animation: rail-float 11s ease-in-out infinite reverse;
}

@keyframes rail-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, 20px); }
}

.set-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.set-brand-text { display: flex; flex-direction: column; gap: 3px; }

.set-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
}

.set-brand-sub {
  color: var(--primary);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2.8px;
  font-family: var(--font-num);
  opacity: 0.9;
}

/* 当前用户卡 */
.set-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.set-user-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(8, 145, 178, 0.25);
  color: var(--primary);
}

.set-user-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }

.set-user-label { font-size: 10.5px; color: var(--faint); letter-spacing: 1px; }

.set-user-name {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: dot-breathe 2.4s ease-in-out infinite;
}

@keyframes dot-breathe {
  0%, 100% { box-shadow: 0 0 6px var(--ok); }
  50% { box-shadow: 0 0 14px var(--ok); }
}

/* 分区导航 */
.set-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
}

.set-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.set-nav-item .icon { width: 18px; height: 18px; flex: none; }

.set-nav-item:hover {
  background: rgba(56, 189, 248, 0.09);
  color: var(--primary);
}

.set-nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(139, 92, 246, 0.12));
  border-color: rgba(8, 145, 178, 0.35);
  color: var(--primary-deep);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.14), inset 0 0 12px rgba(56, 189, 248, 0.06);
}

.set-nav-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 22%;
  height: 56%;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, #06b6d4, #6366f1);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.set-rail-foot {
  position: relative;
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 8px;
}

.set-back,
.set-logout {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
}

.set-back {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
}

.set-back:hover {
  color: var(--primary);
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.16);
}

.set-logout {
  border: 1px solid rgba(225, 29, 72, 0.3);
  background: var(--danger-soft);
  color: var(--danger);
}

.set-logout:hover {
  border-color: rgba(225, 29, 72, 0.55);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.16);
}

.set-back .icon,
.set-logout .icon { width: 16px; height: 16px; }

/* ---------- 右侧设置面板 ---------- */

.set-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 40px 32px;
  width: 100%;
}

.set-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  animation: panel-in 0.26s ease;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.set-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.6), rgba(139, 92, 246, 0.4), transparent);
}

.set-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px 22px 0;
}

.set-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(8, 145, 178, 0.3);
  color: var(--primary);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.16), inset 0 0 10px rgba(34, 211, 238, 0.06);
}

.set-icon .icon { width: 21px; height: 21px; }

.set-panel-head h3 { margin: 1px 0 4px; font-size: 17px; font-weight: 700; letter-spacing: 1.2px; }

.set-panel-head p { margin: 0; font-size: 12.5px; }

.set-panel-body { padding: 18px 22px 22px; }

.set-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.set-label {
  margin: 16px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
}

.set-label:first-child { margin-top: 0; }

/* 头像 */

.avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border: 2px solid rgba(8, 145, 178, 0.32);
  color: var(--primary);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview > svg { width: 36px; height: 36px; }

.avatar-ops { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.avatar-ops p { margin: 0; font-size: 12px; }

/* 开关 */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
  cursor: pointer;
}

.switch-row:last-child { border-bottom: 0; }

.switch-text { display: flex; flex-direction: column; gap: 3px; }

.switch-title { font-size: 14.5px; font-weight: 600; letter-spacing: 0.4px; }

.switch-desc { font-size: 12.5px; color: var(--muted); }

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 25px;
  border-radius: 99px;
  background: rgba(100, 116, 139, 0.28);
  border: 1px solid var(--line-strong);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(100, 116, 139, 0.35);
  transition: left 0.2s ease;
}

.switch:checked {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border-color: rgba(8, 145, 178, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.switch:checked::after { left: 23px; }

/* 主题 / 卡片风格选择 */

.opt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.opt-grid-2 { grid-template-columns: repeat(2, 1fr); }

.opt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.opt-card:hover {
  border-color: rgba(8, 145, 178, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.opt-card.active {
  border-color: rgba(8, 145, 178, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), 0 0 18px rgba(56, 189, 248, 0.2);
}

.opt-check {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 17px;
  height: 17px;
  padding: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(8, 145, 178, 0.4);
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.opt-card.active .opt-check { opacity: 1; }

.opt-preview {
  display: block;
  height: 86px;
  border-radius: 9px;
  border: 1px solid var(--line);
  overflow: hidden;
  background-color: var(--surface-3);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.opt-name { font-size: 13.5px; font-weight: 600; letter-spacing: 0.5px; color: var(--text); }

/* 主题/卡片预览：实拍预览图（t1~t5），URL 带版本参数强制刷新缓存 */

.theme-light-preview { background-image: url('/assets/t1.jpg?v=20261023e'); }

.theme-dark-preview { background-image: url('/assets/t2.jpg?v=20261023e'); }

.card-aurora-preview { background-image: url('/assets/t3.jpg?v=20261023e'); }

.card-minimal-preview { background-image: url('/assets/t4.jpg?v=20261023e'); }

.card-classic-preview { background-image: url('/assets/t5.jpg?v=20261023e'); }

/* ---------- 深色主题适配 ---------- */

[data-theme="dark"] .set-rail {
  background: linear-gradient(180deg, rgba(13, 21, 40, 0.78), rgba(9, 14, 29, 0.84));
}

[data-theme="dark"] .rail-glow-a { background: rgba(34, 211, 238, 0.15); }
[data-theme="dark"] .rail-glow-b { background: rgba(124, 58, 237, 0.19); }

[data-theme="dark"] .opt-check { background: rgba(13, 21, 40, 0.9); }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .set-view { flex-direction: column; overflow: visible; }

  .set-rail {
    width: 100%;
    padding: 22px 18px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .set-user { margin-top: 16px; }

  .set-nav {
    flex-direction: row;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .set-nav-item {
    width: auto;
    flex: none;
    padding: 9px 14px;
    white-space: nowrap;
  }

  .set-nav-item.active::before { display: none; }

  .set-rail-foot { margin-top: 14px; padding-top: 0; }

  .set-main { padding: 22px 18px 26px; max-width: 640px; }
}

@media (max-width: 520px) {
  .opt-grid { grid-template-columns: 1fr 1fr; }
  .opt-grid-2 { grid-template-columns: 1fr 1fr; }
  .set-panel-head h3 { font-size: 15.5px; }
  .avatar-row { gap: 14px; }
}
