:root {
  --bg: #f7f8fc;
  --card: #ffffff;
  --primary: #6c5ce7;
  --primary-2: #8b5cf6;
  --primary-dark: #5b4bc4;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 50%, #a78bfa 100%);
  --text: #1e2230;
  --muted: #6b7280;
  --border: #e8eaf0;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --shadow: 0 4px 20px rgba(60, 50, 160, .08);
  --shadow-lg: 0 12px 40px rgba(60, 50, 160, .14);
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }

/* ---- header ---- */
.header {
  text-align: center; padding: 56px 0 8px; margin-bottom: 10px;
  background: radial-gradient(1200px 420px at 50% -10%, rgba(139, 92, 246, .12), transparent 70%);
}
.logo { display: flex; gap: 16px; align-items: center; justify-content: center; margin-bottom: 20px; }
.logo svg { filter: drop-shadow(0 6px 16px rgba(108, 92, 231, .35)); }
.logo h1 {
  font-size: 40px; font-weight: 800; letter-spacing: .5px; line-height: 1.15;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo .logo-text { text-align: left; }
.logo .logo-text p {
  color: var(--muted); font-size: 15px; margin-top: 6px; max-width: 560px;
}
.logo .logo-text p b { color: var(--primary-2); font-weight: 700; }
.badges { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.badge {
  font-size: 13px; color: var(--primary-dark); background: #f1edff;
  border: 1px solid #e3dbff; padding: 6px 14px; border-radius: 999px; font-weight: 500;
  transition: .18s;
}
.badge:hover { background: #e9e2ff; transform: translateY(-1px); }

/* ---- dropzone ---- */
.dropzone {
  background: var(--card); border: 2px dashed #cfc4ff; border-radius: 22px;
  padding: 52px 20px; text-align: center; cursor: pointer; transition: .22s;
  box-shadow: var(--shadow);
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: #faf8ff; box-shadow: var(--shadow-lg); }
.dropzone.over { transform: scale(1.008); }
.dz-inner svg { margin-bottom: 6px; }
.dz-inner h2 { font-size: 19px; margin: 10px 0 8px; font-weight: 700; }
.dz-inner p { color: var(--muted); font-size: 13.5px; max-width: 640px; margin: 0 auto; }

/* ---- toolbar ---- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin: 20px 0; box-shadow: var(--shadow); flex-wrap: wrap;
}
.toolbar-right { display: flex; gap: 10px; }
.fmt-hint { font-size: 13px; color: var(--muted); }

/* ---- buttons ---- */
.btn {
  border: none; border-radius: 12px; padding: 11px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: .18s; white-space: nowrap;
  letter-spacing: .2px;
}
.btn.primary {
  background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(108, 92, 231, .32);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(108, 92, 231, .42); }
.btn.primary:disabled { background: #c9c2ec; box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost { background: #f1f2f7; color: var(--text); }
.btn.ghost:hover { background: #e7e8f0; }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- cards ---- */
.cards { display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: .18s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-top { display: flex; gap: 0; flex-wrap: wrap; }
.preview { position: relative; width: 260px; min-height: 180px; background: #0d1117; flex-shrink: 0; }
.preview img, .preview video { width: 100%; height: 100%; object-fit: contain; display: block; position: absolute; inset: 0; }
.preview .tabs { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; z-index: 3; }
.tab-btn {
  background: rgba(13, 17, 23, .65); color: #fff; border: none; border-radius: 6px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.tab-btn.active { background: var(--primary-2); }
.card-body { flex: 1; padding: 18px 20px; min-width: 300px; }
.card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-title h3 { font-size: 15px; word-break: break-all; font-weight: 700; }
.state { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.state.ok { color: var(--ok); background: #e6f7ee; }
.state.err { color: var(--err); background: #fdeaea; }
.state.busy { color: var(--warn); background: #fff5e0; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; margin: 10px 0 12px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .divider { width: 1px; background: var(--border); margin: 2px 4px; }
.progress-note { font-size: 12.5px; color: var(--warn); margin-top: 8px; }
.err-msg { font-size: 13px; color: var(--err); margin-top: 8px; }

/* ---- guide / 帮助区块 ---- */
.section-title { text-align: center; margin: 56px 0 8px; }
.section-title h2 { font-size: 28px; font-weight: 800; }
.section-title h2 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

.guide {
  margin-top: 20px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.guide h3 { font-size: 17px; margin-bottom: 8px; font-weight: 700; }
.guide p { font-size: 13.5px; color: var(--muted); }
.guide ol { margin: 8px 0 4px 22px; font-size: 13.5px; color: var(--text); }
.guide li { margin: 5px 0; }
.guide details { margin-top: 12px; }
.guide summary { cursor: pointer; font-size: 13.5px; color: var(--primary-dark); font-weight: 600; }
.guide ul { margin: 8px 0 4px 22px; font-size: 13px; color: var(--muted); }
.guide code { background: #f1f2f7; padding: 1px 7px; border-radius: 5px; font-size: 12px; color: #5b4bc4; }
.guide p.warn { color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.guide details.syno {
  margin-top: 16px; background: #f7f7fd; border: 1px solid #e6e2f7;
  border-radius: 12px; padding: 12px 16px;
}
.guide details.syno summary { font-weight: 700; font-size: 14px; color: var(--text); }
.guide details.syno p { margin: 8px 0; font-size: 13.5px; color: var(--text); }
.guide details.syno ol { margin: 8px 0 4px 22px; font-size: 13px; color: var(--text); }
.guide table.chan { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.guide table.chan th, .guide table.chan td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.guide table.chan th { background: #f1edff; color: var(--primary-dark); font-weight: 700; }
.guide table.chan tr:nth-child(even) td { background: #fafafd; }
.guide pre { background: #1e2230; color: #e6e8f0; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; margin: 10px 0; line-height: 1.5; }

/* ---- 特性卡片网格 ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow); transition: .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .ico {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: linear-gradient(135deg, #f1edff, #faf8ff); margin-bottom: 14px;
}
.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--muted); }

/* ---- 步骤卡片 ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); text-align: center; position: relative;
}
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800;
  margin: 0 auto 14px; box-shadow: 0 6px 16px rgba(108, 92, 231, .32);
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }

/* ---- FAQ ---- */
.faq { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 20px; box-shadow: var(--shadow); transition: .18s;
}
.faq details[open] { border-color: #cfc4ff; }
.faq summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 20px; color: var(--primary-2); font-weight: 700; transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---- footer ---- */
.footer { margin-top: 60px; text-align: center; color: #9aa4b5; font-size: 13px; }
.footer .foot-tag { margin-top: 8px; font-size: 12.5px; color: #b6bccb; }

/* ---- toast ---- */
.toast-wrap { position: fixed; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast {
  background: #1e2230; color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.22); animation: slideIn .25s ease;
  max-width: 360px;
}
.toast.ok { background: #16a34a; }
.toast.err { background: #dc2626; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .logo h1 { font-size: 30px; }
  .features, .steps { grid-template-columns: 1fr; }
  .preview { width: 100%; min-height: 220px; }
  .toolbar { flex-direction: column; align-items: stretch; }
}
