/* /assets/css/machines/industrial-mech/how-a-hydraulic-crane-lifting-system-works-cutaway.css — 本页专属样式（en/zh 共用） */

/* ============ 机器类目基线（part bodies & distinct fills） ============ */
.part .body{fill:var(--metal);stroke:#8ea0b5;stroke-width:1.6}
.part .body2{fill:var(--metal-2);stroke:#a9b7c9;stroke-width:1.2}
.part .body3{fill:#aab9cd;stroke:none}
.part .accent{fill:none;stroke:#6b7b8c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.part.is-active .body{fill:#9dc3f5;stroke:#1d4ed8;stroke-width:2.2}
.part.is-active .body2{fill:#c4daf8;stroke:#3b82f6;stroke-width:1.4}
.part.is-active .body3{fill:#1d4ed8}
.part.is-active .accent{stroke:#1d4ed8}
.part.is-active{filter:drop-shadow(0 0 12px rgba(29,78,216,.5))}

/* ============ 管道流动（flow） ============ */
.pipe-case{fill:none;stroke:#94a3b8;stroke-width:12;stroke-linecap:round;stroke-linejoin:round}
.pipe-flow{fill:none;stroke:#2563eb;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:8 13;opacity:0;transition:opacity .4s}
.is-running .pipe-flow{opacity:.9;animation:flow 1.1s linear infinite}
@keyframes flow{to{stroke-dashoffset:-21}}

/* ============ 本页专属动画 ============ */
.boom-swing{transform-box:view-box;transform-origin:300px 500px;animation:boom 6s ease-in-out infinite;animation-play-state:paused}
.is-running .boom-swing{animation-play-state:running}
@keyframes boom{0%,100%{transform:rotate(0)}50%{transform:rotate(2.6deg)}}

.cyl-rod{animation:extend 6s ease-in-out infinite;animation-play-state:paused}
.is-running .cyl-rod{animation-play-state:running}
@keyframes extend{0%,100%{transform:translateX(0)}50%{transform:translateX(12px)}}

.hook-rope{transform-box:view-box;transform-origin:759px 179px;animation:sway 3s ease-in-out infinite;animation-play-state:paused}
.is-running .hook-rope{animation-play-state:running}
@keyframes sway{0%,100%{transform:rotate(0)}50%{transform:rotate(1.6deg)}}

.pump-gear{transform-box:view-box;transform-origin:117px 500px;animation:spin 1.3s linear infinite;animation-play-state:paused}
.is-running .pump-gear{animation-play-state:running}
@keyframes spin{to{transform:rotate(360deg)}}

/* ============ 各部件区分色（:not(.is-active) 保证全局高亮仍生效） ============ */
body[data-topic="hydraulic-crane"] .part[data-id="part-boom"]:not(.is-active) .body{fill:#bcd7ef}
body[data-topic="hydraulic-crane"] .part[data-id="part-boom"]:not(.is-active) .body2{fill:#d9e9f8}
body[data-topic="hydraulic-crane"] .part[data-id="part-cylinder"]:not(.is-active) .body{fill:#c8c1e5}
body[data-topic="hydraulic-crane"] .part[data-id="part-cylinder"]:not(.is-active) .body2{fill:#e2ddf3}
body[data-topic="hydraulic-crane"] .part[data-id="part-load"]:not(.is-active) .body2{fill:#d9c9a6}
body[data-topic="hydraulic-crane"] .part[data-id="part-turntable"]:not(.is-active) .body{fill:#c6cfda}
body[data-topic="hydraulic-crane"] .part[data-id="part-turntable"]:not(.is-active) .body2{fill:#e2e8f0}
body[data-topic="hydraulic-crane"] .part[data-id="part-chassis"]:not(.is-active) .body{fill:#b7c9dd}
body[data-topic="hydraulic-crane"] .part[data-id="part-outrigger"]:not(.is-active) .body{fill:#c6cfda}
body[data-topic="hydraulic-crane"] .part[data-id="part-outrigger"]:not(.is-active) .body2{fill:#e2e8f0}
body[data-topic="hydraulic-crane"] .part[data-id="part-pump"]:not(.is-active) .body{fill:#bcc9db}
body[data-topic="hydraulic-crane"] .part[data-id="part-valve"]:not(.is-active) .body{fill:#bfe0f5}
body[data-topic="hydraulic-crane"] .part[data-id="part-shell-cab"]:not(.is-active) .body{fill:#cbd7e7}