// (이전 import 및 interface 동일, mobile-crane case만 교체)
// 실제로는 기존 파일에서 mobile-crane 케이스만 교체

// mobile-crane 케이스를 다음으로 교체:

case "mobile-crane":
  // 이동식 크레인: 하부(트랙) + 회전대 + 캐빈 + 붐대 + 카운터웨이트 + 후크
  return (
    <group>
      {/* ========== 하부 크롤러 트랙 시스템 ========== */}
      {/* 좌측 트랙 메인 */}
      <Box args={[boxWidth * 0.28, boxHeight * 0.18, boxDepth * 0.98]} position={[-boxWidth * 0.31, -boxHeight * 0.41, 0]}>
        <meshStandardMaterial
          color="#1a1a1a"
          roughness={0.9}
          metalness={0.2}
          emissive={isSelected ? "#1a1a1a" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.2 : 0}
        />
      </Box>
      {/* 좌측 트랙 상부 롤러 */}
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[-boxWidth * 0.31, -boxHeight * 0.28, -boxDepth * 0.42]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[-boxWidth * 0.31, -boxHeight * 0.28, 0]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[-boxWidth * 0.31, -boxHeight * 0.28, boxDepth * 0.42]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>

      {/* 우측 트랙 메인 */}
      <Box args={[boxWidth * 0.28, boxHeight * 0.18, boxDepth * 0.98]} position={[boxWidth * 0.31, -boxHeight * 0.41, 0]}>
        <meshStandardMaterial
          color="#1a1a1a"
          roughness={0.9}
          metalness={0.2}
          emissive={isSelected ? "#1a1a1a" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.2 : 0}
        />
      </Box>
      {/* 우측 트랙 상부 롤러 */}
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[boxWidth * 0.31, -boxHeight * 0.28, -boxDepth * 0.42]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[boxWidth * 0.31, -boxHeight * 0.28, 0]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>
      <Box args={[boxWidth * 0.32, boxHeight * 0.08, boxDepth * 0.12]} position={[boxWidth * 0.31, -boxHeight * 0.28, boxDepth * 0.42]}>
        <meshStandardMaterial color="#2d3748" roughness={0.7} metalness={0.5} />
      </Box>

      {/* 트랙 연결 프레임 */}
      <Box args={[boxWidth * 0.12, boxHeight * 0.06, boxDepth * 0.98]} position={[0, -boxHeight * 0.39, 0]}>
        <meshStandardMaterial color="#374151" roughness={0.5} metalness={0.6} />
      </Box>

      {/* ========== 회전 상부 구조 ========== */}
      {/* 메인 회전 플랫폼 */}
      <Box args={[boxWidth * 0.88, boxHeight * 0.15, boxDepth * 0.88]} position={[0, -boxHeight * 0.28, 0]}>
        <meshStandardMaterial
          color={placement.color}
          roughness={0.25}
          metalness={0.75}
          emissive={isSelected ? placement.color : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.9 : 0}
        />
      </Box>
      {/* 회전 베어링 하우징 */}
      <Box args={[boxWidth * 0.45, boxHeight * 0.08, boxDepth * 0.45]} position={[0, -boxHeight * 0.35, 0]}>
        <meshStandardMaterial color="#4b5563" roughness={0.4} metalness={0.8} />
      </Box>

      {/* ========== 엔진 및 유압 시스템 ========== */}
      {/* 엔진룸 메인 */}
      <Box args={[boxWidth * 0.65, boxHeight * 0.32, boxDepth * 0.35]} position={[0, -boxHeight * 0.12, boxDepth * 0.24]}>
        <meshStandardMaterial
          color={placement.color}
          roughness={0.35}
          metalness={0.65}
          emissive={isSelected ? placement.color : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.8 : 0}
        />
      </Box>
      {/* 유압 펌프 하우징 */}
      <Box args={[boxWidth * 0.25, boxHeight * 0.18, boxDepth * 0.25]} position={[-boxWidth * 0.25, -boxHeight * 0.15, boxDepth * 0.18]}>
        <meshStandardMaterial color="#dc2626" roughness={0.4} metalness={0.7} />
      </Box>
      <Box args={[boxWidth * 0.25, boxHeight * 0.18, boxDepth * 0.25]} position={[boxWidth * 0.25, -boxHeight * 0.15, boxDepth * 0.18]}>
        <meshStandardMaterial color="#dc2626" roughness={0.4} metalness={0.7} />
      </Box>
      {/* 배기 파이프 */}
      <Box args={[boxWidth * 0.08, boxHeight * 0.35, boxDepth * 0.08]} position={[boxWidth * 0.2, -boxHeight * 0.02, boxDepth * 0.35]}>
        <meshStandardMaterial color="#1f2937" roughness={0.3} metalness={0.8} />
      </Box>

      {/* ========== 운전실 (캐빈) ========== */}
      {/* 캐빈 메인 바디 */}
      <Box args={[boxWidth * 0.38, boxHeight * 0.35, boxDepth * 0.38]} position={[0, -boxHeight * 0.08, -boxDepth * 0.18]}>
        <meshStandardMaterial
          color="#2d3748"
          roughness={0.15}
          metalness={0.85}
          emissive={isSelected ? "#3b82f6" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.6 : 0}
        />
      </Box>
      {/* 캐빈 창문 */}
      <Box args={[boxWidth * 0.35, boxHeight * 0.25, boxDepth * 0.02]} position={[0, -boxHeight * 0.05, -boxDepth * 0.37]}>
        <meshStandardMaterial
          color="#60a5fa"
          roughness={0.05}
          metalness={0.95}
          transparent
          opacity={0.6}
          emissive={isSelected ? "#60a5fa" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.8 : 0}
        />
      </Box>
      {/* 캐빈 지붕 */}
      <Box args={[boxWidth * 0.4, boxHeight * 0.05, boxDepth * 0.4]} position={[0, boxHeight * 0.07, -boxDepth * 0.18]}>
        <meshStandardMaterial color="#374151" roughness={0.3} metalness={0.7} />
      </Box>

      {/* ========== 붐대 시스템 ========== */}
      {/* 붐대 마운트 베이스 */}
      <Box args={[boxWidth * 0.25, boxHeight * 0.25, boxDepth * 0.25]} position={[0, -boxHeight * 0.02, 0]}>
        <meshStandardMaterial
          color="#4b5563"
          roughness={0.25}
          metalness={0.85}
          emissive={isSelected ? "#4b5563" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.5 : 0}
        />
      </Box>
      {/* 붐대 힌지 실린더 (유압) */}
      <Box
        args={[boxWidth * 0.12, boxHeight * 0.28, boxDepth * 0.12]}
        position={[0, boxHeight * 0.02, boxDepth * 0.08]}
        rotation={[Math.PI / 3, 0, 0]}
      >
        <meshStandardMaterial color="#dc2626" roughness={0.3} metalness={0.8} />
      </Box>

      {/* 메인 붐대 하단 섹션 */}
      <Box
        args={[boxWidth * 0.18, boxHeight * 0.55, boxDepth * 0.18]}
        position={[0, boxHeight * 0.12, -boxDepth * 0.13]}
        rotation={[Math.PI / 4.2, 0, 0]}
      >
        <meshStandardMaterial
          color="#f59e0b"
          roughness={0.25}
          metalness={0.75}
          emissive={isSelected ? "#f59e0b" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.75 : 0}
        />
      </Box>
      {/* 붐대 상단 섹션 (텔레스코픽) */}
      <Box
        args={[boxWidth * 0.14, boxHeight * 0.45, boxDepth * 0.14]}
        position={[0, boxHeight * 0.32, -boxDepth * 0.32]}
        rotation={[Math.PI / 4.8, 0, 0]}
      >
        <meshStandardMaterial
          color="#fbbf24"
          roughness={0.25}
          metalness={0.75}
          emissive={isSelected ? "#fbbf24" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.75 : 0}
        />
      </Box>
      {/* 붐대 최상단 섹션 */}
      <Box
        args={[boxWidth * 0.1, boxHeight * 0.32, boxDepth * 0.1]}
        position={[0, boxHeight * 0.45, -boxDepth * 0.44]}
        rotation={[Math.PI / 5.5, 0, 0]}
      >
        <meshStandardMaterial
          color="#fbbf24"
          roughness={0.25}
          metalness={0.75}
          emissive={isSelected ? "#fbbf24" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.75 : 0}
        />
      </Box>

      {/* 붐대 트러스 구조 (디테일) */}
      {[-0.15, -0.05, 0.05, 0.15].map((offset, idx) => (
        <Box
          key={`truss-${idx}`}
          args={[boxWidth * 0.02, boxHeight * 0.5, boxDepth * 0.02]}
          position={[offset, boxHeight * 0.12, -boxDepth * 0.13]}
          rotation={[Math.PI / 4.2, 0, 0]}
        >
          <meshStandardMaterial color="#1f2937" roughness={0.4} metalness={0.7} />
        </Box>
      ))}

      {/* ========== 카운터웨이트 시스템 ========== */}
      {/* 카운터웨이트 메인 블록 */}
      <Box args={[boxWidth * 0.55, boxHeight * 0.25, boxDepth * 0.28]} position={[0, -boxHeight * 0.03, boxDepth * 0.32]}>
        <meshStandardMaterial
          color="#52525b"
          roughness={0.7}
          metalness={0.4}
          emissive={isSelected ? "#52525b" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.3 : 0}
        />
      </Box>
      {/* 카운터웨이트 추가 블록 (상단) */}
      <Box args={[boxWidth * 0.48, boxHeight * 0.18, boxDepth * 0.22]} position={[0, boxHeight * 0.08, boxDepth * 0.32]}>
        <meshStandardMaterial color="#3f3f46" roughness={0.7} metalness={0.4} />
      </Box>
      {/* 카운터웨이트 프레임 */}
      <Box args={[boxWidth * 0.58, boxHeight * 0.08, boxDepth * 0.32]} position={[0, -boxHeight * 0.16, boxDepth * 0.32]}>
        <meshStandardMaterial color="#1f2937" roughness={0.5} metalness={0.7} />
      </Box>

      {/* ========== 후크 및 케이블 시스템 ========== */}
      {/* 붐대 끝단 풀리 */}
      <Box args={[boxWidth * 0.08, boxHeight * 0.08, boxDepth * 0.08]} position={[0, boxHeight * 0.52, -boxDepth * 0.52]}>
        <meshStandardMaterial color="#1f2937" roughness={0.3} metalness={0.8} />
      </Box>
      
      {/* 메인 호이스트 케이블 */}
      <Box args={[boxWidth * 0.025, boxHeight * 0.42, boxDepth * 0.025]} position={[0, boxHeight * 0.28, -boxDepth * 0.52]}>
        <meshStandardMaterial
          color="#0f172a"
          roughness={0.3}
          metalness={0.7}
        />
      </Box>

      {/* 후크 블록 상단 */}
      <Box args={[boxWidth * 0.12, boxHeight * 0.08, boxDepth * 0.12]} position={[0, boxHeight * 0.04, -boxDepth * 0.52]}>
        <meshStandardMaterial color="#1f2937" roughness={0.3} metalness={0.8} />
      </Box>
      {/* 후크 메인 (빨간색 안전색) */}
      <Box args={[boxWidth * 0.1, boxHeight * 0.12, boxDepth * 0.1]} position={[0, -boxHeight * 0.02, -boxDepth * 0.52]}>
        <meshStandardMaterial
          color="#dc2626"
          roughness={0.25}
          metalness={0.85}
          emissive={isSelected ? "#dc2626" : "#000000"}
          emissiveIntensity={isSelected ? glowIntensity * 0.9 : 0}
        />
      </Box>

      {/* 지브 지지 케이블 (좌측) */}
      <Box
        args={[boxWidth * 0.018, boxHeight * 0.38, boxDepth * 0.018]}
        position={[-boxWidth * 0.06, boxHeight * 0.28, -boxDepth * 0.08]}
        rotation={[Math.PI / 5.5, 0, 0]}
      >
        <meshStandardMaterial color="#0f172a" roughness={0.2} metalness={0.8} />
      </Box>
      {/* 지브 지지 케이블 (우측) */}
      <Box
        args={[boxWidth * 0.018, boxHeight * 0.38, boxDepth * 0.018]}
        position={[boxWidth * 0.06, boxHeight * 0.28, -boxDepth * 0.08]}
        rotation={[Math.PI / 5.5, 0, 0]}
      >
        <meshStandardMaterial color="#0f172a" roughness={0.2} metalness={0.8} />
      </Box>

      {/* ========== 조명 및 안전 장치 ========== */}
      {/* 작업등 (전방) */}
      <Box args={[boxWidth * 0.06, boxHeight * 0.04, boxDepth * 0.04]} position={[0, boxHeight * 0.09, -boxDepth * 0.4]}>
        <meshStandardMaterial
          color="#fef08a"
          roughness={0.1}
          metalness={0.9}
          emissive="#fef08a"
          emissiveIntensity={isSelected ? glowIntensity * 1.2 : 0.3}
        />
      </Box>
      {/* 경고등 (붐대 상단) */}
      <Box args={[boxWidth * 0.04, boxHeight * 0.04, boxDepth * 0.04]} position={[0, boxHeight * 0.54, -boxDepth * 0.5]}>
        <meshStandardMaterial
          color="#ef4444"
          roughness={0.1}
          metalness={0.9}
          emissive="#ef4444"
          emissiveIntensity={isSelected ? glowIntensity * 1.5 : 0.4}
        />
      </Box>
    </group>
  );

