/* equipment.css —— 设备结构与 SCOP 模拟页样式（自包含，无外部 CSS 依赖）
   明亮主题；色板与全公司数字孪生项目统一 */

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

:root {
  --bg: #edf1f7;
  --bg-card: #ffffff;
  --bg-card-2: #f7f9fd;
  --border: #d8e0ea;
  --text: #22303f;
  --text-dim: #64748b;
  --text-title: #0b2b45;
  --cyan: #0e7490;
  --cyan-bright: #00c2d1;
  --cyan-deep: #155e75;
  --orange: #f59e0b;
  --red: #0891b2;
  --green: #0fb981;
  --yellow: #b45309;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { background: var(--bg); }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(0,194,209, 0.06), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, rgba(245,158,11, 0.04), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---- 顶部导航（白色毛玻璃，配深色标题字） ---- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(11,43,69, 0.05);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.5px; color: var(--text-title);
  white-space: nowrap;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-bright), var(--orange));
  box-shadow: 0 0 8px rgba(0,194,209, 0.45);
  flex: none;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  padding: 7px 16px; border-radius: 8px; font-size: 13.5px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(14, 116, 144, 0.07); }
.nav-links a.active {
  color: var(--cyan);
  background: rgba(0,194,209, 0.1);
  border-color: rgba(0,194,209, 0.35);
}

/* ---- 章节 ---- */
.sec { padding: 34px 0 6px; }
.sec-title {
  font-size: 21px; font-weight: 700; color: var(--text-title);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; letter-spacing: 0.5px;
}
.sec-tag {
  font-size: 12px; font-weight: 600; color: var(--cyan);
  border: 1px solid rgba(0,194,209, 0.35);
  background: rgba(0,194,209, 0.08);
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 1px; flex: none;
}

/* ---- 卡片 ---- */
.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(11,43,69, 0.04), 0 6px 18px rgba(11,43,69, 0.06);
  min-width: 0;
  max-width: 100%;
}
.card-title {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  margin-bottom: 14px;
  padding-left: 10px; border-left: 3px solid var(--cyan);
}
.chart-note { font-size: 12.5px; color: var(--text-dim); margin-top: 12px; line-height: 1.7; }
canvas { display: block; width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > * { min-width: 0; }

/* ---- 页脚 ---- */
.footer {
  margin-top: 46px;
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  font-size: 12px; color: var(--text-dim);
  line-height: 1.8;
}

/* ---- 设备清单卡 ---- */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.equip-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  min-width: 0;
}
.equip-card:hover {
  border-color: rgba(0,194,209, 0.5);
  transform: translateY(-2px);
}
.equip-card.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0,194,209, 0.3), 0 8px 26px rgba(0,194,209, 0.12);
}
.equip-model {
  font-size: 17px; font-weight: 800; color: var(--text-title);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.equip-glb-tag {
  font-size: 10.5px; font-weight: 700; color: #ffffff;
  background: var(--cyan-deep);
  border-radius: 5px; padding: 2px 8px; flex: none;
}
.equip-proj { font-size: 13px; color: var(--cyan); font-weight: 600; margin-top: 6px; }
.equip-loc { font-size: 12.3px; color: var(--text-dim); margin-top: 2px; line-height: 1.55; }
.equip-kv { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.equip-kv .row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.3px; border-bottom: 1px dashed var(--border);
  padding-bottom: 5px;
}
.equip-kv .row:last-child { border-bottom: none; }
.equip-kv label { color: var(--text-dim); flex: none; }
.equip-kv b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.equip-kv b.hi { color: var(--orange); }
.equip-note {
  margin-top: 10px; font-size: 11.8px; color: var(--text-dim); line-height: 1.6;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 8px; padding: 7px 10px;
}
.equip-cta { margin-top: 10px; font-size: 12px; color: var(--cyan); }

/* ---- 3D 查看器 ---- */
.viewer-card { padding: 0; overflow: hidden; }
.viewer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 18px 0;
}
.viewer-head .card-title { margin-bottom: 10px; }
.viewer-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.view-tabs {
  display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden;
}
.view-tabs button {
  font-family: var(--font); font-size: 13px; cursor: pointer;
  background: var(--bg-card); color: var(--text-dim);
  border: none; padding: 7px 18px;
  transition: all 0.15s;
  white-space: nowrap;
}
.view-tabs button:hover { color: var(--text); }
.view-tabs button.active {
  color: #ffffff; font-weight: 700;
  background: var(--cyan-deep);
}
.ctl-mini {
  font-family: var(--font); font-size: 12.5px; cursor: pointer;
  background: #f4f7fb; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  transition: all 0.15s;
  white-space: nowrap;
}
.ctl-mini:hover { border-color: rgba(0,194,209, 0.4); color: var(--cyan); }
.viewer-body {
  display: flex; gap: 0;
  border-top: 1px solid var(--border);
}
.viewport {
  position: relative; flex: 1; min-width: 0;
  height: 560px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(0,194,209, 0.05), transparent 60%),
    #e8f2fa;
}
#gl-wrap { position: absolute; inset: 0; }
#gl-wrap canvas { display: block; width: 100%; height: 100%; }
#gl-loader {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(237, 241, 247, 0.94);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.3s;
}
#gl-loader.hide { opacity: 0; pointer-events: none; }
.gl-load-inner { width: 240px; text-align: center; }
.gl-load-label { font-size: 13px; color: var(--text); margin-bottom: 10px; }
.gl-load-bar {
  height: 6px; border-radius: 3px; overflow: hidden;
  background: #e2e8f0;
}
#gl-load-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan-bright), var(--orange));
  border-radius: 3px; transition: width 0.2s;
}
.gl-load-pct { margin-top: 8px; font-size: 12px; color: var(--cyan); font-variant-numeric: tabular-nums; }
#gl-hint {
  position: absolute; left: 12px; bottom: 10px; z-index: 4;
  font-size: 11.5px; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(11,43,69, 0.08);
  border-radius: 999px; padding: 3px 12px;
  pointer-events: none;
}
#gl-part-tip {
  position: absolute; right: 12px; top: 10px; z-index: 4;
  font-size: 12.5px; color: var(--cyan);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0,194,209, 0.35);
  box-shadow: 0 2px 10px rgba(11,43,69, 0.08);
  border-radius: 8px; padding: 5px 12px;
  pointer-events: none;
}
#gl-part-tip.hidden { display: none; }

/* 部件清单面板 */
.parts-panel {
  width: 262px; flex: none;
  border-left: 1px solid var(--border);
  background: var(--bg-card-2);
  display: flex; flex-direction: column;
  min-height: 0;
}
.parts-title {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  padding: 12px 14px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.parts-sub { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.parts-list {
  list-style: none; overflow-y: auto; flex: 1;
  padding: 0 10px 12px;
}
.parts-list li {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px 9px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.parts-list li:hover { background: rgba(14, 116, 144, 0.06); }
.parts-list li.on {
  background: rgba(0,194,209, 0.08);
  border-color: rgba(0,194,209, 0.3);
}
.part-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px;
  box-shadow: 0 0 4px currentColor;
}
.part-cn { font-size: 12.8px; color: var(--text); font-weight: 600; line-height: 1.45; }
.part-en { font-size: 10.8px; color: var(--text-dim); line-height: 1.4; }
.part-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }

/* ---- SCOP 计算器 ---- */
.scop-series-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.scop-series-tabs button {
  font-family: var(--font); font-size: 13px; cursor: pointer;
  background: var(--bg-card); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 18px; transition: all 0.15s;
}
.scop-series-tabs button:hover { color: var(--text); border-color: rgba(0,194,209, 0.4); }
.scop-series-tabs button.active {
  color: #ffffff; font-weight: 700;
  background: var(--cyan-deep);
  border-color: transparent;
}
.scop-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px;
  align-items: start;
}
.slider-row { margin-bottom: 18px; }
.slider-row label {
  display: flex; justify-content: space-between;
  font-size: 13.5px; color: var(--text-dim); margin-bottom: 8px;
}
.slider-row label b { color: var(--cyan); font-size: 15px; font-variant-numeric: tabular-nums; }
.slider-row input[type="range"] {
  width: 100%; height: 6px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, rgba(0,194,209, 0.45), rgba(245,158,11, 0.45));
  border-radius: 3px; outline: none; cursor: pointer;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #ffffff;
  box-shadow: 0 1px 6px rgba(14, 116, 144, 0.45);
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan); border: 3px solid #ffffff;
  box-shadow: 0 1px 6px rgba(14, 116, 144, 0.45);
}
.slider-scale {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--text-dim); margin-top: 5px;
}
.scop-msg {
  font-size: 12.8px; color: var(--text); line-height: 1.7;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 8px; padding: 10px 12px;
}
.scop-msg b { color: var(--orange); }
.scop-msg .aux-line { color: var(--cyan); display: block; margin-top: 4px; }
.scop-linked { margin-top: 10px; font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.scop-linked b { color: var(--cyan); }

.scop-results { display: flex; flex-direction: column; gap: 14px; }
.scop-big {
  background: var(--bg-card-2);
  border: 1px solid rgba(0,194,209, 0.35);
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column;
}
.scop-big label { font-size: 12.5px; color: var(--text-dim); }
.scop-big b {
  font-size: 44px; font-weight: 800; color: var(--cyan);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.scop-big span { font-size: 12px; color: var(--text-dim); }
.scop-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scop-kv > div {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.scop-kv label { font-size: 12px; color: var(--text-dim); display: block; }
.scop-kv b { font-size: 21px; font-weight: 700; color: var(--text-title); font-variant-numeric: tabular-nums; }
.scop-peer {
  background: rgba(245,158,11, 0.05);
  border: 1px solid rgba(245,158,11, 0.28);
  border-radius: 10px; padding: 12px 14px;
}
.peer-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.8px; color: var(--text); }
.peer-row b { font-size: 16px; font-variant-numeric: tabular-nums; }
.peer-row span:nth-child(1) b { color: var(--cyan); }
.peer-row span:nth-child(2) b { color: var(--text-dim); }
.peer-row span:nth-child(3) b { color: var(--green); }
.peer-note { font-size: 11.3px; color: var(--text-dim); margin-top: 7px; line-height: 1.6; }

/* 化霜对比卡 */
.defrost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.defrost-item {
  border-radius: 10px; padding: 14px 15px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.defrost-item.ours { border-color: rgba(0,194,209, 0.4); }
.defrost-item.peer { border-color: var(--border); }
.defrost-item label { font-size: 12px; color: var(--text-dim); }
.defrost-item b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.defrost-item.ours b { color: var(--cyan); }
.defrost-item.peer b { color: var(--text-dim); }
.defrost-item span { font-size: 11.5px; color: var(--text-dim); line-height: 1.55; }
.inline-link { color: var(--cyan); text-decoration: none; border-bottom: 1px dashed rgba(0,194,209, 0.5); }
.inline-link:hover { border-bottom-style: solid; }

/* embed 模式：隐藏导航与页头 */
body.embed .topnav, body.embed #page-head, body.embed .footer { display: none; }
body.embed .sec { padding-top: 10px; }

/* ---- 响应式：平板与小屏笔记本（≤960px） ---- */
@media (max-width: 1100px) {
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .wrap { padding: 0 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-inner {
    flex-direction: column; align-items: flex-start;
    height: auto; padding: 10px 16px; gap: 8px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .sec-title { font-size: 18px; flex-wrap: wrap; }
  .viewer-body { flex-direction: column; }
  .viewport { height: 460px; }
  .parts-panel { width: auto; border-left: none; border-top: 1px solid var(--border); }
  .parts-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; max-height: 260px; }
  .scop-grid { grid-template-columns: 1fr; }
}

/* ---- 响应式：手机竖屏（≤640px，390px 可用） ---- */
@media (max-width: 640px) {
  body { font-size: 13px; }
  .nav-brand { font-size: 13px; white-space: normal; }
  .nav-links a { padding: 6px 12px; font-size: 12.5px; }
  .sec { padding: 24px 0 4px; }
  .sec-title { font-size: 16px; gap: 8px; }
  .card { padding: 14px; border-radius: 12px; }
  .chart-note { font-size: 12px; }
  .footer { font-size: 11.5px; }
  .equip-grid { grid-template-columns: 1fr; }
  .viewport { height: 50vh; min-height: 320px; }
  .viewer-head { padding: 12px 14px 0; }
  .parts-list { grid-template-columns: 1fr; max-height: 300px; }
  .defrost-grid { grid-template-columns: 1fr; }
  .scop-kv { grid-template-columns: 1fr 1fr; }
  .scop-big b { font-size: 36px; }
  #gl-hint { font-size: 10.5px; left: 8px; bottom: 8px; }
  .view-tabs button { padding: 6px 13px; font-size: 12.5px; }
}

/* ---- 响应式补充：手机竖屏（≤768px，在既有 ≤640px 规则之上叠加） ---- */
@media (max-width: 768px) {
  .wrap { padding: 0 12px; }
  .nav-inner { padding: 8px 12px; }
  /* 系列标签按钮可横向滚动，避免挤破布局 */
  .scop-series-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .scop-series-tabs button { flex: none; white-space: nowrap; }
  .viewport { height: 46vh; min-height: 300px; }
  /* 操作提示允许换行，避免窄屏溢出 */
  #gl-hint { max-width: calc(100% - 16px); white-space: normal; border-radius: 10px; }
  .equip-model { font-size: 15px; }
  .scop-big b { font-size: 34px; }
  .footer .wrap { padding: 0 12px; }
}
