/* ============================================================
 * MNBT 安装向导（V1.84 全新前端 · 原生 CSS）
 * 浅色简约圆角风格
 * ============================================================ */

:root {
  --primary: #2c6cff;
  --primary-dark: #2459d8;
  --bg: #eef4ff;
  --card: #ffffff;
  --text: #1a2233;
  --text-2: #5c6b85;
  --text-3: #93a3c2;
  --line: #e8eefb;
  --blue-soft: #eaf2ff;
  --blue-border: #d3e3ff;
  --red: #e64a2e;
  --green: #34b27b;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(165deg, #eaf2ff 0%, #f6faff 55%, #edf5ff 100%);
  min-height: 100vh;
  display: flex;
  padding: 28px 16px;
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img, svg { vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; }
iframe { width: 100%; height: 100%; border: 0; }

/* 背景柔和装饰（低透明度色块，非光效） */
.deco { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
.deco-1 { width: 360px; height: 360px; background: #d4e3ff; top: -120px; left: -100px; opacity: .55; }
.deco-2 { width: 300px; height: 300px; background: #dce9ff; bottom: -110px; right: -80px; opacity: .5; }

/* ---------- 主卡片 ---------- */
.install-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  margin: auto;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(44, 108, 255, .12), 0 2px 8px rgba(44, 108, 255, .06);
  overflow: hidden;
}

/* ---------- 顶部品牌栏 ---------- */
.install-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 30px 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2c6cff, #6b96ff);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(44, 108, 255, .26);
  flex-shrink: 0;
}
.brand-logo img { width: 28px; height: 28px; border-radius: 6px; }
.brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand p { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.ver-badge {
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--blue-soft); border: 1px solid var(--blue-border);
  padding: 4px 12px; border-radius: 999px;
}

/* ---------- 横向步骤条 ---------- */
.steps { display: flex; padding: 22px 30px 4px; }
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--primary);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step .dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  position: relative; z-index: 1;
  box-shadow: 0 2px 6px rgba(44, 108, 255, .25);
  transition: all .3s ease;
}
.step .label { margin-top: 9px; text-align: center; }
.step .label b { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.step .label i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* 当前步骤 */
.step.curr-page-active .dot {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(44, 108, 255, .12);
}
.step.curr-page-active .label b { color: var(--text); }

/* 当前步骤之后的步骤 */
.step.curr-page-active ~ .step::before { background: #e3ecf9; }
.step.curr-page-active ~ .step .dot {
  background: #edf2fb;
  color: #a3b4d0;
  box-shadow: none;
}
.step.curr-page-active ~ .step .label b { color: var(--text-3); }
.step.curr-page-active ~ .step .label i { color: #b8c5dd; }

/* ---------- 主体 ---------- */
.install-body { padding: 10px 30px 8px; }

/* 进度条 */
.progress-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-3);
  margin: 6px 0 8px;
}
.progress-row .pct { color: var(--primary); font-weight: 600; }
.progress-track {
  height: 6px; border-radius: 999px;
  background: #edf2fa; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2c6cff, #6b96ff);
  width: 0;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* 内容面板（grid 单格重叠：只有当前面板可见，行高自适应，不堆积不截断） */
#content-page-main {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 320px;
  margin-top: 14px;
}
#content-page-main > div {
  grid-area: 1 / 1;
  display: none;
  animation-duration: .55s;
  animation-fill-mode: both;
}
#content-page-main > div.page-active {
  display: block;
  animation-name: panel-in;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
/* JS next() 设置的切出/切入动画 */
@keyframes exit {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-18px); }
}
@keyframes entry {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-icon {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--blue-soft); border: 1px solid var(--blue-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.panel-icon svg { width: 20px; height: 20px; color: var(--primary); }
.panel-head h2 { font-size: 17px; font-weight: 700; }
.panel-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.welcome-lead { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.welcome-lead b { color: var(--text); }
.welcome-links { margin-top: 10px; font-size: 14px; }
.welcome-links a { color: var(--primary); font-weight: 600; }
.welcome-links a:hover { text-decoration: underline; }

/* 提示条 */
.tip-box {
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13px;
  margin: 6px 0 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.tip-box .mdi { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.tip-box.info { background: var(--blue-soft); color: var(--primary); border: 1px solid var(--blue-border); }
.tip-box.warn { background: #fff8e6; color: #a8791a; border: 1px solid #f3e2b0; }

/* 协议 */
.license-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbfe;
  padding: 14px 16px;
  height: 220px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}
.agree-card {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
  margin-bottom: 4px;
}
.agree-card:hover { border-color: var(--blue-border); }
.agree-card .check {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid #cfd8ea;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
}
.agree-card .check svg { width: 11px; height: 9px; display: none; }
.agree-card b { font-size: 14px; font-weight: 600; display: block; }
.agree-card small { font-size: 12px; color: var(--text-3); }
.agree-card.terms-yes { border-color: var(--primary); background: var(--blue-soft); }
.agree-card.terms-yes .check { background: var(--primary); border-color: var(--primary); }
.agree-card.terms-yes .check svg { display: block; }

/* 系统监测 */
.sys-list { display: flex; flex-direction: column; gap: 10px; }
.sys-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  background: #fbfcfe;
  position: relative;
}
.sys-item .s-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sys-item .s-ico svg { width: 17px; height: 17px; color: var(--primary); }
.sys-item b { font-size: 13px; display: block; }
.sys-item span { font-size: 12px; color: var(--text-3); }
.sys-item::after {
  content: '监测中...';
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  font-size: 12px; font-weight: 600;
  color: var(--text-3);
}
.sys-item.yes { border-color: #bfe0d0; }
.sys-item.yes::after { content: '支持'; color: var(--green); }
.sys-item.no { border-color: #f3c4b8; }
.sys-item.no::after { content: '不支持'; color: var(--red); }
.sys-item.mn-no { border-color: #eedfb2; }
.sys-item.mn-no::after { content: '非必须'; color: #c98a12; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label {
  display: block;
  font-size: 13px; font-weight: 600;
  margin-bottom: 6px;
}
.form-item input[type="text"],
.form-item input[type="password"],
.form-item textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-item input:focus,
.form-item textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 108, 255, .12);
}
.form-item textarea { resize: vertical; min-height: 56px; }
.form-item input::placeholder, .form-item textarea::placeholder { color: #aeb9cf; }

/* 安装模式选择 */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
}
.choice-item:hover { border-color: #9ec0ff; box-shadow: 0 4px 14px rgba(44, 108, 255, .06); }
.choice-item .check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid #cfd8ea;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
}
.choice-item .check svg { width: 11px; height: 9px; display: none; }
.choice-item b { font-size: 14px; font-weight: 600; display: block; }
.choice-item small { font-size: 12px; color: var(--text-3); }
.choice-item.terms-yes { border-color: var(--primary); background: var(--blue-soft); }
.choice-item.terms-yes .check { background: var(--primary); border-color: var(--primary); }
.choice-item.terms-yes .check svg { display: block; }

/* 完成 */
.done-box { text-align: center; padding: 30px 0 10px; }
.done-ico {
  width: 78px; height: 78px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(52, 178, 123, .12);
  border: 3px solid var(--green);
  display: flex; align-items: center; justify-content: center;
}
.done-ico svg { width: 42px; height: 42px; color: var(--green); }
.done-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.done-box p { font-size: 13px; color: var(--text-2); }
.admin-info {
  margin: 22px 0 20px;
  text-align: left;
  background: #f6f9ff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 13px;
}
.admin-info .ai-title { font-weight: 700; margin-bottom: 10px; }
.admin-info .ai-row { color: var(--text-2); margin: 4px 0; }
.admin-info code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 13px;
  color: var(--text);
}
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  transition: all .2s ease;
}
.entry:hover { border-color: #9ec0ff; box-shadow: 0 4px 14px rgba(44, 108, 255, .06); }
.entry.primary { background: var(--primary); border-color: var(--primary); }
.entry.primary:hover { opacity: .92; }
.entry .e-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.entry.primary .e-ico { background: rgba(255, 255, 255, .22); }
.entry .e-ico svg { width: 17px; height: 17px; color: var(--primary); }
.entry.primary .e-ico svg { color: #fff; }
.entry b { font-size: 14px; font-weight: 600; display: block; }
.entry.primary b { color: #fff; }
.entry small { font-size: 12px; color: var(--text-3); }
.entry.primary small { color: rgba(255, 255, 255, .75); }
.entry .e-arrow { margin-left: auto; color: var(--text-3); flex-shrink: 0; }
.entry .e-arrow svg { width: 14px; height: 14px; }
.entry.primary .e-arrow svg { color: rgba(255, 255, 255, .55); }

/* ---------- 底部操作区 ---------- */
.install-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 30px 24px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.tip-msg {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--red);
  min-height: 20px;
}
.tip-msg svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-next {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2c6cff, #4a82ff);
  color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 11px 28px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(44, 108, 255, .28);
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-next:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(44, 108, 255, .34); }
.btn-next:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* 隐藏辅助 */
.d-none { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  body { padding: 12px; }
  .install-card { border-radius: 16px; }
  .install-header, .steps, .install-body, .install-foot { padding-left: 18px; padding-right: 18px; }
  .step .label i { display: none; }
  .brand p { display: none; }
  #content-page-main { min-height: 380px; }
  .install-foot { flex-direction: column; align-items: stretch; }
  .btn-next { width: 100%; }
}
