:root {
  --bg: #0b1018;
  --bg2: #0f1520;
  --card: #131c29;
  --line: #223047;
  --text: #e6edf6;
  --muted: #8fa2bb;
  --blue: #5aa9ff;
  --cyan: #7dd3fc;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 开场动画画布：盖住整屏，点一下可以跳过 */
.boot-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  cursor: pointer;
  background: #0B1A2A;
}

html, body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #16233a 0%, var(--bg) 55%);
  color: var(--text);
  font: 15px/1.65 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
body { padding-bottom: 40px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
  max-width: 880px; margin: 0 auto;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand h1 { font-size: 19px; margin: 0; letter-spacing: .5px; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}

.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px; font-size: 16px; cursor: pointer;
}

.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 6px; padding: 8px 16px;
  background: rgba(11, 16, 24, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  max-width: 880px; margin: 0 auto;
}
.tab {
  flex: 1; padding: 9px 6px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  font-size: 14px; cursor: pointer;
}
.tab.active { background: #17233a; color: var(--text); border-color: #2b3f5e; }

main { max-width: 880px; margin: 0 auto; padding: 14px 16px; }
.pane { display: none; }
.pane.active { display: block; }
.pane-head h2 { margin: 10px 0 4px; font-size: 18px; }
.pane-head p { margin: 0 0 14px; }

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

/* 讲解页的「问 AI」小面板 */
.ask-card { border-color: #24405f; background: linear-gradient(180deg, #132234, #101a27); }
.field-label { font-size: 13.5px; color: var(--text); }
.select, .input {
  display: block; width: 100%; margin: 8px 0;
  padding: 10px 12px; border-radius: 11px;
  background: #0d1622; border: 1px solid #26374f; color: var(--text);
  font: inherit; -webkit-appearance: none; appearance: none;
}
.select {
  background-image: linear-gradient(45deg, transparent 49%, #6b829c 50%), linear-gradient(-45deg, transparent 49%, #6b829c 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.input { resize: vertical; min-height: 46px; }
.select:focus, .input:focus { outline: none; border-color: #3b82f6; }
.mini { padding: 5px 9px !important; font-size: 12px !important; }
.answer { margin-top: 10px; border-top: 1px dashed #24374f; padding-top: 10px; }
.answer-body {
  white-space: pre-wrap; font-size: 14px; line-height: 1.7;
  color: #dbe6f3; max-height: 460px; overflow: auto;
}

/* 装到桌面的说明 */
.step-title { margin: 14px 0 6px; font-size: 13.5px; color: #7dd3fc; }
.steps { margin: 0 0 4px; padding-left: 20px; font-size: 13.5px; color: #cfdcea; }
.steps li { margin: 4px 0; }
.steps b { color: #e6edf6; }
#install-url { flex: 1; min-width: 0; margin: 0; font-size: 13px; }

.card {
  background: linear-gradient(180deg, var(--card), #111a26);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 15px; }

.row { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.row.tight { gap: 6px; margin: 0; }
.row.between { justify-content: space-between; }
.row.toggle { gap: 8px; font-size: 13.5px; color: var(--muted); }
.row.toggle input { width: 18px; height: 18px; }

button { font: inherit; cursor: pointer; }
.primary {
  flex: 1; min-width: 130px; padding: 11px 14px; border-radius: 11px; border: 0;
  background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff; font-weight: 600;
}
.primary:disabled { opacity: .55; }
.ghost {
  padding: 10px 13px; border-radius: 11px; background: #17223a;
  border: 1px solid var(--line); color: var(--text);
}
.ghost.small { padding: 6px 10px; font-size: 12.5px; }

.upload {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: 11px; font-weight: 600;
  background: #17233a; border: 1px dashed #37527a; color: var(--cyan);
}

.preview-wrap { margin: 12px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.preview-wrap img { display: block; width: 100%; max-height: 340px; object-fit: contain; background: #fff; }

.compare { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare.single { grid-template-columns: 1fr; }
.cmp-item { margin: 0; background: #0d141f; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cmp-item img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #fff; }
.cmp-item figcaption { font-size: 12px; color: var(--muted); padding: 7px 10px; border-top: 1px solid var(--line); }
.svg-box { max-height: 460px; overflow: auto; background: #0b1220; }
.svg-box svg { display: block; max-width: none; height: auto; }
.svg-box::after { content: "← 左右拖动看图，字太小就横着划 →"; display: block; color: #5c7088; font-size: 11px; padding: 4px 10px 8px; }

.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #1b2a40; color: var(--muted); }
.badge.ok { background: rgba(74, 222, 128, .14); color: var(--green); }
.badge.bad { background: rgba(248, 113, 113, .14); color: var(--red); }
.badge.warn { background: rgba(251, 191, 36, .14); color: var(--amber); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 7px 0; border-bottom: 1px dashed #1e2b40; font-size: 13.5px; }
.check-list li:last-child { border-bottom: 0; }
.check-list .ok { color: var(--green); }
.check-list .err { color: var(--red); }
.check-list .warn { color: var(--amber); }

.solve-box { margin-top: 10px; }
.solve-box table { width: 100%; border-collapse: collapse; font-size: 13px; }
.solve-box th, .solve-box td { padding: 6px 8px; border-bottom: 1px solid #1e2b40; text-align: left; }
.solve-box th { color: var(--muted); font-weight: 500; }

.text-input, .text-area {
  width: 100%; background: #0d1522; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 12px; font: inherit;
}
.text-area { min-height: 96px; resize: vertical; }
.code {
  width: 100%; min-height: 220px; background: #0a111b; border: 1px solid var(--line);
  color: #cfe3ff; border-radius: 10px; padding: 12px;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical; white-space: pre;
}
.desc {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font: 14px/1.85 system-ui, -apple-system, "PingFang SC", sans-serif; color: #dbe7f6;
}

.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

.lecture-list { display: flex; flex-direction: column; gap: 10px; }
.lecture {
  border: 1px solid var(--line); border-radius: 12px; background: #111a26; overflow: hidden;
}
.lecture-head {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 13px 14px; background: transparent; border: 0; color: var(--text);
}
.lecture-no {
  flex: none; font-size: 12px; color: var(--cyan); border: 1px solid #2b4a70;
  border-radius: 7px; padding: 2px 7px;
}
.lecture-title { flex: 1; font-size: 14.5px; }
.lecture-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.lecture-body { display: none; padding: 0 14px 14px; }
.lecture.open .lecture-body { display: block; }
.lecture.open .lecture-head { background: #152238; }

.point { border-top: 1px solid #1c2a3f; padding: 12px 0; }
.lecture-pdf {
  display: inline-block;
  margin: 4px 0 6px;
  padding: 5px 10px;
  border: 1px solid #2a4a6e;
  border-radius: 8px;
  color: #7dd3fc;
  font-size: 12.5px;
  text-decoration: none;
}
.lecture-pdf:active { background: #16283d; }
.point:first-child { border-top: 0; }
.point h4 { margin: 0 0 6px; font-size: 14px; color: #dbe9ff; }
.point p { margin: 6px 0; font-size: 13.8px; color: #c3d2e6; }
.formula {
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #0b1420; border-left: 3px solid #2f5f9e; border-radius: 6px;
  padding: 7px 10px; color: #a9cfff; overflow-x: auto;
}
.tip { font-size: 13px; color: #f3c98b; }

.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(4, 8, 14, .72);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
@media (min-width: 720px) { .modal { align-items: center; padding: 20px; } }
.modal-card {
  width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px 18px 0 0;
  padding: 18px;
}
@media (min-width: 720px) { .modal-card { border-radius: 18px; } }

.hidden { display: none !important; }
.foot { max-width: 880px; margin: 20px auto 0; padding: 0 16px; color: #5c7088; font-size: 12px; }
