/* ─── 自定义 CSS 变量 ─────────────────────────────────────────── */
:root {
  --bg-primary:   #0f1117;
  --bg-card:      #1a1d2e;
  --bg-card2:     #1e2240;
  --bg-input:     #12152a;
  --border-color: #2a2d45;
  --border-color2:#3a3d5a;
  --text-primary: #e0e4ff;
  --text-muted:   #7a83b0;
  --accent:       #5b6ef5;
  --accent-end:   #7c4dff;
  --success:      #11b96b;
  --success-end:  #00c9a7;
  --warning:      #f5a623;
}

/* ─── 全局 ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── 导航栏 ────────────────────────────────────────────────────── */
.navbar-custom {
  background: rgba(26, 29, 46, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
}

.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: white;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-custom .nav-link {
  color: #9098c8 !important;
  font-size: 14px;
  padding: 0.4rem 0.8rem !important;
  border-radius: 8px;
  transition: all .2s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--text-primary) !important;
  background: rgba(91,110,245,.15);
}

.avatar-sm {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
}

.dropdown-dark {
  background: var(--bg-card2) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
}
.dropdown-dark .dropdown-item {
  color: var(--text-primary);
  font-size: 14px;
  border-radius: 6px;
  padding: 8px 14px;
  transition: .15s;
}
.dropdown-dark .dropdown-item:hover {
  background: rgba(91,110,245,.2);
  color: white;
}

/* ─── 主内容区 ────────────────────────────────────────────────────── */
.main-content { min-height: calc(100vh - 130px); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero-section { padding: 1.5rem 0; }

.hero-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: white;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(91,110,245,.35);
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e0e4ff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.ip-tip {
  background: rgba(91,110,245,.12);
  border: 1px solid rgba(91,110,245,.3);
  color: var(--text-primary);
  font-size: 13px;
}

/* ─── 卡片 ──────────────────────────────────────────────────────── */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.card-header-custom {
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

/* ─── 上传区 ────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-color2);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: var(--bg-input);
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(91,110,245,.08);
  transform: translateY(-1px);
}
.upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: .5rem;
  transition: color .25s;
}
.upload-zone:hover .upload-icon { color: var(--accent); }

/* ─── 文件列表 ──────────────────────────────────────────────────── */
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 100px;
  overflow-y: auto;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card2);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
}
.file-chip span { overflow: hidden; text-overflow: ellipsis; }

/* ─── 表单控件 ──────────────────────────────────────────────────── */
.form-control,
.form-select {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(91,110,245,.15) !important;
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
}
.form-control::placeholder { color: #4a5070 !important; }
.form-label { color: var(--text-muted); font-size: 13px; margin-bottom: 5px; }
.form-check-label { color: var(--text-muted); font-size: 13px; }
.form-check-input { background-color: var(--bg-input); border-color: var(--border-color2); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-range::-webkit-slider-thumb { background: var(--accent); }
.form-range::-webkit-slider-runnable-track { background: var(--border-color2); }
.input-group-text {
  background: var(--bg-card2) !important;
  border-color: var(--border-color) !important;
  color: var(--text-muted) !important;
}
.form-control-color { height: 38px !important; padding: 0.25rem !important; }

/* ─── 按钮 ──────────────────────────────────────────────────────── */
.btn-primary-custom {
  background: linear-gradient(90deg, var(--accent), var(--accent-end));
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  transition: all .25s;
}
.btn-primary-custom:hover {
  background: linear-gradient(90deg, #6b7ef9, #8c5dff);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,110,245,.4);
}
.btn-primary-custom:active { transform: translateY(0); }
.btn-primary-custom:disabled { background: var(--border-color2); color: #555870; }

.btn-secondary-custom {
  background: var(--bg-card2);
  border: 1px solid var(--border-color2);
  color: var(--text-muted);
  border-radius: 10px;
  transition: all .2s;
}
.btn-secondary-custom:hover {
  background: #343760;
  color: var(--text-primary);
  border-color: var(--accent);
}

.btn-success-custom {
  background: linear-gradient(90deg, var(--success), var(--success-end));
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  transition: all .25s;
  font-size: 15px;
  padding: 10px 20px;
}
.btn-success-custom:hover {
  background: linear-gradient(90deg, #13cf7a, #00dbb9);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(17,185,107,.35);
}
.btn-success-custom:disabled { background: var(--border-color2); color: #555870; }

.btn-xs { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.btn-outline-secondary {
  border-color: var(--border-color2) !important;
  color: var(--text-muted) !important;
}
.btn-outline-secondary:hover {
  background: var(--bg-card2) !important;
  color: var(--text-primary) !important;
}

/* ─── 排序列表 ──────────────────────────────────────────────────── */
.sort-area {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.sort-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sort-item {
  background: var(--bg-card2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all .15s;
  max-width: 150px;
}
.sort-item:hover { border-color: var(--accent); color: var(--text-primary); }
.sort-item.dragging { opacity: .5; border-style: dashed; border-color: var(--accent); }
.sort-item img {
  width: 36px; height: 36px;
  object-fit: cover; border-radius: 4px;
  flex-shrink: 0;
}
.sort-item .item-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.sort-item .item-del {
  cursor: pointer; color: #ff4d4d; font-size: 14px; flex-shrink: 0;
  display: none;
}
.sort-item:hover .item-del { display: inline; }
.sort-item .drag-handle { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }

/* ─── 预览区 ────────────────────────────────────────────────────── */
.preview-area {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
}
.preview-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* ─── 进度条 ────────────────────────────────────────────────────── */
.progress { background: var(--bg-input); border-radius: 6px; }
.progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-end));
  border-radius: 6px;
}
.progress-wrapper .progress { height: 8px; }

/* ─── 状态卡片 ──────────────────────────────────────────────────── */
.status-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

/* ─── 认证页卡片 ────────────────────────────────────────────────── */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 2rem;
}

.auth-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: white;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(91,110,245,.3);
}

.text-primary-custom { color: var(--accent) !important; }
hr { border-color: var(--border-color); }

/* ─── alert ─────────────────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  font-size: 14px;
}
.alert-success {
  background: rgba(17,185,107,.15);
  border-color: rgba(17,185,107,.3);
  color: #4ade80;
}
.alert-danger {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.3);
  color: #f87171;
}
.alert-warning {
  background: rgba(245,166,35,.15);
  border-color: rgba(245,166,35,.3);
  color: #fbbf24;
}
.alert-info {
  background: rgba(91,110,245,.15);
  border-color: rgba(91,110,245,.3);
  color: #93c5fd;
}

/* ─── 页脚 ──────────────────────────────────────────────────────── */
.footer-custom {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

/* ─── badge ─────────────────────────────────────────────────────── */
.badge.bg-secondary {
  background: var(--bg-card2) !important;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── 响应式 ────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-title { font-size: 1.4rem; }
  .hero-icon { width: 56px; height: 56px; font-size: 1.6rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .card-header-custom { font-size: .9rem; }
  .upload-zone { padding: 1.5rem 1rem; }
  .upload-icon { font-size: 2rem; }
  .sort-list { flex-direction: row; }
  .sort-item { max-width: calc(50% - 4px); }
}

@media (max-width: 575.98px) {
  .ip-tip { flex-wrap: wrap; justify-content: center; text-align: center; }
  .sort-item { max-width: 100%; }
}

/* ─── 加载遮罩 ──────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(15,17,23,.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  color: white;
}

/* ─── 拖拽高亮 ──────────────────────────────────────────────────── */
.sort-item.drag-over { border-color: var(--accent); background: rgba(91,110,245,.15); }

/* ─── 动画 ──────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feature-card { animation: fadeInUp .4s ease both; }
.feature-card:nth-child(2) { animation-delay: .1s; }
.hero-section { animation: fadeInUp .35s ease; }

/* ─── 成功状态进度条颜色 ────────────────────────────────────────── */
.progress-bar-success {
  background: linear-gradient(90deg, var(--success), var(--success-end)) !important;
}

/* ─── 文件数量徽章 ──────────────────────────────────────────────── */
.file-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: white;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
}

/* ─── 上传区已上传状态 ──────────────────────────────────────────── */
.upload-zone.has-files {
  border-color: var(--accent);
  background: rgba(91,110,245,.05);
}
.upload-zone.has-files .upload-icon { color: var(--accent); }

/* ─── 可点击文字 ────────────────────────────────────────────────── */
a.text-primary-custom:hover { text-decoration: underline; }

/* ─── spinner ───────────────────────────────────────────────────── */
.spinner-border { border-color: var(--accent); border-right-color: transparent; }

/* ══════════════════════════════════════════════════════════════════
   使用说明页专属样式
══════════════════════════════════════════════════════════════════ */

/* Hero */
.help-hero-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #f5a623, #f76b1c);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: white;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(245,166,35,.35);
}

/* 目录 */
.help-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}
.help-toc-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.help-toc-nav { display: flex; flex-direction: column; gap: 2px; }
.help-toc-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: all .18s;
}
.help-toc-item:hover,
.help-toc-item.active {
  background: rgba(91,110,245,.15);
  color: var(--text-primary);
}
.help-toc-item.active { color: var(--accent); font-weight: 600; }

/* 章节 */
.help-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.help-section-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(91,110,245,.15);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.help-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.text-muted-custom { color: var(--text-muted); font-size: 14px; }
.help-divider {
  border-color: var(--border-color);
  margin: 2.5rem 0;
}
.text-accent { color: var(--accent) !important; }

/* 概览卡片 */
.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%;
  transition: border-color .2s;
}
.overview-card:hover { border-color: var(--accent); }
.overview-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: white;
  margin-bottom: 1rem;
}
.overview-icon-green {
  background: linear-gradient(135deg, var(--success), var(--success-end));
}
.overview-card h5 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; }
.overview-card p  { font-size: 13px; color: var(--text-muted); margin-bottom: .75rem; }
.overview-tags    { display: flex; flex-wrap: wrap; gap: 6px; }
.help-tag {
  font-size: 11px;
  background: rgba(91,110,245,.15);
  color: var(--accent);
  border-radius: 20px;
  padding: 2px 10px;
  font-weight: 600;
}

/* 步骤 */
.steps-container { display: flex; flex-direction: column; gap: 0; }
.step-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}
.step-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px; top: 40px;
  width: 2px;
  bottom: 0;
  background: var(--border-color);
}
.step-num {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: white;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.step-body { flex: 1; padding-top: 4px; }
.step-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.step-desc  { font-size: 13.5px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.65; }
.step-tip {
  background: rgba(245,166,35,.08);
  border: 1px solid rgba(245,166,35,.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #c9a05a;
}

/* 参数表格 */
.param-table { display: flex; flex-direction: column; gap: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); }
.param-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}
.param-row:last-child { border-bottom: none; }
.param-name {
  width: 90px; min-width: 90px;
  background: var(--bg-card2);
  color: var(--text-primary);
  font-weight: 600;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.5;
}
.param-desc {
  flex: 1;
  background: var(--bg-input);
  color: var(--text-muted);
  padding: 9px 14px;
  line-height: 1.6;
}

/* 推荐配置 */
.recommend-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.recommend-box-title { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.recommend-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s;
}
.recommend-card:hover { border-color: var(--accent); }
.recommend-scene { font-weight: 700; font-size: 13px; color: var(--text-primary); margin-bottom: 4px; }
.recommend-params { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* 次数限制卡片 */
.limit-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.limit-card-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  color: white;
}
.limit-card-free .limit-card-header  { background: linear-gradient(90deg, #3a3d5a, #2a2d45); }
.limit-card-user .limit-card-header  { background: linear-gradient(90deg, var(--accent), var(--accent-end)); }
.limit-list {
  list-style: none;
  padding: 1rem 1.25rem;
  margin: 0;
  background: var(--bg-input);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.limit-list li { font-size: 13.5px; color: var(--text-muted); }

/* 帮助列表 */
.help-list {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.help-list li { font-size: 13.5px; color: var(--text-muted); }

/* FAQ */
.faq-accordion { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--accent); }
.faq-question {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.faq-question:hover { background: rgba(91,110,245,.07); }
.faq-chevron {
  transition: transform .25s;
  font-size: 13px;
  color: var(--text-muted);
}
.faq-answer {
  padding: 0 18px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}
.faq-answer code {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  color: var(--accent);
}

/* 响应式 */
@media (max-width: 767.98px) {
  .help-section-title { font-size: 1.1rem; }
  .param-name { width: 76px; min-width: 76px; font-size: 12px; }
}

