/* demo-model.css —— 专业建模演示页样式（深色，与主程序一致的设计语言） */
:root {
  --bg: #0b0e16;
  --panel: rgba(18, 23, 36, .82);
  --line: rgba(120, 150, 210, .18);
  --txt: #e8edf7;
  --dim: #8b98b4;
  --accent: #FFD23F;
  --blue: #4C6FFF;
  --ok: #2FB344;
  --err: #E5484D;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--txt);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
}
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

/* ---- 3D 标签 ---- */
.lbl3d {
  position: absolute; left: 0; top: 0;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(11, 14, 22, .78);
  border: 1px solid rgba(140, 170, 230, .30);
  color: #cfe0ff; font-size: 12px; line-height: 18px;
  white-space: nowrap; pointer-events: none;
  backdrop-filter: blur(6px);
  transition: background .15s, border-color .15s, color .15s;
}
.lbl3d.sel {
  background: rgba(255, 210, 63, .16);
  border-color: var(--accent);
  color: #FFE79A;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(255, 210, 63, .22);
}

/* ---- 顶栏 ---- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(11, 14, 22, .92), rgba(11, 14, 22, .62));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.brand b { font-size: 15px; letter-spacing: .3px; }
.brand small { color: var(--dim); font-size: 12px; margin-left: 4px; }
.right { display: flex; align-items: center; gap: 14px; }
.stat { font-size: 12px; color: var(--dim); }
.stat.ok { color: #9fe3b0; }
.stat.err { color: var(--err); }
.back {
  color: var(--dim); text-decoration: none; font-size: 12px;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
  transition: .15s;
}
.back:hover { color: var(--txt); border-color: rgba(140, 170, 230, .45); }

/* ---- 面板 ---- */
.panel {
  position: fixed; top: 68px; z-index: 20;
  width: 296px; max-height: calc(100% - 88px);
  overflow-y: auto; padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: rgba(140, 170, 230, .22); border-radius: 3px; }
.panel.left { left: 16px; }
.panel.right { right: 16px; width: 286px; }
.panel h3 {
  margin: 0 0 10px; font-size: 13px; font-weight: 600;
  color: #c7d6f0; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel h3 small { color: var(--dim); font-weight: 400; font-size: 11px; }

/* ---- 结构按钮 ---- */
.glist { display: flex; flex-direction: column; gap: 6px; }
.gbtn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line); border-radius: 9px;
  color: var(--txt); font-size: 13px; font-family: inherit;
  cursor: pointer; transition: .16s; text-align: left;
}
.gbtn:hover { background: rgba(255, 255, 255, .07); border-color: rgba(140, 170, 230, .40); }
.gbtn.on {
  background: rgba(255, 210, 63, .13);
  border-color: var(--accent);
  color: #FFE79A;
}
.gbtn i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(140, 170, 230, .45); flex: 0 0 auto;
}
.gbtn.on i { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.gbtn span { flex: 1; }
.gbtn b {
  font-size: 11px; font-weight: 500; color: var(--dim);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px; padding: 1px 7px;
}
.gbtn.on b { color: #FFE79A; background: rgba(255, 210, 63, .16); }

/* ---- 提示块 ---- */
.hint {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dim); line-height: 1.65;
}
.hint > b { display: block; color: #c7d6f0; margin-bottom: 6px; font-size: 12px; }
.hint ul { margin: 0; padding-left: 16px; }
.hint li { margin-bottom: 7px; }
.hint li b { color: #dbe6fb; }

/* ---- 卡片 ---- */
.card {
  background: rgba(255, 255, 255, .026);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 12px; margin-bottom: 10px;
}
.card:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 12.5px; color: #c3cfe6; line-height: 1.68; }
.card p.muted { color: var(--dim); }
.card h4 {
  margin: 0 0 7px; font-size: 14px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.card h4 .cnt {
  font-size: 11px; font-weight: 400; color: var(--dim);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px; padding: 1px 8px;
}
.card.tiny p { font-size: 12px; color: var(--dim); }

/* ---- 控件 ---- */
.row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 9px; font-size: 12.5px; color: #c3cfe6;
}
.row > span { width: 58px; flex: 0 0 auto; color: var(--dim); }
.row input[type=range] {
  flex: 1; height: 3px; -webkit-appearance: none; appearance: none;
  background: rgba(140, 170, 230, .22); border-radius: 3px; outline: none;
}
.row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); cursor: pointer; box-shadow: 0 0 10px rgba(255, 210, 63, .5);
}
.row input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}
.row.sw { justify-content: space-between; }
.row.sw > span { width: auto; }
.row.sw input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 38px; height: 20px; border-radius: 999px;
  background: rgba(140, 170, 230, .20);
  position: relative; cursor: pointer; transition: .2s; flex: 0 0 auto;
}
.row.sw input[type=checkbox]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #99a9c6; transition: .2s;
}
.row.sw input[type=checkbox]:checked { background: rgba(255, 210, 63, .34); }
.row.sw input[type=checkbox]:checked::after { left: 20px; background: var(--accent); }

.btn {
  width: 100%; margin-top: 4px; padding: 8px;
  background: rgba(76, 111, 255, .16);
  border: 1px solid rgba(76, 111, 255, .42);
  border-radius: 9px; color: #b9caff;
  font: inherit; font-size: 12.5px; cursor: pointer; transition: .16s;
}
.btn:hover { background: rgba(76, 111, 255, .28); border-color: var(--blue); color: #fff; }

/* ---- 响应式 ---- */
@media (max-width: 980px) {
  .panel { width: 240px; padding: 11px; }
  .panel.right { width: 232px; }
  .hint { display: none; }
}
@media (max-width: 700px) {
  .bar { height: 46px; padding: 0 10px; }
  .brand small { display: none; }
  .panel {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; max-height: 42%; border-radius: 14px 14px 0 0;
  }
  .panel.left { display: none; }
  .panel.right { left: 0; right: 0; width: 100%; }
  #stat { display: none; }
}

/* ---- 视觉隐藏（SEO 静态正文用）----
   本页只引 demo-model.css，不引 app.css，所以 .seo-static 必须在这里再定义一份，
   否则 <h1> 会真的显示在 3D 画面上。站点 CSP 是 style-src 'self'，禁止内联 style，
   隐藏只能靠外链样式表里的类。规则与 app.css 的 .seo-static 保持一致。 */
.seo-static {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
