/* 汽车差速器 · 三维拆装台 — 深鲸 HUD 风格（青碧 accent） */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #d7e6f2;
  background:
    radial-gradient(1300px 850px at 50% 42%, #0f2b33 0%, #091a22 50%, #04090d 100%);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    repeating-linear-gradient(0deg, rgba(45, 212, 191, .045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(45, 212, 191, .045) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(900px 620px at 50% 46%, #000 0%, transparent 80%);
}
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#view:active { cursor: grabbing; }

/* ---------- 零件标签 ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.lbl {
  position: absolute; transform: translate(-50%, -140%);
  font-size: 11.5px; line-height: 1; white-space: nowrap;
  color: #d9f5ef; background: rgba(6, 24, 28, .85);
  border: 1px solid rgba(45, 212, 191, .4); border-radius: 3px;
  padding: 4px 7px; letter-spacing: .02em;
}
.lbl i { position: absolute; left: 50%; bottom: -7px; width: 1px; height: 7px; background: rgba(45, 212, 191, .6); }
.lbl.sel { border-color: #ffc46b; color: #ffe3ae; background: rgba(38, 26, 6, .88); }

/* ---------- 顶部 HUD 仪表条 ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 5;
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: linear-gradient(180deg, rgba(4, 14, 18, .92), rgba(4, 14, 18, .55) 78%, transparent);
  border-bottom: 1px solid rgba(45, 212, 191, .18);
}
#brandBadge { width: 118px; border-radius: 6px; opacity: .95; }
#cornerBadge {
  position: fixed; right: 18px; bottom: 18px; width: 132px;
  border-radius: 6px; opacity: .9; z-index: 6; pointer-events: none;
}
.titles h1 {
  font-size: 19px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
  background: linear-gradient(90deg, #7ef0dd, #e8fffb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.titles p { font-size: 10px; color: #57808a; letter-spacing: .28em; margin-top: 2px; }
.formula-chip {
  margin-left: 6px; padding: 5px 12px; font-size: 12px; color: #8fe8da;
  background: rgba(13, 46, 52, .7); border: 1px solid rgba(45, 212, 191, .28);
  border-radius: 4px; white-space: nowrap;
}
.formula-chip sub { font-size: 9px; }
.gauges { margin-left: auto; display: flex; gap: 10px; }
.gauge {
  display: flex; align-items: baseline; gap: 7px; padding: 6px 12px;
  background: rgba(8, 26, 32, .85); border-radius: 4px; position: relative;
}
.gauge::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; }
.g-blue::before { background: #38bdf8; } .g-green::before { background: #34d399; } .g-orange::before { background: #fb923c; }
.gauge span { font-size: 10.5px; color: #6f95a0; }
.gauge b { font-size: 20px; font-family: "SF Mono", Menlo, Consolas, monospace; min-width: 44px; text-align: right; }
.g-blue b { color: #38bdf8; } .g-green b { color: #34d399; } .g-orange b { color: #fb923c; }
.gauge i { font-size: 9.5px; color: #54757e; font-style: normal; }

/* ---------- HUD 四角括号装饰 ---------- */
#rail, #deck, #infoCard { position: fixed; z-index: 5; }
#rail::after, #deck::after, #infoCard::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(#2dd4bf, #2dd4bf) top left / 10px 1.5px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) top left / 1.5px 10px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) top right / 10px 1.5px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) top right / 1.5px 10px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) bottom left / 10px 1.5px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) bottom left / 1.5px 10px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) bottom right / 10px 1.5px no-repeat,
    linear-gradient(#2dd4bf, #2dd4bf) bottom right / 1.5px 10px no-repeat;
  opacity: .55;
}

/* ---------- 左侧拆装台 ---------- */
#rail {
  top: 84px; left: 20px; width: 158px; padding: 14px 12px 12px;
  background: rgba(5, 17, 21, .88); border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 8px; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 7px;
}
#rail h2 { font-size: 12.5px; color: #7ef0dd; letter-spacing: .42em; margin-bottom: 4px; }
.rail-btn {
  padding: 8px 6px; font-size: 13px; color: #b8dcd6; text-align: center;
  background: rgba(13, 42, 48, .6); border: 1px solid rgba(45, 212, 191, .25);
  border-radius: 5px; cursor: pointer; transition: all .15s; letter-spacing: .1em;
}
.rail-btn:hover { background: rgba(20, 66, 74, .8); color: #fff; }
.rail-btn.on { background: linear-gradient(180deg, #0f9d8e, #0b6e64); border-color: #2dd4bf; color: #fff; }
.rail-slider { padding: 2px 2px 0; }
.rail-slider span { display: flex; justify-content: space-between; font-size: 11px; color: #6f95a0; margin-bottom: 5px; }
.rail-slider b { color: #7ef0dd; font-weight: 500; }
.rail-sep { height: 1px; background: rgba(45, 212, 191, .18); margin: 3px 0; }
.rail-hint { font-size: 10px; color: #4d6d76; line-height: 1.7; margin-top: 2px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #0f9d8e, #0a3a36); outline: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #d8fff8; border: 2px solid #2dd4bf; cursor: pointer;
  box-shadow: 0 0 8px rgba(45, 212, 191, .8);
}

/* ---------- 零件档案 ---------- */
#infoCard {
  left: 198px; bottom: 108px; width: 320px; padding: 12px 14px 12px;
  background: rgba(5, 17, 21, .92); border: 1px solid rgba(255, 196, 107, .4);
  border-radius: 8px; backdrop-filter: blur(8px);
}
#infoCard .tag { font-size: 10px; color: #ffc46b; letter-spacing: .3em; }
#infoCard h3 { font-size: 14.5px; color: #ffe3ae; margin: 5px 0 6px; }
#infoCard p { font-size: 11.5px; color: #b8cfc9; line-height: 1.7; }

/* ---------- 底部悬浮工况台 ---------- */
#deck {
  left: 50%; transform: translateX(-50%); bottom: 20px;
  display: flex; align-items: center; gap: 16px; padding: 12px 18px;
  background: rgba(5, 17, 21, .9); border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 10px; backdrop-filter: blur(8px);
}
.deck-modes { display: flex; align-items: center; gap: 7px; }
.deck-modes .cap, .deck-sliders .cap { font-size: 11.5px; color: #6f95a0; letter-spacing: .2em; }
.deck-modes button {
  padding: 7px 15px; font-size: 13px; color: #b8dcd6; letter-spacing: .06em;
  background: rgba(13, 42, 48, .6); border: 1px solid rgba(45, 212, 191, .25);
  border-radius: 999px; cursor: pointer; transition: all .15s;
}
.deck-modes button:hover { background: rgba(20, 66, 74, .8); color: #fff; }
.deck-modes button.on { background: linear-gradient(180deg, #0f9d8e, #0b6e64); border-color: #2dd4bf; color: #fff; box-shadow: 0 0 12px rgba(45, 212, 191, .35); }
.deck-modes button.pause.on { background: linear-gradient(180deg, #3f7d4f, #2a5c38); border-color: #6fce85; }
.deck-sep { width: 1px; height: 40px; background: rgba(45, 212, 191, .18); }
.deck-sliders { width: 300px; display: flex; flex-direction: column; gap: 6px; }
.sliderRow { display: flex; align-items: center; gap: 9px; }
.sliderRow .val { font-size: 11.5px; color: #7ef0dd; min-width: 38px; text-align: right; font-family: "SF Mono", Menlo, monospace; }
